QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#505485#8257. Marathon Race 2egypt_ioi2024_0552 662ms11704kbC++171.8kb2024-08-05 05:40:412024-08-05 05:40:44

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 7
Accepted

Test #1:

score: 7
Accepted
time: 1ms
memory: 7720kb

input:

1 500000
166666
10
0 0 500000
0 0 499999
0 0 499998
0 0 499997
0 0 499996
0 0 5
0 0 4
0 0 3
0 0 2
0 0 1

output:

Yes
Yes
No
No
No
No
No
No
No
No

result:

ok 10 token(s): yes count is 2, no count is 8

Test #2:

score: 7
Accepted
time: 1ms
memory: 7748kb

input:

1 500000
0
10
0 0 500000
0 0 499999
0 0 499998
0 0 499997
0 0 499996
0 0 5
0 0 4
0 0 3
0 0 2
0 0 1

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 10, no count is 0

Test #3:

score: 7
Accepted
time: 1ms
memory: 7724kb

input:

2 1
0 1
10
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10

output:

No
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 6, no count is 4

Test #4:

score: 7
Accepted
time: 1ms
memory: 7704kb

input:

3 1
0 0 1
10
0 0 1
0 0 2
0 0 3
0 0 4
0 0 5
0 0 6
0 0 7
0 0 8
0 0 9
0 0 10

output:

No
No
No
No
No
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 5, no count is 5

Test #5:

score: 7
Accepted
time: 1ms
memory: 7716kb

input:

1 1
0
10
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 10, no count is 0

Test #6:

score: 7
Accepted
time: 1ms
memory: 7720kb

input:

7 83382
35565 7347 27797 28072 31528 45377 43857
10
0 0 160004
0 0 224969
0 0 310304
0 0 354202
0 0 310303
0 0 493150
0 0 227687
0 0 448225
0 0 88396
0 0 155211

output:

No
No
Yes
Yes
No
Yes
No
Yes
No
No

result:

ok 10 token(s): yes count is 4, no count is 6

Test #7:

score: 7
Accepted
time: 1ms
memory: 7860kb

input:

7 83382
35212 3869 11565 53219 2927 45479 40671
10
0 0 189926
0 0 419739
0 0 245553
0 0 110218
0 0 299387
0 0 1986
0 0 473275
0 0 195521
0 0 299386
0 0 246039

output:

No
Yes
No
No
Yes
No
Yes
No
No
No

result:

ok 10 token(s): yes count is 3, no count is 7

Test #8:

score: 7
Accepted
time: 1ms
memory: 7652kb

input:

7 500000
6069 96930 28374 1275 53141 1423 6225
10
0 0 388080
0 0 73883
0 0 319880
0 0 141926
0 0 144641
0 0 67306
0 0 387304
0 0 387303
0 0 236649
0 0 130438

output:

Yes
No
No
No
No
No
Yes
No
No
No

result:

ok 10 token(s): yes count is 2, no count is 8

Test #9:

score: 7
Accepted
time: 1ms
memory: 7932kb

input:

7 500000
22379 39203 896 17806 23724 7599 153
10
0 0 492328
0 0 190173
0 0 315557
0 0 190172
0 0 138962
0 0 298883
0 0 246521
0 0 194070
0 0 252592
0 0 418531

output:

Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 8, no count is 2

Test #10:

score: 7
Accepted
time: 1ms
memory: 7704kb

input:

7 500000
0 0 0 0 0 0 0
10
0 0 124229
0 0 233729
0 0 306668
0 0 499999
0 0 220256
0 0 62117
0 0 115533
0 0 48137
0 0 160004
0 0 500000

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 10, no count is 0

Test #11:

score: 7
Accepted
time: 1ms
memory: 7696kb

input:

7 498000
498000 498000 498000 498000 498000 498000 498000
10
0 0 261154
0 0 235539
0 0 224636
0 0 283789
0 0 500000
0 0 480913
0 0 326331
0 0 499999
0 0 61700
0 0 280564

output:

No
No
No
No
No
No
No
No
No
No

result:

ok 10 token(s): yes count is 0, no count is 10

Subtask #2:

score: 7
Accepted

Dependency #1:

100%
Accepted

Test #12:

score: 7
Accepted
time: 1ms
memory: 7704kb

input:

1 2
1
8
0 0 3
0 0 4
0 2 3
0 2 4
2 0 3
2 0 4
2 2 3
2 2 4

output:

No
Yes
No
Yes
No
Yes
No
Yes

result:

ok 8 token(s): yes count is 4, no count is 4

Test #13:

score: 7
Accepted
time: 1ms
memory: 7656kb

input:

1 2
1
10
0 1 1
0 1 2
2 1 1
2 1 2
1 0 2
1 0 3
1 2 2
1 2 3
1 1 1
1 1 500000

output:

No
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 6, no count is 4

Test #14:

score: 7
Accepted
time: 1ms
memory: 7728kb

input:

3 11
1 5 10
10
2 6 40
2 6 41
1 6 39
1 6 40
0 6 40
0 6 41
2 7 38
2 7 39
2 5 36
2 5 37

output:

No
Yes
No
Yes
No
Yes
No
Yes
No
Yes

result:

ok 10 token(s): yes count is 5, no count is 5

Test #15:

score: 7
Accepted
time: 1ms
memory: 7584kb

input:

3 1
0 1 1
8
0 0 6
0 0 7
1 1 5
1 1 6
0 1 4
0 1 5
1 0 5
1 0 6

output:

No
Yes
No
Yes
No
Yes
No
Yes

result:

ok 8 token(s): yes count is 4, no count is 4

Test #16:

score: 7
Accepted
time: 1ms
memory: 7656kb

input:

1 499999
499999
10
0 499999 500000
0 499999 499999
0 499999 499998
0 499999 499997
0 499999 499996
0 499999 5
0 499999 4
0 499999 3
0 499999 2
0 499999 1

output:

Yes
No
No
No
No
No
No
No
No
No

result:

ok 10 token(s): yes count is 1, no count is 9

Test #17:

score: 7
Accepted
time: 1ms
memory: 7636kb

input:

1 249999
0
10
0 249999 500000
0 249999 499999
0 249999 499998
0 249999 499997
0 249999 499996
0 249999 5
0 249999 4
0 249999 3
0 249999 2
0 249999 1

output:

Yes
Yes
No
No
No
No
No
No
No
No

result:

ok 10 token(s): yes count is 2, no count is 8

Test #18:

score: 7
Accepted
time: 0ms
memory: 7636kb

input:

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

output:

No
No
No
No
No
No
No
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 3, no count is 7

Test #19:

score: 7
Accepted
time: 0ms
memory: 7644kb

input:

7 114381
99629 67979 86546 56087 63139 108255 68436
10
93017 26947 457994
68416 90149 398467
35162 8224 500000
93764 99122 353377
43358 112463 306282
26831 9795 500000
42369 15002 500000
6450 16746 500000
7483 81534 451399
104077 82098 359317

output:

No
No
No
No
Yes
No
No
No
Yes
Yes

result:

ok 10 token(s): yes count is 3, no count is 7

Test #20:

score: 7
Accepted
time: 0ms
memory: 7700kb

input:

7 156904
86214 84720 39018 38747 41086 17361 72963
10
20487 60246 473628
64601 77908 402948
131834 36311 458711
44757 12551 407379
137740 152086 500000
13822 41710 384936
54564 100719 445492
114985 55047 500000
93241 143516 500000
70481 91989 391569

output:

No
No
No
Yes
No
Yes
Yes
No
No
Yes

result:

ok 10 token(s): yes count is 4, no count is 6

Test #21:

score: 7
Accepted
time: 1ms
memory: 7856kb

input:

7 500000
250139 246072 286282 248011 246676 255434 285229
10
256986 250000 185280
249410 250000 192856
272916 250000 169350
248178 250000 194088
251192 250000 191073
282235 250000 160030
275248 250000 167017
286012 250000 156253
258808 250000 183458
281242 250000 161023

output:

Yes
Yes
Yes
Yes
No
No
No
No
Yes
No

result:

ok 10 token(s): yes count is 5, no count is 5

Test #22:

score: 7
Accepted
time: 1ms
memory: 7724kb

input:

7 500000
251721 246007 273667 246631 272904 242371 259470
10
259134 250000 187249
258860 250000 187524
266929 250000 179454
273220 250000 173163
264425 250000 181958
244659 250000 201725
262924 250000 183459
270049 250000 176334
252586 250000 193798
260138 250000 186246

output:

No
Yes
No
No
No
Yes
No
No
Yes
Yes

result:

ok 10 token(s): yes count is 4, no count is 6

Test #23:

score: 7
Accepted
time: 1ms
memory: 7852kb

input:

4 39
0 39 14 20
10
1 18 183
1 17 179
1 20 181
1 19 187
1 21 187
1 21 186
1 19 186
1 20 182
1 18 184
1 17 178

output:

No
Yes
No
Yes
Yes
No
No
Yes
Yes
No

result:

ok 10 token(s): yes count is 5, no count is 5

Test #24:

score: 7
Accepted
time: 1ms
memory: 7648kb

input:

7 11559
11559 3854 5780 5459 0 5450 5395
10
1 5449 56325
1 5451 56325
1 5450 56317
1 5451 56324
1 5450 56316
1 5449 56324
1 5452 56318
1 5453 56310
1 5452 56319
1 5453 56311

output:

Yes
Yes
Yes
No
No
No
No
No
Yes
Yes

result:

ok 10 token(s): yes count is 5, no count is 5

Test #25:

score: 7
Accepted
time: 1ms
memory: 7636kb

input:

7 500000
406504 89878 390399 370409 54693 476604 453724
10
126698 445272 440210
351011 218369 87645
428029 290511 178440
420476 425145 401909
135002 472110 132021
464516 234410 2940
377365 27345 249120
117317 225894 16595
405890 313165 275519
182674 23770 82121

output:

No
No
No
No
No
No
No
No
No
No

result:

ok 10 token(s): yes count is 0, no count is 10

Subtask #3:

score: 10
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #26:

score: 10
Accepted
time: 1ms
memory: 7920kb

input:

14 49234
4353 33883 17839 23172 2565 2001 8926 10827 27712 24128 13160 16114 19986 27152
10
36174 40125 402243
28576 6147 297365
9792 2662 268578
14678 26965 306810
21548 41236 404281
23206 33793 296994
332 32354 299043
43712 26967 297405
41578 26759 298391
6834 38663 350972

output:

Yes
Yes
Yes
No
No
No
No
Yes
Yes
No

result:

ok 10 token(s): yes count is 5, no count is 5

Test #27:

score: 10
Accepted
time: 0ms
memory: 7856kb

input:

14 49234
35357 48876 29294 47912 36888 34478 44998 30220 8017 9998 3011 33083 23921 24890
10
20474 4736 468945
47725 13547 500000
4873 39322 454688
9333 39593 455083
4988 6332 500000
40610 27777 475727
6083 10941 500000
578 39990 445239
27011 21260 462001
42787 7013 480786

output:

Yes
No
Yes
Yes
No
No
No
Yes
No
No

result:

ok 10 token(s): yes count is 4, no count is 6

Test #28:

score: 10
Accepted
time: 1ms
memory: 7720kb

input:

14 500000
254591 246898 268510 259754 242758 245928 253337 249866 234405 242095 269427 235264 252766 241719
10
253094 250000 373556
266269 250000 360381
247752 250000 378897
239143 250000 387507
243837 250000 382812
266284 250000 360365
256010 250000 370639
246874 250000 379776
249027 250000 377623
...

output:

Yes
Yes
No
Yes
No
No
No
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 6, no count is 4

Test #29:

score: 10
Accepted
time: 1ms
memory: 7924kb

input:

14 500000
235818 249056 242255 249428 252698 248009 248826 242766 261563 247430 241881 216634 250418 245970
10
218417 250000 294040
236009 250000 311632
244058 250000 319682
244444 250000 320067
229429 250000 305052
257307 250000 316050
224198 250000 299821
258537 250000 314821
221287 250000 296910
...

output:

No
No
Yes
No
No
No
No
Yes
No
Yes

result:

ok 10 token(s): yes count is 3, no count is 7

Test #30:

score: 10
Accepted
time: 0ms
memory: 7724kb

input:

8 102279
48228 34094 0 48218 48299 51140 47731 102279
10
1 48227 498414
1 48227 498415
1 48228 498406
1 48225 498399
1 48229 498415
1 48226 498407
1 48225 498398
1 48226 498408
1 48229 498414
1 48228 498405

output:

No
Yes
Yes
Yes
Yes
No
No
Yes
No
No

result:

ok 10 token(s): yes count is 5, no count is 5

Test #31:

score: 10
Accepted
time: 1ms
memory: 7588kb

input:

14 500000
103088 143766 204273 435727 174096 366266 158520 28965 446289 495003 373615 229459 323969 117713
10
321968 416395 78738
118842 181846 106626
240655 41869 325999
147511 19476 215749
490202 92477 306569
302617 8225 350578
101210 494049 12408
102039 352144 222467
126714 428479 351252
66348 40...

output:

No
No
No
No
No
No
No
No
No
No

result:

ok 10 token(s): yes count is 0, no count is 10

Test #32:

score: 10
Accepted
time: 1ms
memory: 7920kb

input:

14 30000
5 29994 29997 6 4 2 29998 3 29999 0 30000 29996 1 29995
10
15000 15000 479972
15003 15000 479969
14997 15000 479969
14996 15000 479968
15005 15000 479967
15002 15000 479970
14999 15000 479971
14998 15000 479970
15004 15000 479968
15001 15000 479971

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 10, no count is 0

Subtask #4:

score: 28
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #33:

score: 28
Accepted
time: 22ms
memory: 9708kb

input:

97 6647
2603 1696 5660 220 3836 1237 2529 3084 4206 5217 4505 1659 4358 6016 828 4601 757 5423 527 2355 393 4183 2597 6354 4489 5869 3178 4953 2141 1666 6031 4245 6022 6433 50 2911 1008 229 5334 402 6403 488 625 1136 3908 5583 1398 6374 3998 1000 1055 5437 588 2618 1012 5147 5185 5126 5995 4373 6238...

output:

No
Yes
No
No
Yes
No
Yes
Yes
Yes
No

result:

ok 10 token(s): yes count is 5, no count is 5

Test #34:

score: 28
Accepted
time: 23ms
memory: 9712kb

input:

100 6647
5679 833 5059 1113 2905 3249 5084 492 3460 6011 6281 3992 525 1654 641 3861 2370 6478 6168 1473 4402 2041 6009 295 5678 2301 1403 2407 12 1426 1724 3789 4785 114 754 2145 1163 5986 4595 2217 6260 85 1334 2607 998 1422 1712 4458 87 4823 275 4501 2669 4663 2807 4819 2565 2523 931 2086 2151 56...

output:

No
Yes
No
No
Yes
No
Yes
No
Yes
Yes

result:

ok 10 token(s): yes count is 5, no count is 5

Test #35:

score: 28
Accepted
time: 22ms
memory: 9912kb

input:

98 500000
249593 249971 249810 249768 249739 249550 250017 249558 247629 249928 248598 249915 249818 249898 249341 250273 242654 249949 250143 249854 250210 249903 257398 250079 246802 249292 249783 249156 250009 256058 248869 255127 250761 249941 249658 250275 248464 249221 249600 249914 249059 249...

output:

Yes
Yes
No
No
Yes
Yes
No
Yes
No
No

result:

ok 10 token(s): yes count is 5, no count is 5

Test #36:

score: 28
Accepted
time: 21ms
memory: 9688kb

input:

99 500000
250265 250465 248524 241711 249889 249962 249687 250064 256378 239774 242154 250015 250470 249900 249880 243388 249083 249184 249991 252923 249991 250065 250349 250406 253052 249142 249201 249847 249208 250134 249051 249327 249964 249729 250372 250000 243498 249946 249081 249821 245900 249...

output:

No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 8, no count is 2

Test #37:

score: 28
Accepted
time: 22ms
memory: 7644kb

input:

100 100000
99988 98583 97519 99255 98930 95578 99551 97209 99273 99887 95793 78552 95515 99726 98163 97262 99497 99737 83718 99077 93612 99576 98813 69987 99851 99700 98931 98867 98823 99661 99935 98297 96589 99655 68783 98946 99653 99936 96739 98662 97960 97890 81460 99978 99678 98061 95334 99951 9...

output:

No
No
Yes
No
No
Yes
No
Yes
No
No

result:

ok 10 token(s): yes count is 3, no count is 7

Test #38:

score: 28
Accepted
time: 20ms
memory: 9716kb

input:

100 500000
226748 315353 147247 489284 59180 135687 471934 360869 456251 280874 327516 138729 166382 180807 87410 497399 205532 436198 471204 282107 378262 388850 372073 88485 381405 449452 173300 40157 294418 197754 386016 301740 320197 13947 287366 71738 200507 247745 188893 261255 453551 325969 2...

output:

No
No
No
No
No
No
No
No
No
No

result:

ok 10 token(s): yes count is 0, no count is 10

Test #39:

score: 28
Accepted
time: 23ms
memory: 7932kb

input:

100 4000
49 29 3960 3983 3965 3957 42 3956 3973 3968 3991 3994 3981 35 3975 3955 13 19 1 3952 3986 3982 41 3990 14 44 4000 6 3979 3999 3985 3989 3953 3988 40 34 3 46 17 3962 3964 3969 3992 3974 3993 3954 39 3997 16 8 37 3961 3963 3998 33 18 3995 45 3959 48 10 2 20 32 21 22 3977 11 3978 9 24 38 26 47...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 10, no count is 0

Subtask #5:

score: 0
Wrong Answer

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #40:

score: 0
Wrong Answer
time: 662ms
memory: 11704kb

input:

1997 308
70 61 57 307 81 83 26 224 107 133 59 146 277 283 272 287 177 168 57 81 54 160 190 277 218 272 144 29 70 296 80 189 53 290 192 71 285 44 80 176 119 283 110 187 49 208 136 5 19 212 203 67 287 239 35 266 283 134 50 147 221 281 78 93 94 104 308 191 233 12 29 61 90 28 253 150 175 284 242 151 218...

output:

No
No
No
No
No
No
No
No
No
No

result:

wrong answer expected YES, found NO [3rd token]

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

0%