Submission ID Problem Status Score Time Memory Code / Answer files User Submit time
#19130 #61. 愛之行 Walk of Love Time Limit Exceeded 14 24124 ms 876 K C++ 17 / 540 B HKSCF2023-065 2023-07-15 17:12:42
Show orginal code
#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, q;
    cin >> n >> q;
    int a[n + 1];
    for (int i = 1; i <= n; i++) cin >> a[i];
    while (q--) {
        int t, l, r, v;
        cin >> t;
        if (t == 1) {
            cin >> l >> r;
            long double ans = 0;
            int m = 0;
            for (int i = l; i <= r; i++) {
                m = max(m, a[i]);
                ans += ((long double)(a[i])) / ((long double)(m));
            }
            cout << fixed << setprecision(8) << ans / ((long double)(r - l + 1)) << endl;
        } else if (t == 2) {
            cin >> l >> v;
            a[l] = v;
        } else {
            cin >> l >> r >> v;
            for (int i = l; i <= r; i++) a[i] = v;
        }
    }
}
Subtask #1
Accepted
Score: 14
Test case #1
Accepted
Score: 100
Time: 7 ms
Memory: 352 KiB

Input file

5 4
3 1 4 1 5
1 2 4
1 3 5
2 3 2
1 2 5

Output file

0.750000000
0.750000000
0.875000000

Your output

0.75000000
0.75000000
0.87500000

Checker message

Accepted | 3 numbers

System message

Exited with return code 0
Test case #2
Accepted
Score: 100
Time: 16 ms
Memory: 480 KiB

Input file

1 1000
512669271
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
<5917 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<11900 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #3
Accepted
Score: 100
Time: 13 ms
Memory: 360 KiB

Input file

1 1000
535738116
1 1 1
2 1 910192778
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1
<6730 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<10664 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<9739 bytes omitted>

Checker message

Accepted | 897 numbers

System message

Exited with return code 0
Test case #4
Accepted
Score: 100
Time: 12 ms
Memory: 440 KiB

Input file

1 1000
114153941
1 1 1
1 1 1
1 1 1
1 1 1
2 1 182244586
2 1 10608697
2 1 506350410
2 1 209229745
1 1 
<8177 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<8468 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<7726 bytes omitted>

Checker message

Accepted | 714 numbers

System message

Exited with return code 0
Test case #5
Accepted
Score: 100
Time: 6 ms
Memory: 252 KiB

Input file

1 1000
102635174
1 1 1
1 1 1
2 1 1785073
1 1 1
2 1 355024196
2 1 433306522
1 1 1
2 1 818921372
1 1 1
<9804 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<5984 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<5449 bytes omitted>

Checker message

Accepted | 507 numbers

System message

Exited with return code 0
Test case #6
Accepted
Score: 100
Time: 11 ms
Memory: 348 KiB

Input file

1 1000
681050998
1 1 1
2 1 549964256
2 1 111025383
2 1 923571007
1 1 1
2 1 266069755
1 1 1
2 1 42861
<11426 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<3524 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<3194 bytes omitted>

Checker message

Accepted | 302 numbers

System message

Exited with return code 0
Test case #7
Accepted
Score: 100
Time: 7 ms
Memory: 352 KiB

Input file

1 1000
964499527
2 1 475345126
2 1 783305468
2 1 660457181
2 1 864873426
2 1 580966393
2 1 688767580
<13062 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<1040 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<917 bytes omitted>

Checker message

Accepted | 95 numbers

System message

Exited with return code 0
Test case #8
Accepted
Score: 100
Time: 13 ms
Memory: 352 KiB

Input file

1000 1000
98924974 797820049 441936174 131623808 582217921 62666111 957262129 831251643 610737858 63
<19596 bytes omitted>

Output file

0.516697456
0.523311260
0.525145477
0.529696529
0.527125630
0.660464433
0.560459981
0.537734167
0.52
<11900 bytes omitted>

Your output

0.51669746
0.52331126
0.52514548
0.52969653
0.52712563
0.66046443
0.56045998
0.53773417
0.52513466
0.52690821
0.52862420
0.53226
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #9
Accepted
Score: 100
Time: 15 ms
Memory: 364 KiB

Input file

1000 1000
122034917 623191245 608186756 982290693 354324866 71842074 855742871 801766369 718373121 8
<20206 bytes omitted>

Output file

0.505176103
0.509168140
0.505036374
0.502937786
0.537584252
0.514597760
0.506738935
0.512236658
0.50
<10652 bytes omitted>

Your output

0.50517610
0.50916814
0.50503637
0.50293779
0.53758425
0.51459776
0.50673894
0.51223666
0.50812579
0.51910807
0.50429741
0.57915
<9728 bytes omitted>

Checker message

Accepted | 896 numbers

System message

Exited with return code 0
Test case #10
Accepted
Score: 100
Time: 13 ms
Memory: 492 KiB

Input file

1000 1000
260259254 922388030 713094741 366345723 158779441 569323949 353925300 626204183 330363241 
<21347 bytes omitted>

Output file

0.478231591
0.515036969
0.499545477
0.509769341
0.540424990
0.504132602
0.491502139
0.474842632
0.49
<8384 bytes omitted>

Your output

0.47823159
0.51503697
0.49954548
0.50976934
0.54042499
0.50413260
0.49150214
0.47484263
0.49443851
0.49306226
0.48542726
0.52657
<7649 bytes omitted>

Checker message

Accepted | 707 numbers

System message

Exited with return code 0
Test case #11
Accepted
Score: 100
Time: 13 ms
Memory: 468 KiB

Input file

1000 1000
543707783 811519408 818002727 45368048 668266720 626614335 587266512 155674701 502161874 2
<22635 bytes omitted>

Output file

0.504299382
0.500860135
0.487947259
0.495181606
0.503314415
0.508973770
1.000000000
0.500441715
0.50
<5792 bytes omitted>

Your output

0.50429938
0.50086013
0.48794726
0.49518161
0.50331441
0.50897377
1.00000000
0.50044172
0.50009033
0.49413180
0.49773023
0.49190
<5273 bytes omitted>

Checker message

Accepted | 491 numbers

System message

Exited with return code 0
Test case #12
Accepted
Score: 100
Time: 7 ms
Memory: 252 KiB

Input file

1000 1000
827156311 110716194 627943416 429423077 177753998 978872018 85448941 275079811 263895098 8
<23795 bytes omitted>

Output file

0.501407357
0.511577690
0.505485276
0.521804629
0.555614857
0.511073262
0.502356558
0.505759306
0.51
<3560 bytes omitted>

Your output

0.50140736
0.51157769
0.50548528
0.52180463
0.55561486
0.51107326
0.50235656
0.50575931
0.51241871
0.50545848
0.52402457
0.50057
<3227 bytes omitted>

Checker message

Accepted | 305 numbers

System message

Exited with return code 0
Test case #13
Accepted
Score: 100
Time: 8 ms
Memory: 500 KiB

Input file

1000 1000
405572136 704880275 27818697 813478107 542017085 36162405 583631370 804550329 875885219 76
<25039 bytes omitted>

Output file

0.510748847
0.515978563
0.508084606
0.520953158
0.516054030
0.511345630
0.514067009
0.513199391
0.53
<1004 bytes omitted>

Your output

0.51074885
0.51597856
0.50808461
0.52095316
0.51605403
0.51134563
0.51406701
0.51319939
0.53245316
0.50234896
0.51729830
0.51465
<884 bytes omitted>

Checker message

Accepted | 92 numbers

System message

Exited with return code 0
Subtask #2
Time Limit Exceeded
Score: 0
Test case #1
Accepted
Score: 100
Time: 16 ms
Memory: 480 KiB

Input file

1 1000
512669271
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
<5917 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<11900 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #2
Accepted
Score: 100
Time: 13 ms
Memory: 352 KiB

Input file

1000 1000
98924974 797820049 441936174 131623808 582217921 62666111 957262129 831251643 610737858 63
<19596 bytes omitted>

Output file

0.516697456
0.523311260
0.525145477
0.529696529
0.527125630
0.660464433
0.560459981
0.537734167
0.52
<11900 bytes omitted>

Your output

0.51669746
0.52331126
0.52514548
0.52969653
0.52712563
0.66046443
0.56045998
0.53773417
0.52513466
0.52690821
0.52862420
0.53226
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #3
Time Limit Exceeded
Score: 0
Time: 1051 ms
Memory: 740 KiB

Input file

100000 100000
652748136 667547581 685053508 563305241 816922535 976132064 321376540 98229663 1233093
<2366537 bytes omitted>

Output file

0.498039519
0.499497436
0.503642391
0.498318035
0.496426250
0.502173129
0.497781818
0.503175199
0.50
<1199900 bytes omitted>

Your output

0.49803952
0.49949744
0.50364239
0.49831804
0.49642625
0.50217313
0.49778182
0.50317520
0.50053654
0.49814560
0.50224079
0.49954
<260022 bytes omitted>
Test case #4
Time Limit Exceeded
Score: 0
Time: 1004 ms
Memory: 744 KiB

Input file

100000 100000
125798856 241096426 834123662 439191615 796271788 520610841 196372716 146446355 344243
<2366956 bytes omitted>

Output file

0.500927171
0.499757023
0.500360362
0.499988480
0.499516151
0.500282960
0.500992331
0.502927920
0.49
<1199900 bytes omitted>

Your output

0.50092717
0.49975702
0.50036036
0.49998848
0.49951615
0.50028296
0.50099233
0.50292792
0.49899920
0.50198320
0.49979634
0.51459
<248395 bytes omitted>
Subtask #3
Time Limit Exceeded
Score: 0
Test case #1
Accepted
Score: 100
Time: 7 ms
Memory: 352 KiB

Input file

5 4
3 1 4 1 5
1 2 4
1 3 5
2 3 2
1 2 5

Output file

0.750000000
0.750000000
0.875000000

Your output

0.75000000
0.75000000
0.87500000

Checker message

Accepted | 3 numbers

System message

Exited with return code 0
Test case #2
Accepted
Score: 100
Time: 16 ms
Memory: 480 KiB

Input file

1 1000
512669271
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
<5917 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<11900 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #3
Accepted
Score: 100
Time: 13 ms
Memory: 360 KiB

Input file

1 1000
535738116
1 1 1
2 1 910192778
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1
<6730 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<10664 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<9739 bytes omitted>

Checker message

Accepted | 897 numbers

System message

Exited with return code 0
Test case #4
Accepted
Score: 100
Time: 12 ms
Memory: 440 KiB

Input file

1 1000
114153941
1 1 1
1 1 1
1 1 1
1 1 1
2 1 182244586
2 1 10608697
2 1 506350410
2 1 209229745
1 1 
<8177 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<8468 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<7726 bytes omitted>

Checker message

Accepted | 714 numbers

System message

Exited with return code 0
Test case #5
Accepted
Score: 100
Time: 6 ms
Memory: 252 KiB

Input file

1 1000
102635174
1 1 1
1 1 1
2 1 1785073
1 1 1
2 1 355024196
2 1 433306522
1 1 1
2 1 818921372
1 1 1
<9804 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<5984 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<5449 bytes omitted>

Checker message

Accepted | 507 numbers

System message

Exited with return code 0
Test case #6
Accepted
Score: 100
Time: 11 ms
Memory: 348 KiB

Input file

1 1000
681050998
1 1 1
2 1 549964256
2 1 111025383
2 1 923571007
1 1 1
2 1 266069755
1 1 1
2 1 42861
<11426 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<3524 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<3194 bytes omitted>

Checker message

Accepted | 302 numbers

System message

Exited with return code 0
Test case #7
Accepted
Score: 100
Time: 7 ms
Memory: 352 KiB

Input file

1 1000
964499527
2 1 475345126
2 1 783305468
2 1 660457181
2 1 864873426
2 1 580966393
2 1 688767580
<13062 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<1040 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<917 bytes omitted>

Checker message

Accepted | 95 numbers

System message

Exited with return code 0
Test case #8
Accepted
Score: 100
Time: 13 ms
Memory: 352 KiB

Input file

1000 1000
98924974 797820049 441936174 131623808 582217921 62666111 957262129 831251643 610737858 63
<19596 bytes omitted>

Output file

0.516697456
0.523311260
0.525145477
0.529696529
0.527125630
0.660464433
0.560459981
0.537734167
0.52
<11900 bytes omitted>

Your output

0.51669746
0.52331126
0.52514548
0.52969653
0.52712563
0.66046443
0.56045998
0.53773417
0.52513466
0.52690821
0.52862420
0.53226
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #9
Accepted
Score: 100
Time: 15 ms
Memory: 364 KiB

Input file

1000 1000
122034917 623191245 608186756 982290693 354324866 71842074 855742871 801766369 718373121 8
<20206 bytes omitted>

Output file

0.505176103
0.509168140
0.505036374
0.502937786
0.537584252
0.514597760
0.506738935
0.512236658
0.50
<10652 bytes omitted>

Your output

0.50517610
0.50916814
0.50503637
0.50293779
0.53758425
0.51459776
0.50673894
0.51223666
0.50812579
0.51910807
0.50429741
0.57915
<9728 bytes omitted>

Checker message

Accepted | 896 numbers

System message

Exited with return code 0
Test case #10
Accepted
Score: 100
Time: 13 ms
Memory: 492 KiB

Input file

1000 1000
260259254 922388030 713094741 366345723 158779441 569323949 353925300 626204183 330363241 
<21347 bytes omitted>

Output file

0.478231591
0.515036969
0.499545477
0.509769341
0.540424990
0.504132602
0.491502139
0.474842632
0.49
<8384 bytes omitted>

Your output

0.47823159
0.51503697
0.49954548
0.50976934
0.54042499
0.50413260
0.49150214
0.47484263
0.49443851
0.49306226
0.48542726
0.52657
<7649 bytes omitted>

Checker message

Accepted | 707 numbers

System message

Exited with return code 0
Test case #11
Accepted
Score: 100
Time: 13 ms
Memory: 468 KiB

Input file

1000 1000
543707783 811519408 818002727 45368048 668266720 626614335 587266512 155674701 502161874 2
<22635 bytes omitted>

Output file

0.504299382
0.500860135
0.487947259
0.495181606
0.503314415
0.508973770
1.000000000
0.500441715
0.50
<5792 bytes omitted>

Your output

0.50429938
0.50086013
0.48794726
0.49518161
0.50331441
0.50897377
1.00000000
0.50044172
0.50009033
0.49413180
0.49773023
0.49190
<5273 bytes omitted>

Checker message

Accepted | 491 numbers

System message

Exited with return code 0
Test case #12
Accepted
Score: 100
Time: 7 ms
Memory: 252 KiB

Input file

1000 1000
827156311 110716194 627943416 429423077 177753998 978872018 85448941 275079811 263895098 8
<23795 bytes omitted>

Output file

0.501407357
0.511577690
0.505485276
0.521804629
0.555614857
0.511073262
0.502356558
0.505759306
0.51
<3560 bytes omitted>

Your output

0.50140736
0.51157769
0.50548528
0.52180463
0.55561486
0.51107326
0.50235656
0.50575931
0.51241871
0.50545848
0.52402457
0.50057
<3227 bytes omitted>

Checker message

Accepted | 305 numbers

System message

Exited with return code 0
Test case #13
Accepted
Score: 100
Time: 8 ms
Memory: 500 KiB

Input file

1000 1000
405572136 704880275 27818697 813478107 542017085 36162405 583631370 804550329 875885219 76
<25039 bytes omitted>

Output file

0.510748847
0.515978563
0.508084606
0.520953158
0.516054030
0.511345630
0.514067009
0.513199391
0.53
<1004 bytes omitted>

Your output

0.51074885
0.51597856
0.50808461
0.52095316
0.51605403
0.51134563
0.51406701
0.51319939
0.53245316
0.50234896
0.51729830
0.51465
<884 bytes omitted>

Checker message

Accepted | 92 numbers

System message

Exited with return code 0
Test case #14
Time Limit Exceeded
Score: 0
Time: 1051 ms
Memory: 740 KiB

Input file

100000 100000
652748136 667547581 685053508 563305241 816922535 976132064 321376540 98229663 1233093
<2366537 bytes omitted>

Output file

0.498039519
0.499497436
0.503642391
0.498318035
0.496426250
0.502173129
0.497781818
0.503175199
0.50
<1199900 bytes omitted>

Your output

0.49803952
0.49949744
0.50364239
0.49831804
0.49642625
0.50217313
0.49778182
0.50317520
0.50053654
0.49814560
0.50224079
0.49954
<260022 bytes omitted>
Test case #15
Time Limit Exceeded
Score: 0
Time: 1050 ms
Memory: 748 KiB

Input file

100000 100000
696795154 716565476 39868189 216995307 267790819 435956485 122720891 164594741 4325531
<2406355 bytes omitted>

Output file

0.501989346
0.500503071
0.500702153
0.499649805
0.499833473
0.499549045
0.501742486
0.498521677
0.50
<1079960 bytes omitted>

Your output

0.50198935
0.50050307
0.50070215
0.49964980
0.49983347
0.49954904
0.50174249
0.49852168
0.50040007
0.49904392
0.49412701
0.49853
<246800 bytes omitted>
Test case #16
Time Limit Exceeded
Score: 0
Time: 1006 ms
Memory: 720 KiB

Input file

100000 100000
275210978 15762261 144776175 601050337 927021202 933438360 620903320 283999851 8993190
<2486772 bytes omitted>

Output file

0.499277799
0.500846297
0.500842851
0.501221003
0.502073494
0.500138699
0.501660132
0.509121455
0.50
<839084 bytes omitted>

Your output

0.49927780
0.50084630
0.50084285
0.50122100
0.50207349
0.50013870
0.50166013
0.50912145
0.50133369
0.50075421
0.50004522
0.50283
<235943 bytes omitted>
Test case #17
Time Limit Exceeded
Score: 0
Time: 1006 ms
Memory: 732 KiB

Input file

100000 100000
853626803 904893639 249684160 985105366 436508480 990728746 414053044 813470369 511309
<2567627 bytes omitted>

Output file

0.496255550
0.492308175
0.496088865
0.503578889
0.495974634
0.498651666
0.498281843
0.499071899
0.49
<597416 bytes omitted>

Your output

0.49625555
0.49230818
0.49608886
0.50357889
0.49597463
0.49865167
0.49828184
0.49907190
0.49654675
0.50147033
0.49819111
0.49781
<245469 bytes omitted>
Test case #18
Time Limit Exceeded
Score: 0
Time: 1007 ms
Memory: 740 KiB

Input file

100000 100000
842108036 499057720 354592145 664127692 945995759 48019133 57459665 932875479 97807514
<2646592 bytes omitted>

Output file

0.501893732
0.499557699
0.500946126
0.504327084
0.497914132
0.500713243
0.500589592
0.500101429
0.50
<359984 bytes omitted>

Your output

0.50189373
0.49955770
0.50094613
0.50432708
0.49791413
0.50071324
0.50058959
0.50010143
0.50779137
0.50114302
0.49790216
0.50087
<241278 bytes omitted>
Test case #19
Accepted
Score: 100
Time: 523 ms
Memory: 736 KiB

Input file

100000 100000
420523861 798254506 604724323 753215425 455483038 400276816 850609389 317121806 590065
<2726571 bytes omitted>

Output file

0.505252708
0.500164598
0.500661254
0.499315002
0.499652740
0.500006727
0.500387877
0.498720508
0.50
<120680 bytes omitted>

Your output

0.50525271
0.50016460
0.50066125
0.49931500
0.49965274
0.50000673
0.50038788
0.49872051
0.50117525
0.49965589
0.49965315
0.49933
<110587 bytes omitted>

Checker message

Accepted | 10065 numbers

System message

Exited with return code 0
Test case #20
Time Limit Exceeded
Score: 0
Time: 1004 ms
Memory: 744 KiB

Input file

100000 100000
125798856 241096426 834123662 439191615 796271788 520610841 196372716 146446355 344243
<2366956 bytes omitted>

Output file

0.500927171
0.499757023
0.500360362
0.499988480
0.499516151
0.500282960
0.500992331
0.502927920
0.49
<1199900 bytes omitted>

Your output

0.50092717
0.49975702
0.50036036
0.49998848
0.49951615
0.50028296
0.50099233
0.50292792
0.49899920
0.50198320
0.49979634
0.51459
<248395 bytes omitted>
Subtask #4
Time Limit Exceeded
Score: 0
Test case #1
Accepted
Score: 100
Time: 7 ms
Memory: 352 KiB

Input file

5 4
3 1 4 1 5
1 2 4
1 3 5
2 3 2
1 2 5

Output file

0.750000000
0.750000000
0.875000000

Your output

0.75000000
0.75000000
0.87500000

Checker message

Accepted | 3 numbers

System message

Exited with return code 0
Test case #2
Accepted
Score: 100
Time: 7 ms
Memory: 248 KiB

Input file

5 6
6 4 5 2 7
2 1 5
3 2 4 8
1 1 3
1 2 5
3 1 5 6
1 1 5

Output file

1.000000000
0.968750000
1.000000000

Your output

1.00000000
0.96875000
1.00000000

Checker message

Accepted | 3 numbers

System message

Exited with return code 0
Test case #3
Accepted
Score: 100
Time: 16 ms
Memory: 480 KiB

Input file

1 1000
512669271
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
<5917 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<11900 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #4
Accepted
Score: 100
Time: 13 ms
Memory: 360 KiB

Input file

1 1000
535738116
1 1 1
2 1 910192778
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1
<6730 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<10664 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<9739 bytes omitted>

Checker message

Accepted | 897 numbers

System message

Exited with return code 0
Test case #5
Accepted
Score: 100
Time: 12 ms
Memory: 440 KiB

Input file

1 1000
114153941
1 1 1
1 1 1
1 1 1
1 1 1
2 1 182244586
2 1 10608697
2 1 506350410
2 1 209229745
1 1 
<8177 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<8468 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<7726 bytes omitted>

Checker message

Accepted | 714 numbers

System message

Exited with return code 0
Test case #6
Accepted
Score: 100
Time: 6 ms
Memory: 252 KiB

Input file

1 1000
102635174
1 1 1
1 1 1
2 1 1785073
1 1 1
2 1 355024196
2 1 433306522
1 1 1
2 1 818921372
1 1 1
<9804 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<5984 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<5449 bytes omitted>

Checker message

Accepted | 507 numbers

System message

Exited with return code 0
Test case #7
Accepted
Score: 100
Time: 11 ms
Memory: 348 KiB

Input file

1 1000
681050998
1 1 1
2 1 549964256
2 1 111025383
2 1 923571007
1 1 1
2 1 266069755
1 1 1
2 1 42861
<11426 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<3524 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<3194 bytes omitted>

Checker message

Accepted | 302 numbers

System message

Exited with return code 0
Test case #8
Accepted
Score: 100
Time: 7 ms
Memory: 352 KiB

Input file

1 1000
964499527
2 1 475345126
2 1 783305468
2 1 660457181
2 1 864873426
2 1 580966393
2 1 688767580
<13062 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<1040 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<917 bytes omitted>

Checker message

Accepted | 95 numbers

System message

Exited with return code 0
Test case #9
Accepted
Score: 100
Time: 13 ms
Memory: 352 KiB

Input file

1000 1000
98924974 797820049 441936174 131623808 582217921 62666111 957262129 831251643 610737858 63
<19596 bytes omitted>

Output file

0.516697456
0.523311260
0.525145477
0.529696529
0.527125630
0.660464433
0.560459981
0.537734167
0.52
<11900 bytes omitted>

Your output

0.51669746
0.52331126
0.52514548
0.52969653
0.52712563
0.66046443
0.56045998
0.53773417
0.52513466
0.52690821
0.52862420
0.53226
<10872 bytes omitted>

Checker message

Accepted | 1000 numbers

System message

Exited with return code 0
Test case #10
Accepted
Score: 100
Time: 15 ms
Memory: 364 KiB

Input file

1000 1000
122034917 623191245 608186756 982290693 354324866 71842074 855742871 801766369 718373121 8
<20206 bytes omitted>

Output file

0.505176103
0.509168140
0.505036374
0.502937786
0.537584252
0.514597760
0.506738935
0.512236658
0.50
<10652 bytes omitted>

Your output

0.50517610
0.50916814
0.50503637
0.50293779
0.53758425
0.51459776
0.50673894
0.51223666
0.50812579
0.51910807
0.50429741
0.57915
<9728 bytes omitted>

Checker message

Accepted | 896 numbers

System message

Exited with return code 0
Test case #11
Accepted
Score: 100
Time: 13 ms
Memory: 492 KiB

Input file

1000 1000
260259254 922388030 713094741 366345723 158779441 569323949 353925300 626204183 330363241 
<21347 bytes omitted>

Output file

0.478231591
0.515036969
0.499545477
0.509769341
0.540424990
0.504132602
0.491502139
0.474842632
0.49
<8384 bytes omitted>

Your output

0.47823159
0.51503697
0.49954548
0.50976934
0.54042499
0.50413260
0.49150214
0.47484263
0.49443851
0.49306226
0.48542726
0.52657
<7649 bytes omitted>

Checker message

Accepted | 707 numbers

System message

Exited with return code 0
Test case #12
Accepted
Score: 100
Time: 13 ms
Memory: 468 KiB

Input file

1000 1000
543707783 811519408 818002727 45368048 668266720 626614335 587266512 155674701 502161874 2
<22635 bytes omitted>

Output file

0.504299382
0.500860135
0.487947259
0.495181606
0.503314415
0.508973770
1.000000000
0.500441715
0.50
<5792 bytes omitted>

Your output

0.50429938
0.50086013
0.48794726
0.49518161
0.50331441
0.50897377
1.00000000
0.50044172
0.50009033
0.49413180
0.49773023
0.49190
<5273 bytes omitted>

Checker message

Accepted | 491 numbers

System message

Exited with return code 0
Test case #13
Accepted
Score: 100
Time: 7 ms
Memory: 252 KiB

Input file

1000 1000
827156311 110716194 627943416 429423077 177753998 978872018 85448941 275079811 263895098 8
<23795 bytes omitted>

Output file

0.501407357
0.511577690
0.505485276
0.521804629
0.555614857
0.511073262
0.502356558
0.505759306
0.51
<3560 bytes omitted>

Your output

0.50140736
0.51157769
0.50548528
0.52180463
0.55561486
0.51107326
0.50235656
0.50575931
0.51241871
0.50545848
0.52402457
0.50057
<3227 bytes omitted>

Checker message

Accepted | 305 numbers

System message

Exited with return code 0
Test case #14
Accepted
Score: 100
Time: 8 ms
Memory: 500 KiB

Input file

1000 1000
405572136 704880275 27818697 813478107 542017085 36162405 583631370 804550329 875885219 76
<25039 bytes omitted>

Output file

0.510748847
0.515978563
0.508084606
0.520953158
0.516054030
0.511345630
0.514067009
0.513199391
0.53
<1004 bytes omitted>

Your output

0.51074885
0.51597856
0.50808461
0.52095316
0.51605403
0.51134563
0.51406701
0.51319939
0.53245316
0.50234896
0.51729830
0.51465
<884 bytes omitted>

Checker message

Accepted | 92 numbers

System message

Exited with return code 0
Test case #15
Time Limit Exceeded
Score: 0
Time: 1051 ms
Memory: 740 KiB

Input file

100000 100000
652748136 667547581 685053508 563305241 816922535 976132064 321376540 98229663 1233093
<2366537 bytes omitted>

Output file

0.498039519
0.499497436
0.503642391
0.498318035
0.496426250
0.502173129
0.497781818
0.503175199
0.50
<1199900 bytes omitted>

Your output

0.49803952
0.49949744
0.50364239
0.49831804
0.49642625
0.50217313
0.49778182
0.50317520
0.50053654
0.49814560
0.50224079
0.49954
<260022 bytes omitted>
Test case #16
Time Limit Exceeded
Score: 0
Time: 1050 ms
Memory: 748 KiB

Input file

100000 100000
696795154 716565476 39868189 216995307 267790819 435956485 122720891 164594741 4325531
<2406355 bytes omitted>

Output file

0.501989346
0.500503071
0.500702153
0.499649805
0.499833473
0.499549045
0.501742486
0.498521677
0.50
<1079960 bytes omitted>

Your output

0.50198935
0.50050307
0.50070215
0.49964980
0.49983347
0.49954904
0.50174249
0.49852168
0.50040007
0.49904392
0.49412701
0.49853
<246800 bytes omitted>
Test case #17
Time Limit Exceeded
Score: 0
Time: 1006 ms
Memory: 720 KiB

Input file

100000 100000
275210978 15762261 144776175 601050337 927021202 933438360 620903320 283999851 8993190
<2486772 bytes omitted>

Output file

0.499277799
0.500846297
0.500842851
0.501221003
0.502073494
0.500138699
0.501660132
0.509121455
0.50
<839084 bytes omitted>

Your output

0.49927780
0.50084630
0.50084285
0.50122100
0.50207349
0.50013870
0.50166013
0.50912145
0.50133369
0.50075421
0.50004522
0.50283
<235943 bytes omitted>
Test case #18
Time Limit Exceeded
Score: 0
Time: 1006 ms
Memory: 732 KiB

Input file

100000 100000
853626803 904893639 249684160 985105366 436508480 990728746 414053044 813470369 511309
<2567627 bytes omitted>

Output file

0.496255550
0.492308175
0.496088865
0.503578889
0.495974634
0.498651666
0.498281843
0.499071899
0.49
<597416 bytes omitted>

Your output

0.49625555
0.49230818
0.49608886
0.50357889
0.49597463
0.49865167
0.49828184
0.49907190
0.49654675
0.50147033
0.49819111
0.49781
<245469 bytes omitted>
Test case #19
Time Limit Exceeded
Score: 0
Time: 1007 ms
Memory: 740 KiB

Input file

100000 100000
842108036 499057720 354592145 664127692 945995759 48019133 57459665 932875479 97807514
<2646592 bytes omitted>

Output file

0.501893732
0.499557699
0.500946126
0.504327084
0.497914132
0.500713243
0.500589592
0.500101429
0.50
<359984 bytes omitted>

Your output

0.50189373
0.49955770
0.50094613
0.50432708
0.49791413
0.50071324
0.50058959
0.50010143
0.50779137
0.50114302
0.49790216
0.50087
<241278 bytes omitted>
Test case #20
Accepted
Score: 100
Time: 523 ms
Memory: 736 KiB

Input file

100000 100000
420523861 798254506 604724323 753215425 455483038 400276816 850609389 317121806 590065
<2726571 bytes omitted>

Output file

0.505252708
0.500164598
0.500661254
0.499315002
0.499652740
0.500006727
0.500387877
0.498720508
0.50
<120680 bytes omitted>

Your output

0.50525271
0.50016460
0.50066125
0.49931500
0.49965274
0.50000673
0.50038788
0.49872051
0.50117525
0.49965589
0.49965315
0.49933
<110587 bytes omitted>

Checker message

Accepted | 10065 numbers

System message

Exited with return code 0
Test case #21
Time Limit Exceeded
Score: 0
Time: 1004 ms
Memory: 744 KiB

Input file

100000 100000
125798856 241096426 834123662 439191615 796271788 520610841 196372716 146446355 344243
<2366956 bytes omitted>

Output file

0.500927171
0.499757023
0.500360362
0.499988480
0.499516151
0.500282960
0.500992331
0.502927920
0.49
<1199900 bytes omitted>

Your output

0.50092717
0.49975702
0.50036036
0.49998848
0.49951615
0.50028296
0.50099233
0.50292792
0.49899920
0.50198320
0.49979634
0.51459
<248395 bytes omitted>
Test case #22
Time Limit Exceeded
Score: 0
Time: 1003 ms
Memory: 720 KiB

Input file

100000 100000
756059859 96798187 486500581 901399282 476462349 66318202 240173724 717155327 39123527
<2641814 bytes omitted>

Output file

0.496796235
0.499443341
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<778424 bytes omitted>

Your output

0.49679624
0.49944334
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
0.63657364
1.00000
<201865 bytes omitted>
Test case #23
Time Limit Exceeded
Score: 0
Time: 1056 ms
Memory: 692 KiB

Input file

100000 100000
89025809 99222491 886047516 374589301 516168906 553314688 229523299 259572873 12133623
<2609890 bytes omitted>

Output file

0.501263383
0.497063656
1.000000000
1.000000000
1.000000000
0.999576804
1.000000000
1.000000000
1.00
<781016 bytes omitted>

Your output

0.50126338
0.49706366
1.00000000
1.00000000
1.00000000
0.99957680
1.00000000
1.00000000
1.00000000
0.99999418
1.00000000
1.00000
<201161 bytes omitted>
Test case #24
Time Limit Exceeded
Score: 0
Time: 1051 ms
Memory: 780 KiB

Input file

100000 100000
253541734 889947912 605905691 368165210 730926851 948305812 518438223 953425042 621252
<2810614 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
0.24
<539180 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
0.24313445
1.00000000
0.86917455
1.00000
<153663 bytes omitted>
Test case #25
Time Limit Exceeded
Score: 0
Time: 1042 ms
Memory: 876 KiB

Input file

100000 100000
358666877 152776074 263942811 250189481 10532172 142479526 384419133 676325214 2800882
<2762693 bytes omitted>

Output file

0.497966793
0.504884186
0.510109346
1.000000000
0.903411859
0.378571375
0.782366969
1.000000000
1.00
<535496 bytes omitted>

Your output

0.49796679
0.50488419
0.51010935
1.00000000
0.90341186
0.37857137
0.78236697
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<131927 bytes omitted>
Test case #26
Time Limit Exceeded
Score: 0
Time: 1052 ms
Memory: 860 KiB

Input file

100000 100000
310832120 533354532 285119313 980155331 985391353 270484910 501735426 189694758 996493
<2977311 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
0.791946821
1.000000000
1.000000000
1.00
<301412 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
0.79194682
1.00000000
1.00000000
1.00000000
1.00000000
0.81914583
1.00000
<97024 bytes omitted>
Test case #27
Time Limit Exceeded
Score: 0
Time: 1050 ms
Memory: 872 KiB

Input file

100000 100000
218242538 501296953 82029594 685598174 209928143 731644364 539314968 93077554 43884025
<2908341 bytes omitted>

Output file

0.500928261
1.000000000
0.420084697
1.000000000
1.000000000
1.000000000
1.000000000
1.000000000
1.00
<301460 bytes omitted>

Your output

0.50092826
1.00000000
0.42008470
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000000
1.00000
<91227 bytes omitted>
Test case #28
Time Limit Exceeded
Score: 0
Time: 1009 ms
Memory: 748 KiB

Input file

100000 100000
663089803 326504257 109557127 446921259 94631663 152472521 779999926 130997177 5214783
<3147605 bytes omitted>

Output file

1.000000000
1.000000000
0.926090701
1.000000000
1.000000000
1.000000000
1.000000000
0.997523503
1.00
<60536 bytes omitted>

Your output

1.00000000
1.00000000
0.92609070
1.00000000
1.00000000
1.00000000
1.00000000
0.99752350
1.00000000
0.73378654
1.00000000
1.00000
<24501 bytes omitted>
Test case #29
Time Limit Exceeded
Score: 0
Time: 1053 ms
Memory: 752 KiB

Input file

100000 100000
782850902 554850536 900116378 561198354 114356817 320809202 544467698 364605703 747335
<3058571 bytes omitted>

Output file

1.000000000
1.000000000
1.000000000
1.000000000
0.785512835
1.000000000
1.000000000
1.000000000
0.90
<59768 bytes omitted>

Your output

1.00000000
1.00000000
1.00000000
1.00000000
0.78551283
1.00000000
1.00000000
1.00000000
0.90216773
0.90454125
1.00000000
1.00000
<17813 bytes omitted>