QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#488286 | #8921. Интерактивные переходы | Milmon | 100 ✓ | 64ms | 17444kb | C++14 | 1.7kb | 2024-07-23 19:59:55 | 2024-07-23 19:59:55 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
Subtask #1:
score: 4
Accepted
Test #1:
score: 4
Accepted
time: 2ms
memory: 8180kb
input:
230 1 0 0 1 0 1 2 0 0 0 2 0 1 0 2 0 0 1 2 0 1 1 2 1 1 2 1 0 0 2 1 1 2 1 1 0 2 1 1 2 1 0 1 2 1 1 2 1 1 1 2 1 1 2 0 0 0 2 1 1 2 0 1 0 2 1 1 2 0 0 1 2 1 1 2 0 1 1 3 0 0 0 0 3 0 1 0 0 3 0 0 1 0 3 0 1 1 0 3 0 0 0 1 3 0 1 0 1 3 0 0 1 1 3 0 1 1 1 3 1 1 2 1 0 0 0 3 1 1 2 1 1 0 0 3 1 1 2 1 0 1 0 3 1 1 2 1 1 ...
output:
YES 1 1 0 YES 1 1 1 YES 2 1 0 2 0 YES 2 1 1 2 0 YES 2 1 0 2 1 YES 2 1 1 2 1 NO YES 3 1 1 2 1 2 0 YES 3 2 1 1 1 1 0 YES 2 1 1 2 1 YES 2 1 0 2 0 YES 3 2 0 1 0 1 1 YES 3 1 0 2 0 2 1 NO YES 3 1 0 2 0 3 0 YES 3 1 1 2 0 3 0 YES 3 1 0 2 1 3 0 YES 3 1 1 2 1 3 0 YES 3 1 0 2 0 3 1 YES 3 1 1 2 0 3 1 YES 3 1 0 ...
result:
ok ok (230 test cases)
Subtask #2:
score: 10
Accepted
Test #2:
score: 10
Accepted
time: 2ms
memory: 8412kb
input:
222 5 9 1 2 1 2 4 1 3 5 0 4 5 1 2 3 0 3 4 0 1 3 0 2 5 1 1 4 1 1 0 0 1 1 5 9 2 5 0 1 2 0 2 3 0 1 4 0 3 5 1 3 4 0 2 4 0 1 5 0 1 3 0 0 0 1 0 0 5 9 3 4 0 1 2 0 3 5 1 2 4 0 1 3 0 2 5 0 2 3 0 1 4 0 4 5 1 0 0 0 0 1 5 9 3 5 0 2 3 0 1 2 0 3 4 0 1 3 0 2 4 1 4 5 1 1 5 0 2 5 0 0 0 0 1 0 5 9 1 3 0 2 4 1 1 2 0 4 ...
output:
YES 11 3 0 5 0 4 0 1 0 5 1 2 1 4 1 2 1 1 1 2 1 2 0 YES 9 1 0 3 0 2 0 3 0 4 0 3 0 3 1 5 1 5 0 YES 8 1 0 2 0 5 0 5 1 3 1 4 1 3 0 4 0 YES 8 1 0 3 0 4 0 4 1 2 1 5 1 2 0 5 0 YES 10 1 0 3 0 2 0 4 1 5 1 5 0 3 0 2 0 3 1 2 1 YES 10 3 0 1 0 2 0 5 0 4 0 2 0 1 0 4 1 2 1 1 1 YES 10 2 1 3 1 5 1 4 1 3 1 5 0 1 0 3 ...
result:
ok ok (222 test cases)
Test #3:
score: 10
Accepted
time: 1ms
memory: 8508kb
input:
1 6 7 1 2 1 2 3 0 2 4 1 2 5 1 3 6 1 4 5 0 5 6 0 1 1 0 0 0 1
output:
NO
result:
ok ok (1 test case)
Test #4:
score: 10
Accepted
time: 0ms
memory: 9264kb
input:
250 6 8 1 6 1 3 4 1 2 5 0 2 6 1 5 6 1 3 6 1 4 6 1 4 5 0 0 1 1 1 0 1 6 8 2 4 1 5 6 1 1 3 0 2 5 1 3 5 0 1 5 0 2 3 0 3 4 0 0 1 0 1 1 1 6 8 1 4 0 3 5 0 2 3 1 1 3 0 3 6 0 3 4 1 2 5 1 5 6 0 0 1 0 1 0 0 6 8 2 4 0 1 6 1 1 2 0 3 5 1 4 5 1 1 5 1 2 6 0 2 5 0 0 0 1 1 1 1 6 8 2 3 1 1 3 1 1 4 1 4 6 1 4 5 1 2 5 0 ...
output:
YES 10 3 1 6 1 1 1 5 1 1 0 5 0 2 0 4 0 2 1 4 1 YES 10 1 0 5 0 3 0 5 0 2 0 4 0 6 1 5 1 2 1 4 1 YES 10 1 0 4 0 2 1 3 1 5 1 6 0 4 1 3 1 5 0 3 0 YES 11 2 0 4 0 6 0 5 0 3 1 4 1 6 1 1 1 5 1 1 1 1 0 YES 9 1 1 3 1 2 1 4 1 6 1 2 0 5 0 6 0 5 1 YES 10 1 1 2 1 5 1 6 0 3 0 4 0 2 0 4 0 3 1 4 1 YES 9 3 1 1 1 4 1 5...
result:
ok ok (250 test cases)
Test #5:
score: 10
Accepted
time: 0ms
memory: 8848kb
input:
100 14 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 14 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 14 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 14 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 14 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 14 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 14 0 0 0 0 0 0 0 1 0 0 1 0 1 0 1 14 0 0 1 0 1 1 0 0 1 0 1 0 0 0 1 14 0 0 0 1 0 0 1 0 1 1 1 1 0 1 1...
output:
YES 14 1 1 2 0 3 0 4 1 5 0 6 1 7 0 8 1 9 0 10 0 11 0 12 1 13 1 14 0 YES 14 1 0 2 0 3 1 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 1 14 0 YES 14 1 0 2 0 3 0 4 0 5 1 6 0 7 0 8 0 9 0 10 1 11 0 12 1 13 1 14 0 YES 14 1 0 2 0 3 1 4 1 5 0 6 0 7 0 8 1 9 0 10 0 11 0 12 0 13 1 14 0 YES 14 1 0 2 1 3 1 4 0 5 1 6...
result:
ok ok (100 test cases)
Subtask #3:
score: 8
Accepted
Test #6:
score: 8
Accepted
time: 28ms
memory: 8636kb
input:
4000 20 25 14 18 1 14 16 1 2 18 1 2 3 1 11 17 1 4 17 1 10 14 1 2 7 1 11 12 1 6 8 1 15 20 1 6 17 1 7 8 1 7 9 1 7 16 1 17 19 1 1 17 1 12 17 1 2 17 1 11 20 1 3 8 1 11 19 1 5 14 1 2 13 1 3 16 1 1 1 0 1 1 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 20 25 3 15 1 12 17 1 5 12 1 9 14 1 15 17 1 9 10 1 5 14 1 7 20 1 10 18 ...
output:
YES 31 1 1 2 1 3 1 13 1 4 1 5 1 14 1 6 1 7 1 9 1 8 1 3 1 10 1 14 1 11 1 12 1 15 1 16 1 14 1 3 1 17 1 12 1 18 1 14 1 19 1 20 1 13 0 9 0 3 0 12 0 14 0 YES 32 1 0 4 1 6 1 5 1 7 1 20 1 8 1 13 1 3 1 9 1 2 1 10 1 18 1 20 1 12 1 5 1 14 1 5 1 15 1 3 1 11 1 16 1 5 1 17 1 19 1 13 0 2 0 18 0 20 0 3 0 11 0 5 0 ...
result:
ok ok (4000 test cases)
Test #7:
score: 8
Accepted
time: 18ms
memory: 9452kb
input:
1 100000 99999 1 87012 1 1 87571 1 2 73382 1 3 3711 1 3 15350 1 3 46773 1 3 56986 1 5 38515 1 5 70500 1 5 85371 1 6 7257 1 6 16656 1 6 47387 1 6 72385 1 6 90108 1 7 14999 1 7 61148 1 7 75467 1 7 87271 1 9 65212 1 9 67960 1 10 7122 1 10 21728 1 11 5206 1 11 24063 1 11 32274 1 12 69255 1 13 48758 1 13...
output:
NO
result:
ok ok (1 test case)
Test #8:
score: 8
Accepted
time: 36ms
memory: 12444kb
input:
1 100000 99999 1 35181 1 2 42232 1 3 13315 1 4 27383 1 4 67403 1 8 16000 1 8 57200 1 8 83634 1 9 38773 1 9 48963 1 9 75230 1 9 90121 1 10 35736 1 11 4072 1 11 13341 1 11 26005 1 12 79774 1 14 7232 1 14 8821 1 14 33012 1 14 41943 1 14 68173 1 14 78849 1 14 91086 1 14 95531 1 15 5822 1 15 49700 1 18 3...
output:
YES 179542 1 1 35181 1 2 1 42232 1 3 1 13315 1 4 1 67403 1 5 0 6 0 7 0 9 1 38773 1 48963 1 75230 1 13 0 14 1 8821 1 41943 1 68173 1 78849 1 91086 1 16 0 17 0 18 1 34594 1 49144 1 78855 1 20 0 21 1 37604 1 23 0 24 1 13195 1 28563 1 33935 1 50938 1 26 1 84079 1 28 1 40158 1 29 0 30 0 31 1 19099 1 6709...
result:
ok ok (1 test case)
Test #9:
score: 8
Accepted
time: 9ms
memory: 8704kb
input:
1 50000 49998 1 11048 1 1 12289 1 2 12244 1 2 31474 1 5 8297 1 5 28740 1 5 42907 1 6 3977 1 7 30422 1 8 24707 1 9 2499 1 9 13069 1 9 25545 1 10 26569 1 10 33390 1 11 1042 1 11 1769 1 12 15195 1 12 26515 1 12 44207 1 13 19568 1 13 21995 1 14 13136 1 15 17511 1 15 20144 1 15 34964 1 15 48216 1 16 1882...
output:
NO
result:
ok ok (1 test case)
Test #10:
score: 8
Accepted
time: 19ms
memory: 9820kb
input:
1 50000 49998 1 33649 1 1 38342 1 2 16465 1 2 45368 1 2 48541 1 3 14297 1 3 14338 1 3 43149 1 5 24062 1 5 40478 1 6 39136 1 7 8171 1 7 47461 1 8 41007 1 9 38951 1 9 47384 1 9 49343 1 10 20889 1 10 33345 1 11 11776 1 11 38722 1 12 44642 1 13 490 1 13 9412 1 13 26137 1 13 32356 1 13 39692 1 14 31978 1...
output:
YES 89921 4 0 5 1 24062 1 7 1 8171 1 47461 1 8 1 41007 1 10 1 20889 1 33345 1 11 1 11776 1 38722 1 13 1 9412 1 32356 1 18 0 20 1 7281 1 21 1 3399 1 29545 1 32928 1 23 0 24 1 46768 1 26 1 16158 1 39448 1 41038 1 27 0 30 1 35917 1 31 1 6220 1 15182 1 32 0 33 1 1630 1 15286 1 45607 1 35 1 32510 1 36 1 ...
result:
ok ok (1 test case)
Subtask #4:
score: 6
Accepted
Test #11:
score: 6
Accepted
time: 31ms
memory: 8044kb
input:
10000 10 9 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 1 7 0 1 8 0 1 9 0 1 10 0 0 0 0 0 0 0 1 1 0 0 10 9 1 2 1 1 3 0 1 4 1 1 5 1 1 6 1 1 7 1 1 8 1 1 9 1 1 10 0 1 1 0 0 1 1 1 0 1 0 10 9 1 2 1 1 3 1 1 4 1 1 5 1 1 6 1 1 7 1 1 8 1 1 9 1 1 10 1 1 0 0 0 1 1 0 0 1 0 10 9 1 2 0 1 3 0 1 4 1 1 5 1 1 6 0 1 7 1 1 8 1 1 9 1 1...
output:
YES 12 1 0 7 0 8 0 2 0 3 0 4 0 5 0 6 0 9 0 10 0 7 1 8 1 YES 14 2 1 3 0 1 0 5 1 6 1 7 1 9 1 10 0 1 0 1 1 4 1 8 1 4 0 8 0 YES 16 1 1 2 1 3 1 4 1 7 1 8 1 10 1 5 1 6 1 9 1 2 0 3 0 4 0 7 0 8 0 10 0 YES 16 2 0 3 0 4 1 1 1 5 1 1 1 6 0 7 1 1 1 8 1 1 1 9 1 1 1 10 1 1 1 1 0 YES 12 2 1 3 1 4 1 5 1 6 1 7 1 9 1 ...
result:
ok ok (10000 test cases)
Test #12:
score: 6
Accepted
time: 28ms
memory: 9648kb
input:
100 1000 999 1 2 1 1 3 1 1 4 1 1 5 1 1 6 1 1 7 1 1 8 1 1 9 1 1 10 1 1 11 1 1 12 1 1 13 1 1 14 1 1 15 1 1 16 1 1 17 1 1 18 1 1 19 1 1 20 1 1 21 1 1 22 1 1 23 1 1 24 1 1 25 1 1 26 1 1 27 1 1 28 1 1 29 1 1 30 1 1 31 1 1 32 1 1 33 1 1 34 1 1 35 1 1 36 1 1 37 1 1 38 0 1 39 1 1 40 1 1 41 1 1 42 1 1 43 1 1...
output:
YES 1514 2 1 5 1 6 1 7 1 8 1 12 1 15 1 16 1 17 1 19 1 21 1 24 1 27 1 30 1 31 1 32 1 38 0 1 0 40 1 41 1 42 1 44 0 1 0 45 1 46 0 1 0 51 1 52 1 53 1 54 1 58 1 60 0 1 0 63 1 64 1 66 1 69 1 72 1 81 1 82 1 83 1 84 1 85 1 86 1 87 0 1 0 88 1 91 1 92 1 93 1 94 0 1 0 96 1 98 0 1 0 101 1 102 1 103 1 105 0 1 0 ...
result:
ok ok (100 test cases)
Test #13:
score: 6
Accepted
time: 27ms
memory: 12584kb
input:
1 100000 99999 1 2 1 1 3 1 1 4 1 1 5 1 1 6 1 1 7 1 1 8 1 1 9 1 1 10 1 1 11 1 1 12 1 1 13 0 1 14 0 1 15 0 1 16 0 1 17 0 1 18 1 1 19 1 1 20 1 1 21 0 1 22 0 1 23 1 1 24 1 1 25 0 1 26 0 1 27 1 1 28 0 1 29 0 1 30 0 1 31 1 1 32 0 1 33 0 1 34 0 1 35 0 1 36 1 1 37 1 1 38 1 1 39 0 1 40 1 1 41 0 1 42 1 1 43 0...
output:
YES 149980 2 1 3 1 4 1 6 1 8 1 9 1 10 1 12 1 13 0 1 0 14 0 1 0 15 0 1 0 16 0 1 0 17 0 1 0 19 1 21 0 1 0 22 0 1 0 23 1 24 1 25 0 1 0 26 0 1 0 27 1 28 0 1 0 29 0 1 0 30 0 1 0 31 1 32 0 1 0 33 0 1 0 34 0 1 0 35 0 1 0 36 1 37 1 38 1 39 0 1 0 40 1 41 0 1 0 42 1 43 0 1 0 44 0 1 0 45 0 1 0 46 0 1 0 47 0 1 ...
result:
ok ok (1 test case)
Subtask #5:
score: 6
Accepted
Test #14:
score: 6
Accepted
time: 46ms
memory: 13140kb
input:
1 100000 199997 1 19238 0 1 42340 0 1 50103 0 1 72140 0 1 94374 0 2 918 1 2 30562 1 2 48451 1 2 53070 1 2 77905 1 3 56418 0 3 61803 0 4 19423 0 4 33995 0 4 64168 0 4 83220 0 4 87239 0 5 24531 1 5 45512 1 6 23321 1 6 34013 1 6 36584 1 6 37278 1 7 16740 1 7 23485 1 7 63378 1 7 71568 1 7 80434 1 7 8103...
output:
YES 199840 1 0 42340 0 72140 0 94374 0 2 1 918 1 30562 1 48451 1 53070 1 3 0 4 0 19423 0 83220 0 87239 0 5 1 45512 1 6 1 34013 1 37278 1 7 1 16740 1 23485 1 63378 1 8 1 51638 1 55137 1 68170 1 9 1 19878 1 10 1 99163 1 11 1 11147 1 18011 1 24776 1 48006 1 94142 1 12 1 34486 1 70673 1 76515 1 13 1 689...
result:
ok ok (1 test case)
Test #15:
score: 6
Accepted
time: 41ms
memory: 12204kb
input:
1 100000 199990 1 12954 0 1 34837 0 1 56925 0 2 2727 0 2 23291 0 2 34498 0 2 83496 0 3 18494 0 3 38160 0 3 95686 0 4 4643 0 4 42952 0 4 60758 0 4 74112 0 5 5226 0 5 99964 0 6 25938 0 6 29934 0 6 95643 0 7 12538 0 7 15788 0 7 36142 0 7 83988 0 7 87408 0 8 51940 0 8 89269 0 8 95253 0 9 8664 0 9 46696 ...
output:
YES 136327 1 0 12954 0 2 0 23291 0 3 0 4 0 4643 0 42952 0 5 0 6 0 25938 0 7 0 8 0 9 0 10 0 15360 0 39343 0 11 0 12 0 83509 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 38043 0 20 1 19080 1 44517 1 57925 1 71409 1 77929 1 21 1 22 0 23 0 24 0 25 0 8834 0 26 0 85860 0 27 0 32498 0 28 0 29 0 30 0 31 0 32 0 33 0...
result:
ok ok (1 test case)
Test #16:
score: 6
Accepted
time: 43ms
memory: 12268kb
input:
1 100000 199993 1 35659 1 1 40405 1 1 42576 1 1 59472 1 1 93456 1 2 5554 1 2 13807 1 2 16320 1 2 72601 1 2 89825 1 4 39136 1 4 56509 1 4 91423 1 5 8219 1 5 38830 1 5 42490 1 5 85394 1 5 99701 1 6 9204 0 6 25338 0 6 33566 0 6 56606 0 6 63549 0 7 3241 1 7 52579 1 7 75681 1 7 97174 1 8 18865 1 8 30353 ...
output:
YES 135345 1 1 2 1 5554 1 72601 1 3 0 4 1 5 1 6 0 9204 0 25338 0 33566 0 56606 0 63549 0 7 1 97174 1 8 1 9 1 10 1 9853 1 11 1 12 1 13 1 15721 1 14 1 15 1 16 1 17 0 72789 0 18 0 23688 0 56160 0 19 1 20 1 37985 1 21 1 22 1 2816 1 23 1 6824 1 24 1 25 1 26 1 27 1 28 1 76090 1 29 1 30 1 31 1 32 1 52957 1...
result:
ok ok (1 test case)
Test #17:
score: 6
Accepted
time: 47ms
memory: 11792kb
input:
1 50000 199980 1 5699 0 1 7972 0 1 12001 0 1 21408 0 1 22748 0 1 23379 0 1 28184 0 1 34803 0 1 36835 0 1 47782 0 2 4067 1 2 4247 1 2 5958 1 2 10022 1 2 13882 1 2 18781 1 2 22215 1 2 29259 1 2 40478 1 2 47186 1 3 10820 0 3 11187 0 3 13770 0 3 14191 0 3 31138 0 3 32240 0 3 41566 0 3 46910 0 3 46981 0 ...
output:
YES 149795 1 0 5699 0 12001 0 34803 0 36835 0 47782 0 2 1 4067 1 5958 1 10022 1 13882 1 3 0 10820 0 13770 0 14191 0 46910 0 46981 0 4 0 3428 0 10165 0 10529 0 18361 0 43086 0 47102 0 5 1 13060 1 26706 1 26747 1 31819 1 40937 1 6 1 17259 1 18543 1 28866 1 7 1 42390 1 8 1 2194 1 25225 1 37849 1 9 1 17...
result:
ok ok (1 test case)
Test #18:
score: 6
Accepted
time: 38ms
memory: 10404kb
input:
1 50000 199984 1 25616 0 1 28351 0 1 32669 0 1 39879 0 1 40034 0 1 46455 0 2 3271 0 2 6427 0 2 14884 0 2 16854 0 2 17651 0 2 32673 0 2 41393 0 2 43967 0 2 44086 0 2 44357 0 3 2536 1 3 7684 1 3 12630 1 3 15608 1 3 17831 1 3 18085 1 3 18694 1 3 18753 1 3 26697 1 3 31231 1 3 41382 1 3 41549 1 3 43442 1...
output:
YES 85037 1 0 32669 0 2 0 32673 0 44086 0 3 1 2536 1 7684 1 12630 1 15608 1 17831 1 18085 1 26697 1 31231 1 41382 1 41549 1 43442 1 45533 1 4 0 19596 0 5 0 6 0 7 1 1495 1 15445 1 34917 1 36132 1 37443 1 37691 1 45477 1 8 0 25201 0 37295 0 40736 0 9 1 1185 1 1843 1 6278 1 21717 1 27045 1 30261 1 4348...
result:
ok ok (1 test case)
Test #19:
score: 6
Accepted
time: 36ms
memory: 10780kb
input:
1 50000 199987 1 7346 1 1 9333 1 1 10752 1 1 22449 1 1 26223 1 1 31067 1 1 36063 1 1 39164 1 2 26857 1 2 27426 1 2 45924 1 2 49776 1 3 3534 1 3 4872 1 3 11112 1 3 18587 1 3 19344 1 3 46857 1 4 5591 1 4 10896 1 4 28314 1 4 32866 1 4 36674 1 4 42045 1 5 2392 1 5 17180 1 5 31349 1 5 34495 1 5 40344 1 5...
output:
YES 85967 1 1 22449 1 2 1 3 1 4 1 42045 1 5 1 6 1 23776 1 7 1 37643 1 8 1 9 1 10 1 11 1 12 0 1126 0 3358 0 5644 0 7159 0 12472 0 26924 0 40790 0 48763 0 13 1 14 1 15 1 16 1 17 1 32797 1 18 1 38564 1 41971 1 19 1 5427 1 20 1 16401 1 21 1 13703 1 46843 1 49243 1 22 1 23 1 26176 1 24 1 25 1 26 1 36277 ...
result:
ok ok (1 test case)
Test #20:
score: 6
Accepted
time: 37ms
memory: 10500kb
input:
1 100000 199995 1 11260 1 1 36669 1 1 65689 1 2 40027 1 3 11510 1 3 22649 1 3 41557 1 3 55383 1 3 94145 1 4 29777 1 4 34184 1 4 82941 1 4 98660 1 5 70248 1 6 1352 1 6 41406 1 6 50445 1 6 61232 1 6 67229 1 7 24577 1 7 36777 1 7 54446 1 8 5817 1 8 48484 1 9 37743 1 9 41038 1 9 57888 1 9 91818 1 10 708...
output:
YES 100000 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 1 60 ...
result:
ok ok (1 test case)
Test #21:
score: 6
Accepted
time: 38ms
memory: 10504kb
input:
1 100000 199997 1 5769 0 1 6630 0 1 16266 0 1 87415 0 2 23456 0 2 34333 0 2 56018 0 2 58848 0 3 958 0 4 19451 0 4 40396 0 5 23284 0 5 37108 0 6 40220 0 6 53501 0 6 66616 0 6 78456 0 6 98427 0 7 15922 0 7 63343 0 7 73387 0 7 89652 0 8 20051 0 8 39219 0 8 75071 0 9 2884 0 9 53733 0 9 54398 0 9 68547 0...
output:
YES 100000 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 27 0 28 0 29 0 30 0 31 0 32 0 33 0 34 0 35 0 36 0 37 0 38 0 39 0 40 0 41 0 42 0 43 0 44 0 45 0 46 0 47 0 48 0 49 0 50 0 51 0 52 0 53 0 54 0 55 0 56 0 57 0 58 0 59 0 60 ...
result:
ok ok (1 test case)
Subtask #6:
score: 8
Accepted
Test #22:
score: 8
Accepted
time: 2ms
memory: 8600kb
input:
1 2000 1999 1 2 0 2 3 0 3 4 0 4 5 1 5 6 0 6 7 0 7 8 0 8 9 1 9 10 1 10 11 1 11 12 0 12 13 0 13 14 0 14 15 0 15 16 0 16 17 0 17 18 0 18 19 1 19 20 1 20 21 1 21 22 1 22 23 0 23 24 1 24 25 1 25 26 1 26 27 1 27 28 0 28 29 1 29 30 0 30 31 1 31 32 0 32 33 0 33 34 1 34 35 0 35 36 1 36 37 0 37 38 0 38 39 1 3...
output:
NO
result:
ok ok (1 test case)
Test #23:
score: 8
Accepted
time: 2ms
memory: 8028kb
input:
1 2000 1999 1 2 1 2 3 1 3 4 1 4 5 0 5 6 0 6 7 0 7 8 0 8 9 0 9 10 1 10 11 1 11 12 1 12 13 1 13 14 1 14 15 0 15 16 0 16 17 0 17 18 0 18 19 1 19 20 0 20 21 0 21 22 0 22 23 0 23 24 1 24 25 1 25 26 0 26 27 0 27 28 0 28 29 1 29 30 1 30 31 1 31 32 0 32 33 0 33 34 0 34 35 0 35 36 0 36 37 1 37 38 0 38 39 0 3...
output:
YES 3010 1 1 2 1 3 1 4 1 5 0 6 0 7 0 8 0 10 1 9 1 11 1 12 1 13 1 15 0 14 0 16 0 17 0 18 0 20 0 21 0 22 0 23 0 24 1 26 0 25 0 27 0 28 0 29 1 30 1 31 1 33 0 32 0 34 0 35 0 36 0 38 0 39 0 41 1 40 1 42 1 43 1 44 1 45 1 46 0 47 0 49 1 48 1 50 1 51 1 52 1 53 0 54 0 55 0 54 0 56 0 57 0 60 1 59 1 61 1 63 1 ...
result:
ok ok (1 test case)
Test #24:
score: 8
Accepted
time: 2ms
memory: 7668kb
input:
1 2000 1999 1 2 0 2 3 1 3 4 1 4 5 0 5 6 0 6 7 1 7 8 1 8 9 1 9 10 1 10 11 0 11 12 1 12 13 1 13 14 1 14 15 0 15 16 0 16 17 0 17 18 1 18 19 0 19 20 0 20 21 1 21 22 0 22 23 1 23 24 1 24 25 1 25 26 1 26 27 0 27 28 0 28 29 1 29 30 0 30 31 0 31 32 1 32 33 0 33 34 1 34 35 0 35 36 1 36 37 0 37 38 0 38 39 0 3...
output:
NO
result:
ok ok (1 test case)
Test #25:
score: 8
Accepted
time: 2ms
memory: 8132kb
input:
1 2000 1999 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 7 8 0 8 9 0 9 10 0 10 11 0 11 12 0 12 13 0 13 14 0 14 15 0 15 16 0 16 17 0 17 18 0 18 19 0 19 20 0 20 21 0 21 22 0 22 23 1 23 24 0 24 25 0 25 26 0 26 27 0 27 28 0 28 29 0 29 30 0 30 31 0 31 32 0 32 33 0 33 34 0 34 35 0 35 36 0 36 37 0 37 38 0 38 39 0 3...
output:
YES 2356 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 24 0 23 0 25 0 26 0 27 0 28 0 29 0 30 0 31 0 32 0 31 0 33 0 34 0 35 0 36 0 37 0 38 0 39 0 40 0 41 0 42 0 43 0 44 0 46 0 47 0 48 0 49 0 51 0 52 0 53 0 54 0 55 0 57 1 56 1 59 0 58 0 60 0 61 0 62 0 ...
result:
ok ok (1 test case)
Test #26:
score: 8
Accepted
time: 1ms
memory: 7912kb
input:
1 2000 1999 1 2 0 2 3 0 3 4 1 4 5 1 5 6 0 6 7 0 7 8 0 8 9 1 9 10 0 10 11 0 11 12 1 12 13 1 13 14 1 14 15 1 15 16 1 16 17 1 17 18 0 18 19 0 19 20 1 20 21 1 21 22 1 22 23 0 23 24 0 24 25 1 25 26 0 26 27 1 27 28 1 28 29 1 29 30 0 30 31 0 31 32 0 32 33 0 33 34 1 34 35 0 35 36 0 36 37 1 37 38 1 38 39 0 3...
output:
NO
result:
ok ok (1 test case)
Test #27:
score: 8
Accepted
time: 2ms
memory: 8108kb
input:
1 2000 1999 1 2 1 2 3 1 3 4 1 4 5 0 5 6 1 6 7 1 7 8 1 8 9 1 9 10 1 10 11 1 11 12 1 12 13 1 13 14 1 14 15 1 15 16 1 16 17 1 17 18 1 18 19 1 19 20 1 20 21 1 21 22 1 22 23 1 23 24 0 24 25 1 25 26 1 26 27 1 27 28 1 28 29 1 29 30 1 30 31 1 31 32 1 32 33 1 33 34 1 34 35 1 35 36 1 36 37 1 37 38 1 38 39 1 3...
output:
YES 2346 1 1 2 1 3 1 6 1 5 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 13 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 48 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 1 60 1...
result:
ok ok (1 test case)
Test #28:
score: 8
Accepted
time: 1ms
memory: 7904kb
input:
128 4 3 1 2 0 2 3 0 3 4 0 0 0 0 0 4 3 1 2 1 2 3 0 3 4 0 0 0 0 0 4 3 1 2 0 2 3 1 3 4 0 0 0 0 0 4 3 1 2 1 2 3 1 3 4 0 0 0 0 0 4 3 1 2 0 2 3 0 3 4 1 0 0 0 0 4 3 1 2 1 2 3 0 3 4 1 0 0 0 0 4 3 1 2 0 2 3 1 3 4 1 0 0 0 0 4 3 1 2 1 2 3 1 3 4 1 0 0 0 0 4 3 1 2 0 2 3 0 3 4 0 1 0 0 0 4 3 1 2 1 2 3 0 3 4 0 1 0 ...
output:
YES 4 1 0 2 0 3 0 4 0 NO NO NO NO NO NO NO YES 5 2 0 1 0 3 0 4 0 1 1 YES 5 1 1 2 1 3 0 4 0 2 0 NO NO NO NO NO NO YES 6 1 0 2 0 3 0 2 0 4 0 2 1 YES 6 3 0 2 0 4 0 2 1 1 1 1 0 YES 6 1 0 2 0 4 0 2 1 3 1 3 0 YES 6 2 1 1 1 3 1 4 0 1 0 3 0 NO NO NO NO NO YES 5 1 1 3 0 2 0 4 0 2 1 NO YES 5 1 1 2 1 3 1 4 0 3...
result:
ok ok (128 test cases)
Subtask #7:
score: 8
Accepted
Dependency #6:
100%
Accepted
Test #29:
score: 8
Accepted
time: 14ms
memory: 9144kb
input:
1 100000 99999 1 2 0 2 3 0 3 4 0 4 5 1 5 6 1 6 7 0 7 8 0 8 9 1 9 10 0 10 11 1 11 12 1 12 13 0 13 14 0 14 15 1 15 16 1 16 17 1 17 18 0 18 19 1 19 20 0 20 21 0 21 22 1 22 23 0 23 24 1 24 25 1 25 26 1 26 27 1 27 28 0 28 29 0 29 30 1 30 31 0 31 32 0 32 33 0 33 34 1 34 35 1 35 36 1 36 37 0 37 38 1 38 39 ...
output:
NO
result:
ok ok (1 test case)
Test #30:
score: 8
Accepted
time: 27ms
memory: 12772kb
input:
1 100000 99999 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 7 8 0 8 9 1 9 10 0 10 11 0 11 12 0 12 13 1 13 14 0 14 15 0 15 16 1 16 17 0 17 18 0 18 19 0 19 20 0 20 21 0 21 22 0 22 23 0 23 24 1 24 25 1 25 26 0 26 27 0 27 28 0 28 29 1 29 30 0 30 31 0 31 32 1 32 33 1 33 34 0 34 35 0 35 36 0 36 37 0 37 38 0 38 39 ...
output:
YES 150079 2 0 1 0 3 0 4 0 5 0 6 0 7 0 8 0 10 0 9 0 11 0 12 0 14 0 13 0 17 0 16 0 18 0 19 0 20 0 21 0 22 0 23 0 24 1 25 1 26 0 27 0 28 0 30 0 29 0 31 0 32 1 33 1 34 0 35 0 36 0 37 0 38 0 39 0 40 0 41 1 43 0 42 0 45 1 44 1 46 1 47 1 48 1 49 0 50 0 52 1 51 1 53 1 54 1 55 1 56 1 57 0 58 0 60 0 62 1 61 ...
result:
ok ok (1 test case)
Test #31:
score: 8
Accepted
time: 14ms
memory: 9500kb
input:
1 100000 99999 1 2 0 2 3 0 3 4 0 4 5 1 5 6 1 6 7 0 7 8 0 8 9 1 9 10 0 10 11 0 11 12 1 12 13 0 13 14 1 14 15 0 15 16 0 16 17 1 17 18 1 18 19 1 19 20 0 20 21 1 21 22 0 22 23 1 23 24 1 24 25 0 25 26 1 26 27 1 27 28 1 28 29 0 29 30 1 30 31 1 31 32 0 32 33 1 33 34 1 34 35 0 35 36 1 36 37 0 37 38 1 38 39 ...
output:
NO
result:
ok ok (1 test case)
Test #32:
score: 8
Accepted
time: 24ms
memory: 11064kb
input:
1 100000 99999 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 7 8 0 8 9 0 9 10 0 10 11 0 11 12 0 12 13 1 13 14 1 14 15 0 15 16 0 16 17 0 17 18 0 18 19 0 19 20 0 20 21 0 21 22 0 22 23 0 23 24 0 24 25 0 25 26 0 26 27 0 27 28 1 28 29 1 29 30 0 30 31 0 31 32 0 32 33 0 33 34 0 34 35 0 35 36 0 36 37 0 37 38 0 38 39 ...
output:
YES 118020 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 13 1 12 1 14 1 15 0 16 0 17 0 18 0 17 0 19 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 28 1 27 1 29 1 30 0 31 0 32 0 33 0 34 0 33 0 35 0 36 0 35 0 37 0 38 0 39 0 40 0 41 0 42 0 43 0 44 0 45 0 46 0 47 0 48 0 49 0 51 0 52 0 53 0 54 0 55 0 56 0 57 0 58 ...
result:
ok ok (1 test case)
Test #33:
score: 8
Accepted
time: 13ms
memory: 9116kb
input:
1 100000 99999 1 2 1 2 3 1 3 4 0 4 5 0 5 6 1 6 7 1 7 8 0 8 9 0 9 10 1 10 11 0 11 12 0 12 13 1 13 14 0 14 15 1 15 16 1 16 17 1 17 18 1 18 19 0 19 20 1 20 21 0 21 22 1 22 23 0 23 24 1 24 25 0 25 26 1 26 27 0 27 28 1 28 29 1 29 30 1 30 31 0 31 32 1 32 33 1 33 34 0 34 35 1 35 36 1 36 37 1 37 38 1 38 39 ...
output:
NO
result:
ok ok (1 test case)
Test #34:
score: 8
Accepted
time: 24ms
memory: 11004kb
input:
1 100000 99999 1 2 0 2 3 1 3 4 1 4 5 1 5 6 1 6 7 1 7 8 1 8 9 1 9 10 1 10 11 1 11 12 1 12 13 1 13 14 1 14 15 1 15 16 1 16 17 1 17 18 1 18 19 1 19 20 1 20 21 1 21 22 0 22 23 0 23 24 0 24 25 1 25 26 1 26 27 1 27 28 0 28 29 1 29 30 1 30 31 1 31 32 1 32 33 1 33 34 1 34 35 1 35 36 1 36 37 1 37 38 1 38 39 ...
output:
YES 117993 1 0 2 0 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 23 0 22 0 24 0 25 1 26 1 29 1 28 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 48 1 47 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 61 1 60 1 62 ...
result:
ok ok (1 test case)
Test #35:
score: 8
Accepted
time: 2ms
memory: 8700kb
input:
512 5 4 1 2 0 2 3 0 3 4 0 4 5 0 0 0 0 0 0 5 4 1 2 1 2 3 0 3 4 0 4 5 0 0 0 0 0 0 5 4 1 2 0 2 3 1 3 4 0 4 5 0 0 0 0 0 0 5 4 1 2 1 2 3 1 3 4 0 4 5 0 0 0 0 0 0 5 4 1 2 0 2 3 0 3 4 1 4 5 0 0 0 0 0 0 5 4 1 2 1 2 3 0 3 4 1 4 5 0 0 0 0 0 0 5 4 1 2 0 2 3 1 3 4 1 4 5 0 0 0 0 0 0 5 4 1 2 1 2 3 1 3 4 1 4 5 0 0 ...
output:
YES 5 1 0 2 0 3 0 4 0 5 0 NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 6 2 0 1 0 3 0 4 0 5 0 1 1 YES 6 1 1 2 1 3 0 4 0 5 0 2 0 NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 7 1 0 2 0 3 0 2 0 4 0 5 0 2 1 YES 7 3 0 2 0 4 0 5 0 2 1 1 1 1 0 YES 7 1 0 2 0 4 0 5 0 2 1 3 1 3 0 YES 7 2 1 1 1 3 1 4 0 5 0...
result:
ok ok (512 test cases)
Test #36:
score: 8
Accepted
time: 3ms
memory: 8768kb
input:
2048 6 5 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 0 0 0 0 0 0 6 5 1 2 1 2 3 0 3 4 0 4 5 0 5 6 0 0 0 0 0 0 0 6 5 1 2 0 2 3 1 3 4 0 4 5 0 5 6 0 0 0 0 0 0 0 6 5 1 2 1 2 3 1 3 4 0 4 5 0 5 6 0 0 0 0 0 0 0 6 5 1 2 0 2 3 0 3 4 1 4 5 0 5 6 0 0 0 0 0 0 0 6 5 1 2 1 2 3 0 3 4 1 4 5 0 5 6 0 0 0 0 0 0 0 6 5 1 2 0 2 3 1 3 4...
output:
YES 6 1 0 2 0 3 0 4 0 5 0 6 0 NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 7 2 0 1 0 3 0 4 0 5 0 6 0 1 1 YES 7 1 1 2 1 3 0 4 0 5 0 6 0 2 0 NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 8 1 0 2 0 3 0 2...
result:
ok ok (2048 test cases)
Test #37:
score: 8
Accepted
time: 11ms
memory: 9156kb
input:
8192 7 6 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 0 0 0 0 0 0 0 7 6 1 2 1 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 0 0 0 0 0 0 0 7 6 1 2 0 2 3 1 3 4 0 4 5 0 5 6 0 6 7 0 0 0 0 0 0 0 0 7 6 1 2 1 2 3 1 3 4 0 4 5 0 5 6 0 6 7 0 0 0 0 0 0 0 0 7 6 1 2 0 2 3 0 3 4 1 4 5 0 5 6 0 6 7 0 0 0 0 0 0 0 0 7 6 1 2 1 2 3 0 3 4 1 4 5...
output:
YES 7 1 0 2 0 3 0 4 0 5 0 6 0 7 0 NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO YES 8 2 0 1 0 3 0 4 0 5 0 6 0 7 0 1 1 YES 8 1 1 2 1 3 0 4 0 5 0 6 0 7 0 2 0 N...
result:
ok ok (8192 test cases)
Subtask #8:
score: 10
Accepted
Dependency #6:
100%
Accepted
Test #38:
score: 10
Accepted
time: 1ms
memory: 8440kb
input:
1 2000 1999 1 2 0 1 3 1 2 4 1 3 5 1 4 6 0 3 7 1 5 8 1 4 9 1 4 10 0 8 11 0 4 12 1 10 13 0 8 14 1 2 15 1 2 16 1 16 17 1 11 18 0 13 19 1 13 20 1 5 21 1 2 22 0 9 23 0 16 24 1 6 25 1 19 26 0 17 27 0 5 28 1 27 29 1 16 30 0 26 31 1 31 32 0 1 33 1 6 34 1 1 35 1 8 36 0 10 37 0 6 38 0 12 39 1 10 40 1 12 41 1 ...
output:
NO
result:
ok ok (1 test case)
Test #39:
score: 10
Accepted
time: 1ms
memory: 8436kb
input:
1 2000 1999 1 2 1 1 3 0 3 4 0 4 5 1 4 6 1 4 7 1 7 8 1 1 9 1 9 10 0 4 11 1 2 12 1 7 13 0 12 14 0 1 15 1 9 16 1 8 17 0 11 18 0 2 19 0 1 20 1 13 21 0 18 22 0 2 23 0 11 24 0 24 25 0 2 26 1 14 27 0 2 28 1 1 29 1 20 30 1 25 31 0 8 32 0 23 33 1 6 34 1 30 35 0 3 36 1 32 37 1 2 38 0 1 39 0 29 40 0 34 41 0 32...
output:
NO
result:
ok ok (1 test case)
Test #40:
score: 10
Accepted
time: 1ms
memory: 7804kb
input:
1 2000 1999 1 2 1 1 3 1 3 4 1 3 5 1 5 6 0 3 7 0 7 8 0 5 9 1 7 10 0 8 11 1 6 12 0 3 13 1 8 14 0 6 15 0 13 16 0 2 17 1 11 18 1 6 19 0 3 20 0 3 21 1 17 22 1 21 23 1 21 24 1 12 25 0 3 26 1 17 27 0 19 28 0 18 29 1 11 30 1 8 31 0 9 32 1 4 33 0 33 34 1 30 35 1 28 36 1 19 37 1 2 38 1 8 39 0 10 40 1 35 41 0 ...
output:
NO
result:
ok ok (1 test case)
Test #41:
score: 10
Accepted
time: 0ms
memory: 8932kb
input:
1 2000 1999 1 2 0 1 3 0 3 4 0 3 5 1 1 6 0 3 7 0 6 8 0 8 9 0 6 10 0 2 11 1 5 12 0 9 13 1 8 14 0 8 15 1 15 16 1 11 17 0 14 18 1 12 19 1 18 20 1 3 21 0 5 22 0 11 23 1 12 24 0 18 25 1 23 26 1 24 27 1 24 28 0 21 29 1 29 30 1 30 31 0 10 32 0 17 33 0 17 34 1 34 35 1 9 36 1 1 37 0 35 38 1 25 39 0 27 40 1 13...
output:
YES 3011 4 0 3 0 139 0 473 0 7 0 3 0 15 1 8 1 559 1 1607 1 16 1 19 1 12 1 35 1 38 1 142 1 43 1 52 0 2 0 350 0 59 0 60 0 29 0 389 0 1692 0 62 1 70 1 72 0 73 0 65 0 75 1 26 1 78 0 79 0 36 0 97 0 721 0 81 0 85 1 509 1 86 1 1 1 152 1 87 0 28 0 90 0 91 1 348 1 1314 1 95 0 1016 0 96 0 204 0 100 1 88 1 101...
result:
ok ok (1 test case)
Test #42:
score: 10
Accepted
time: 2ms
memory: 9112kb
input:
1 2000 1999 1 2 1 2 3 0 2 4 0 4 5 0 1 6 1 3 7 0 1 8 1 5 9 0 1 10 1 1 11 1 3 12 0 6 13 0 10 14 1 9 15 1 14 16 0 4 17 0 13 18 0 17 19 0 6 20 1 4 21 0 18 22 0 6 23 0 13 24 0 20 25 1 7 26 1 20 27 1 22 28 1 22 29 1 4 30 1 28 31 1 18 32 0 7 33 0 17 34 1 4 35 0 27 36 1 23 37 1 31 38 1 30 39 1 7 40 0 27 41 ...
output:
YES 3016 1 1 2 1 6 1 8 1 10 1 18 0 22 0 32 0 54 0 1198 0 19 0 17 0 317 0 20 1 6 1 25 1 27 1 610 1 1877 1 26 1 7 1 35 0 711 0 43 1 276 1 51 0 115 0 209 0 52 1 719 1 1020 1 53 1 3 1 153 1 248 1 56 0 41 0 1894 0 60 0 17 0 61 0 31 0 62 1 64 0 29 0 179 0 67 0 145 0 1178 0 70 0 74 0 22 0 81 0 483 0 85 1 9...
result:
ok ok (1 test case)
Test #43:
score: 10
Accepted
time: 0ms
memory: 7948kb
input:
1 2000 1999 1 2 0 1 3 0 1 4 0 1 5 1 5 6 1 2 7 1 5 8 1 6 9 0 3 10 0 9 11 1 9 12 0 3 13 1 4 14 0 10 15 1 10 16 0 4 17 0 16 18 0 18 19 0 17 20 0 10 21 0 14 22 0 11 23 1 18 24 1 9 25 0 13 26 1 7 27 1 16 28 0 1 29 0 17 30 0 22 31 0 28 32 0 17 33 0 3 34 0 21 35 0 17 36 1 4 37 1 11 38 0 21 39 0 15 40 1 24 ...
output:
YES 2996 7 1 13 1 26 1 54 1 16 0 18 0 872 0 27 1 85 1 305 1 30 0 31 0 436 0 797 0 33 0 100 0 37 1 116 1 177 1 40 1 44 1 42 1 48 1 636 1 52 0 46 0 56 0 127 0 58 1 59 0 62 1 175 1 68 0 15 0 71 0 5 0 183 0 1394 0 72 1 34 1 76 1 28 1 407 1 77 0 79 1 110 1 80 1 14 1 377 1 475 1 1819 1 81 1 86 0 87 1 1 1 ...
result:
ok ok (1 test case)
Subtask #9:
score: 6
Accepted
Dependency #4:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Dependency #8:
100%
Accepted
Test #44:
score: 6
Accepted
time: 18ms
memory: 9460kb
input:
1 100000 99999 1 2 1 1 3 1 3 4 0 2 5 1 2 6 1 2 7 0 5 8 0 8 9 0 6 10 0 5 11 0 2 12 0 8 13 0 13 14 1 3 15 1 2 16 0 8 17 0 3 18 1 18 19 0 10 20 0 17 21 0 8 22 0 11 23 1 9 24 1 10 25 1 11 26 1 25 27 0 7 28 1 3 29 1 8 30 1 17 31 0 29 32 1 28 33 1 10 34 1 13 35 0 9 36 0 15 37 0 14 38 1 31 39 1 30 40 1 40 ...
output:
NO
result:
ok ok (1 test case)
Test #45:
score: 6
Accepted
time: 18ms
memory: 9752kb
input:
1 100000 99999 1 2 0 1 3 0 2 4 0 4 5 1 2 6 0 4 7 0 6 8 1 5 9 1 3 10 0 3 11 0 11 12 1 5 13 1 2 14 1 5 15 1 1 16 1 16 17 1 2 18 1 5 19 0 1 20 1 18 21 1 3 22 0 6 23 0 4 24 0 11 25 1 19 26 1 23 27 1 16 28 0 4 29 1 12 30 0 16 31 1 7 32 1 18 33 1 10 34 1 16 35 1 5 36 1 1 37 1 32 38 0 20 39 0 21 40 1 14 41...
output:
NO
result:
ok ok (1 test case)
Test #46:
score: 6
Accepted
time: 15ms
memory: 9452kb
input:
1 100000 99999 1 2 0 1 3 0 2 4 1 3 5 1 5 6 0 1 7 1 6 8 0 2 9 0 4 10 1 2 11 0 5 12 1 1 13 1 10 14 1 5 15 1 13 16 0 13 17 1 16 18 1 18 19 0 1 20 1 14 21 1 2 22 0 5 23 1 22 24 0 11 25 0 9 26 0 17 27 1 19 28 0 26 29 1 11 30 0 20 31 1 20 32 1 6 33 1 21 34 1 32 35 0 35 36 1 9 37 0 37 38 1 34 39 1 3 40 1 1...
output:
NO
result:
ok ok (1 test case)
Test #47:
score: 6
Accepted
time: 31ms
memory: 12556kb
input:
1 100000 99999 1 2 0 2 3 0 2 4 0 3 5 0 4 6 0 4 7 0 3 8 0 4 9 1 7 10 1 2 11 0 3 12 0 7 13 0 13 14 0 9 15 1 14 16 1 3 17 0 5 18 0 15 19 1 15 20 1 8 21 1 11 22 1 16 23 0 5 24 1 6 25 0 15 26 1 7 27 0 26 28 0 24 29 1 21 30 1 20 31 1 10 32 1 12 33 1 23 34 1 12 35 1 11 36 0 6 37 0 29 38 0 6 39 0 9 40 0 33 ...
output:
YES 150068 10 1 7 1 32 1 47 1 298 1 441 1 744 1 4467 1 20 1 78169 1 22 1 1573 1 34 1 23 1 5783 1 68540 1 41 0 33 0 39919 0 55 1 445 1 1107 1 6118 1 60 1 63 0 146 0 1202 0 68 1 182 1 235 1 925 1 19685 1 20122 1 74 0 70 0 86 0 703 0 94 1 209 1 99 1 118 1 472 1 106 1 116 1 680 1 2153 1 128 1 476 1 5966...
result:
ok ok (1 test case)
Test #48:
score: 6
Accepted
time: 27ms
memory: 12608kb
input:
1 100000 99999 1 2 1 2 3 1 3 4 1 4 5 0 3 6 1 4 7 0 5 8 1 1 9 0 3 10 1 8 11 0 1 12 0 3 13 1 2 14 1 11 15 0 14 16 0 11 17 0 13 18 0 4 19 1 6 20 0 17 21 0 3 22 1 9 23 1 23 24 1 7 25 1 25 26 1 2 27 1 8 28 0 26 29 1 25 30 0 19 31 1 17 32 1 2 33 1 23 34 1 16 35 0 29 36 1 28 37 0 25 38 1 11 39 0 38 40 0 7 ...
output:
YES 150183 2 1 1 1 14 1 33 1 166 1 265 1 417 1 30 0 25 0 35 0 16 0 163 0 39 0 50 0 65 0 335 0 61 1 52662 1 63 0 514 0 74 0 31899 0 75 1 72593 1 79 0 41 0 6562 0 81 1 1758 1 87066 1 90 1 93 0 26 0 7275 0 33983 0 101 0 68456 0 105 1 54727 1 120 0 62676 0 69780 0 128 1 612 1 1984 1 4986 1 153 1 15 1 15...
result:
ok ok (1 test case)
Test #49:
score: 6
Accepted
time: 36ms
memory: 12268kb
input:
1 100000 99999 1 2 1 1 3 1 2 4 1 4 5 0 5 6 1 1 7 1 4 8 0 3 9 0 7 10 1 3 11 0 10 12 0 1 13 1 7 14 1 9 15 0 10 16 0 15 17 1 12 18 0 11 19 1 18 20 1 1 21 0 20 22 1 19 23 1 20 24 1 1 25 1 20 26 1 8 27 0 27 28 0 9 29 0 16 30 1 4 31 1 9 32 0 19 33 1 27 34 0 15 35 1 24 36 1 30 37 1 24 38 1 32 39 1 8 40 0 4...
output:
YES 149998 20 1 698 1 1685 1 40 0 55 0 12445 0 52 0 34 0 1894 0 54 1 62 1 13 1 2315 1 7751 1 8710 1 73 0 2114 0 2331 0 74 1 27 1 877 1 95 0 112 0 2279 0 93806 0 117 1 16 1 280 1 136 0 385 0 48377 0 145 1 89 1 3896 1 7212 1 148 0 754 0 1525 0 13511 0 157 0 642 0 15807 0 158 1 159 0 47 0 163 0 2966 0 ...
result:
ok ok (1 test case)
Subtask #10:
score: 6
Accepted
Test #50:
score: 6
Accepted
time: 16ms
memory: 13516kb
input:
1 100000 100000 1 2 0 2 3 1 3 4 0 4 5 1 5 6 0 6 7 1 7 8 0 8 9 1 9 10 0 10 11 1 11 12 0 12 13 1 13 14 0 14 15 1 15 16 0 16 17 1 17 18 0 18 19 1 19 20 0 20 21 1 21 22 0 22 23 1 23 24 0 24 25 1 25 26 0 26 27 1 27 28 0 28 29 1 29 30 0 30 31 1 31 32 0 32 33 1 33 34 0 34 35 1 35 36 0 36 37 1 37 38 0 38 39...
output:
NO
result:
ok ok (1 test case)
Test #51:
score: 6
Accepted
time: 21ms
memory: 12688kb
input:
1 100000 100000 1 2 0 2 3 1 3 4 0 4 5 1 5 6 0 6 7 1 7 8 0 8 9 1 9 10 0 10 11 1 11 12 0 12 13 1 13 14 0 14 15 1 15 16 0 16 17 1 17 18 0 18 19 1 19 20 0 20 21 1 21 22 0 22 23 1 23 24 0 24 25 1 25 26 0 26 27 1 27 28 0 28 29 1 29 30 0 30 31 1 31 32 0 32 33 1 33 34 0 34 35 1 35 36 0 36 37 1 37 38 0 38 39...
output:
NO
result:
ok ok (1 test case)
Test #52:
score: 6
Accepted
time: 17ms
memory: 12556kb
input:
1 100000 100000 1 2 1 2 3 0 3 4 1 4 5 0 5 6 1 6 7 0 7 8 1 8 9 0 9 10 1 10 11 0 11 12 1 12 13 0 13 14 1 14 15 0 15 16 1 16 17 0 17 18 1 18 19 0 19 20 1 20 21 0 21 22 1 22 23 0 23 24 1 24 25 0 25 26 1 26 27 0 27 28 1 28 29 0 29 30 1 30 31 0 31 32 1 32 33 0 33 34 1 34 35 0 35 36 1 36 37 0 37 38 1 38 39...
output:
NO
result:
ok ok (1 test case)
Test #53:
score: 6
Accepted
time: 17ms
memory: 13988kb
input:
1 100000 100000 1 2 1 2 3 0 3 4 1 4 5 0 5 6 1 6 7 0 7 8 1 8 9 0 9 10 1 10 11 0 11 12 1 12 13 0 13 14 1 14 15 0 15 16 1 16 17 0 17 18 1 18 19 0 19 20 1 20 21 0 21 22 1 22 23 0 23 24 1 24 25 0 25 26 1 26 27 0 27 28 1 28 29 0 29 30 1 30 31 0 31 32 1 32 33 0 33 34 1 34 35 0 35 36 1 36 37 0 37 38 1 38 39...
output:
NO
result:
ok ok (1 test case)
Test #54:
score: 6
Accepted
time: 14ms
memory: 9452kb
input:
1 100000 100000 1 2 1 2 3 0 3 4 0 4 5 0 5 6 1 6 7 1 7 8 0 8 9 1 9 10 1 10 11 0 11 12 1 12 13 0 13 14 0 14 15 0 15 16 1 16 17 1 17 18 0 18 19 1 19 20 1 20 21 0 21 22 1 22 23 0 23 24 1 24 25 1 25 26 1 26 27 0 27 28 0 28 29 1 29 30 1 30 31 0 31 32 1 32 33 1 33 34 1 34 35 0 35 36 1 36 37 1 37 38 0 38 39...
output:
NO
result:
ok ok (1 test case)
Test #55:
score: 6
Accepted
time: 15ms
memory: 9784kb
input:
1 95000 95000 1 2 1 2 3 1 3 4 0 4 5 1 5 6 1 6 7 0 7 8 0 8 9 0 9 10 0 10 11 1 11 12 0 12 13 0 13 14 1 14 15 1 15 16 0 16 17 0 17 18 1 18 19 0 19 20 0 20 21 1 21 22 0 22 23 1 23 24 1 24 25 0 25 26 1 26 27 0 27 28 0 28 29 0 29 30 1 30 31 1 31 32 0 32 33 0 33 34 1 34 35 0 35 36 1 36 37 0 37 38 0 38 39 0...
output:
NO
result:
ok ok (1 test case)
Test #56:
score: 6
Accepted
time: 34ms
memory: 12572kb
input:
1 100000 100000 1 2 1 2 3 1 3 4 1 4 5 0 5 6 0 6 7 0 7 8 0 8 9 0 9 10 0 10 11 1 11 12 1 12 13 1 13 14 1 14 15 1 15 16 0 16 17 0 17 18 1 18 19 1 19 20 1 20 21 1 21 22 1 22 23 0 23 24 0 24 25 0 25 26 0 26 27 1 27 28 1 28 29 0 29 30 0 30 31 1 31 32 0 32 33 0 33 34 0 34 35 1 35 36 1 36 37 1 37 38 1 38 39...
output:
YES 150022 2 1 1 1 3 1 5 0 4 0 6 0 7 0 8 0 7 0 9 0 10 0 11 1 12 1 13 1 14 1 16 0 15 0 18 1 17 1 19 1 20 1 19 1 21 1 23 0 22 0 24 0 25 0 27 1 26 1 29 0 28 0 30 0 32 0 31 0 33 0 35 1 34 1 36 1 37 1 38 1 39 1 38 1 40 1 41 1 43 0 42 0 44 0 46 0 47 0 49 0 50 0 53 0 52 0 54 0 55 0 56 0 57 0 58 1 59 1 60 1...
result:
ok ok (1 test case)
Test #57:
score: 6
Accepted
time: 24ms
memory: 12696kb
input:
1 95000 95000 1 2 0 2 3 0 3 4 0 4 5 0 5 6 0 6 7 0 7 8 0 8 9 0 9 10 1 10 11 1 11 12 0 12 13 0 13 14 0 14 15 0 15 16 0 16 17 0 17 18 1 18 19 1 19 20 1 20 21 0 21 22 0 22 23 0 23 24 0 24 25 1 25 26 1 26 27 0 27 28 0 28 29 1 29 30 1 30 31 0 31 32 0 32 33 0 33 34 0 34 35 1 35 36 1 36 37 1 37 38 1 38 39 1...
output:
YES 142482 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 10 1 9 1 11 1 12 0 13 0 14 0 15 0 16 0 18 1 17 1 19 1 21 0 20 0 22 0 23 0 25 1 24 1 27 0 26 0 29 1 28 1 30 1 31 0 32 0 33 0 35 1 34 1 36 1 37 1 38 1 39 1 42 0 41 0 43 0 45 0 46 0 47 0 49 1 48 1 50 1 51 0 52 0 53 0 52 0 54 0 55 0 57 1 56 1 58 1 59 1 58 1 60 ...
result:
ok ok (1 test case)
Subtask #11:
score: 10
Accepted
Dependency #2:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #8:
100%
Accepted
Test #58:
score: 10
Accepted
time: 0ms
memory: 7992kb
input:
1 1000 2000 505 722 0 722 486 1 486 553 0 553 546 1 546 24 0 24 26 1 26 286 0 286 165 1 165 300 0 300 13 1 13 979 0 979 930 1 930 181 0 181 957 1 957 852 0 852 255 1 255 829 0 829 607 1 607 157 0 157 681 1 681 408 0 408 996 1 996 755 0 755 237 1 237 896 0 896 327 1 327 451 0 451 138 1 138 883 0 883 ...
output:
NO
result:
ok ok (1 test case)
Test #59:
score: 10
Accepted
time: 2ms
memory: 9348kb
input:
1 2000 2000 1 2 0 2 3 1 3 4 0 4 5 1 5 6 0 6 7 1 7 8 0 8 9 1 9 10 0 10 11 1 11 12 0 12 13 1 13 14 0 14 15 1 15 16 0 16 17 1 17 18 0 18 19 1 19 20 0 20 21 1 21 22 0 22 23 1 23 24 0 24 25 1 25 26 0 26 27 1 27 28 0 28 29 1 29 30 0 30 31 1 31 32 0 32 33 1 33 34 0 34 35 1 35 36 0 36 37 1 37 38 0 38 39 1 3...
output:
NO
result:
ok ok (1 test case)
Test #60:
score: 10
Accepted
time: 0ms
memory: 9572kb
input:
1 2000 2000 1 2 1 2 3 0 3 4 1 4 5 0 5 6 1 6 7 0 7 8 1 8 9 0 9 10 1 10 11 0 11 12 1 12 13 0 13 14 1 14 15 0 15 16 1 16 17 0 17 18 1 18 19 0 19 20 1 20 21 0 21 22 1 22 23 0 23 24 1 24 25 0 25 26 1 26 27 0 27 28 1 28 29 0 29 30 1 30 31 0 31 32 1 32 33 0 33 34 1 34 35 0 35 36 1 36 37 0 37 38 1 38 39 0 3...
output:
NO
result:
ok ok (1 test case)
Test #61:
score: 10
Accepted
time: 2ms
memory: 8104kb
input:
1 1000 1994 1 622 1 1 722 1 4 57 0 4 218 0 4 506 0 4 559 0 4 851 0 4 898 0 5 22 0 5 368 0 5 482 0 5 575 0 5 589 0 6 69 1 6 156 1 6 447 1 6 876 1 8 66 1 8 106 1 8 154 1 8 159 1 8 506 1 8 580 1 8 677 1 8 717 1 8 935 1 11 102 0 11 192 0 11 521 0 12 167 1 13 33 1 13 115 1 13 369 1 13 695 1 13 796 1 13 8...
output:
YES 2028 1 1 4 0 218 0 506 0 898 0 8 1 66 1 159 1 677 1 717 1 12 1 167 1 13 1 33 1 115 1 369 1 842 1 15 1 16 0 161 0 432 0 691 0 979 0 17 1 389 1 19 0 856 0 906 0 20 0 24 0 25 0 674 0 878 0 34 0 36 0 796 0 38 0 154 0 749 0 786 0 796 0 897 0 39 0 41 1 389 1 873 1 969 1 44 1 45 0 48 1 27 1 50 0 59 0 7...
result:
ok ok (1 test case)
Test #62:
score: 10
Accepted
time: 0ms
memory: 9868kb
input:
1 1000 1992 1 341 0 1 591 0 1 754 0 1 788 0 2 368 0 4 138 0 4 252 0 4 784 0 5 480 0 7 225 0 7 296 0 7 456 0 7 532 0 7 616 0 8 369 0 8 960 0 10 150 0 10 288 0 10 487 0 10 553 0 10 775 0 11 136 0 11 153 0 11 162 0 11 552 0 11 685 0 11 999 0 12 904 0 13 32 0 13 761 0 14 232 0 14 548 0 14 610 0 15 122 0...
output:
YES 1419 1 0 754 0 2 0 4 0 252 0 5 0 6 0 7 0 225 0 8 0 9 0 10 0 553 0 11 0 12 0 13 0 761 0 14 0 15 0 16 0 17 0 18 0 954 0 20 0 21 0 22 0 23 0 24 0 27 0 28 0 29 0 30 0 31 0 34 0 36 0 37 0 38 0 39 0 40 0 73 0 41 0 42 0 132 0 619 0 43 0 44 0 118 0 45 0 46 0 47 0 48 0 49 0 50 0 51 0 52 1 88 1 286 1 350 ...
result:
ok ok (1 test case)
Test #63:
score: 10
Accepted
time: 2ms
memory: 7760kb
input:
1 1000 1998 1 692 1 3 286 1 3 956 1 4 106 1 5 741 1 5 825 1 8 547 1 9 137 1 9 157 1 9 958 1 10 213 1 10 467 1 10 608 1 10 662 1 10 700 1 11 676 1 11 964 1 12 1 1 12 656 1 12 765 1 13 95 1 13 569 1 13 607 1 13 633 1 13 923 1 13 982 1 14 234 1 14 506 1 16 104 1 16 482 1 16 729 1 16 916 1 18 157 1 18 6...
output:
YES 1333 1 1 2 1 3 1 5 1 6 1 7 1 10 1 11 1 12 1 13 1 607 1 14 1 506 1 15 1 17 1 18 1 19 1 20 1 24 1 25 1 26 1 28 1 29 0 142 0 608 0 30 1 31 1 778 1 33 1 34 1 35 1 36 1 427 1 38 1 39 1 878 1 40 1 41 1 44 1 45 1 50 1 51 1 298 1 52 1 55 0 198 0 879 0 56 0 21 0 57 1 58 1 59 1 60 1 61 1 63 1 64 1 489 1 6...
result:
ok ok (1 test case)
Test #64:
score: 10
Accepted
time: 1ms
memory: 8648kb
input:
1 1000 1999 1 705 0 2 741 0 3 259 0 3 442 0 3 479 0 3 612 0 4 97 0 4 514 0 4 829 0 4 941 0 7 307 0 7 617 0 7 823 0 8 671 0 9 709 0 9 923 0 11 271 0 11 788 0 11 906 0 12 295 0 15 847 0 18 160 0 18 411 0 18 449 0 18 459 0 21 285 0 21 382 0 21 416 0 21 764 0 22 419 0 24 650 0 24 777 0 24 795 0 24 885 0...
output:
YES 1000 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 27 0 28 0 29 0 30 0 31 0 32 0 33 0 34 0 35 0 36 0 37 0 38 0 39 0 40 0 41 0 42 0 43 0 44 0 45 0 46 0 47 0 48 0 49 0 50 0 51 0 52 0 53 0 54 0 55 0 56 0 57 0 58 0 59 0 60 0 ...
result:
ok ok (1 test case)
Test #65:
score: 10
Accepted
time: 2ms
memory: 9216kb
input:
1 1000 1995 2 3 1 2 439 1 2 514 1 2 936 1 4 15 1 4 103 1 4 271 1 5 123 1 5 554 1 5 618 1 5 622 1 5 770 1 6 249 1 6 739 1 7 34 1 7 385 1 7 701 1 7 794 1 8 260 1 8 336 1 8 826 1 9 829 1 11 295 1 11 699 1 11 837 1 13 955 1 14 946 1 16 407 1 16 510 1 17 54 1 17 319 1 17 461 1 19 845 1 20 46 1 20 569 1 2...
output:
YES 1000 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 1 60 1 ...
result:
ok ok (1 test case)
Test #66:
score: 10
Accepted
time: 2ms
memory: 8568kb
input:
1 2000 1997 1 1360 0 4 718 0 4 965 0 5 78 1 5 936 1 5 1481 1 7 10 1 8 1413 1 12 63 1 13 1768 1 14 1645 0 16 45 1 16 1269 1 16 1548 1 17 535 0 17 1903 0 18 1214 0 20 1348 1 20 1599 1 21 53 0 21 1251 0 22 202 0 22 601 0 22 613 0 23 410 1 23 972 1 23 1036 1 26 180 1 27 1170 1 27 1869 1 28 615 1 28 1066...
output:
YES 2995 4 0 718 0 965 0 5 1 936 1 1481 1 6 1 7 1 10 1 9 0 11 1 12 1 63 1 14 0 1645 0 17 0 535 0 1903 0 18 0 1214 0 19 0 21 0 22 0 23 1 27 1 1170 1 28 1 615 1 1191 1 30 1 651 1 31 1 32 0 993 0 33 1 34 0 1273 0 35 1 37 1 419 1 1093 1 38 0 39 1 900 1 40 0 761 0 42 0 163 0 867 0 1889 0 43 0 44 1 47 0 1...
result:
ok ok (1 test case)
Test #67:
score: 10
Accepted
time: 2ms
memory: 9708kb
input:
1 2000 2000 1 127 0 1 626 0 2 1622 0 4 648 1 4 1568 1 4 1743 1 5 422 0 5 638 0 5 1288 0 5 1927 0 5 1998 0 6 186 0 9 1605 0 13 1025 0 13 1310 0 14 897 0 14 1221 0 15 385 0 15 1089 0 17 982 0 19 48 1 19 608 1 19 732 1 20 853 0 20 1571 0 21 1405 0 22 670 0 24 136 0 24 1054 0 24 1811 0 29 60 0 29 181 0 ...
output:
YES 2358 1 0 2 0 5 0 6 0 186 0 7 1 8 0 9 0 13 0 14 0 15 0 16 0 17 0 18 0 19 1 608 1 732 1 20 0 21 0 22 0 23 0 24 0 25 0 26 0 27 0 28 1 29 0 31 0 32 0 33 0 34 0 708 0 36 0 37 0 38 0 39 0 40 0 41 0 42 0 43 0 45 0 46 0 47 0 49 0 51 0 1418 0 52 0 53 1 74 1 54 0 55 0 56 0 57 0 59 0 60 0 62 0 63 1 583 1 6...
result:
ok ok (1 test case)
Test #68:
score: 10
Accepted
time: 2ms
memory: 9980kb
input:
1 2000 2000 2 264 1 2 890 1 2 1621 1 3 588 1 4 1204 0 8 573 1 9 376 1 10 1908 1 11 1218 1 13 61 1 14 373 1 14 427 1 14 728 1 15 1354 1 15 1767 1 15 1806 1 17 205 0 18 452 1 19 139 0 19 459 0 21 379 0 21 397 0 21 653 0 21 908 0 21 1817 0 21 1912 0 22 1219 0 23 1705 1 24 1498 1 26 1395 1 28 433 1 28 7...
output:
YES 2398 1 1 2 1 3 1 4 0 6 0 7 1 8 1 9 1 10 1 1908 1 11 1 12 0 13 1 14 1 427 1 15 1 16 1 18 1 20 1 21 0 379 0 397 0 653 0 908 0 1817 0 1912 0 22 0 1219 0 23 1 24 1 1498 1 26 1 27 1 28 1 30 1 1551 1 31 1 32 1 34 1 35 1 36 1 37 1 38 1 528 1 39 1 40 1 41 1 42 1 719 1 43 1 44 1 45 1 46 1 53 1 47 1 1674 ...
result:
ok ok (1 test case)
Test #69:
score: 10
Accepted
time: 1ms
memory: 8296kb
input:
1 500 1986 1 89 0 1 153 0 1 207 0 2 86 0 2 269 0 2 380 0 2 443 0 3 65 1 3 78 1 3 159 1 3 209 1 3 269 1 3 332 1 3 357 1 3 469 1 4 14 1 4 29 1 4 44 1 5 233 1 5 298 1 5 315 1 5 350 1 5 352 1 5 360 1 5 479 1 6 207 1 6 211 1 6 272 1 6 402 1 6 458 1 6 460 1 6 464 1 7 105 1 7 181 1 7 305 1 8 455 1 9 79 0 9...
output:
YES 1501 6 1 211 1 272 1 402 1 458 1 460 1 464 1 10 0 378 0 11 0 78 0 268 0 12 0 61 0 455 0 13 0 187 0 326 0 430 0 451 0 481 0 22 1 236 1 28 0 31 1 260 1 42 1 43 1 494 1 46 1 9 1 47 1 471 1 494 1 50 1 33 1 53 1 95 1 191 1 253 1 425 1 476 1 494 1 59 1 19 1 92 1 171 1 338 1 60 1 1 1 431 1 62 0 207 0 2...
result:
ok ok (1 test case)
Test #70:
score: 10
Accepted
time: 2ms
memory: 9640kb
input:
1 500 1992 1 9 0 1 82 0 1 109 0 1 120 0 1 207 0 4 351 0 6 165 0 6 169 0 6 208 0 6 333 0 6 395 0 7 56 0 7 176 0 7 380 0 7 455 0 8 136 0 8 151 0 8 182 0 8 225 0 8 333 0 8 482 0 8 484 0 9 40 0 10 70 1 10 415 1 10 429 1 11 28 0 13 141 0 13 165 0 13 285 0 13 429 0 13 460 0 14 2 0 14 19 0 14 208 0 14 300 ...
output:
YES 807 2 0 3 0 4 0 6 0 8 0 151 0 12 0 13 0 285 0 14 0 15 0 316 0 17 0 144 0 18 0 19 0 20 0 21 0 151 0 255 0 22 0 278 0 23 0 401 0 24 0 25 0 110 0 26 0 28 0 29 0 499 0 30 0 33 0 34 0 10 0 35 0 36 0 37 0 277 0 296 0 38 0 255 0 41 0 42 0 495 0 43 0 464 0 45 0 46 0 48 0 316 0 49 0 51 0 52 0 55 0 56 0 5...
result:
ok ok (1 test case)
Test #71:
score: 10
Accepted
time: 1ms
memory: 8448kb
input:
1 500 1989 1 88 1 1 168 1 1 203 1 1 301 1 1 444 1 2 328 1 4 8 1 4 106 1 4 345 1 4 456 1 5 244 1 5 268 1 5 312 1 5 318 1 5 327 1 5 390 1 6 98 1 6 107 1 6 111 1 6 162 1 6 244 1 6 482 1 7 14 1 7 78 1 7 83 1 7 156 1 7 189 1 7 192 1 7 216 1 7 226 1 7 228 1 7 294 1 7 299 1 7 349 1 7 361 1 7 381 1 7 385 1 ...
output:
YES 842 1 1 88 1 2 1 4 1 345 1 456 1 5 1 6 1 7 1 14 1 381 1 8 1 9 1 10 1 11 1 12 1 13 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 100 1 345 1 24 1 150 1 454 1 25 1 26 1 27 1 28 0 71 0 172 0 208 0 473 0 29 1 30 1 31 1 32 1 33 1 34 1 49 1 35 1 129 1 36 1 37 1 40 1 42 1 43 1 88 1 45 1 46 1 47 1 48 1 55 1...
result:
ok ok (1 test case)
Subtask #12:
score: 18
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Dependency #8:
100%
Accepted
Dependency #9:
100%
Accepted
Dependency #10:
100%
Accepted
Dependency #11:
100%
Accepted
Test #72:
score: 18
Accepted
time: 38ms
memory: 14072kb
input:
1 100000 200000 7400 64761 0 64761 60287 1 60287 7113 0 7113 55727 1 55727 20838 0 20838 17799 1 17799 99870 0 99870 87603 1 87603 9059 0 9059 96506 1 96506 82355 0 82355 61387 1 61387 84097 0 84097 35019 1 35019 43828 0 43828 47890 1 47890 28453 0 28453 23828 1 23828 4756 0 4756 77657 1 77657 29379...
output:
NO
result:
ok ok (1 test case)
Test #73:
score: 18
Accepted
time: 7ms
memory: 10072kb
input:
1 50000 50000 1 2 0 2 3 1 3 4 0 4 5 1 5 6 0 6 7 1 7 8 0 8 9 1 9 10 0 10 11 1 11 12 0 12 13 1 13 14 0 14 15 1 15 16 0 16 17 1 17 18 0 18 19 1 19 20 0 20 21 1 21 22 0 22 23 1 23 24 0 24 25 1 25 26 0 26 27 1 27 28 0 28 29 1 29 30 0 30 31 1 31 32 0 32 33 1 33 34 0 34 35 1 35 36 0 36 37 1 37 38 0 38 39 1...
output:
NO
result:
ok ok (1 test case)
Test #74:
score: 18
Accepted
time: 53ms
memory: 12552kb
input:
1 50000 199968 2 19369 1 2 21364 1 2 25155 1 2 27339 1 2 27511 1 2 44556 1 2 45351 1 3 44569 0 3 45843 0 3 49912 0 4 9491 0 5 49735 1 6 16383 1 6 28552 1 7 30996 1 8 7229 1 8 10756 1 8 12621 1 8 19752 1 8 44330 1 9 26023 1 9 35659 1 10 7610 1 10 16819 1 10 22540 1 10 27829 1 10 32872 1 10 35055 1 10...
output:
YES 249968 14 1 9901 1 10615 1 21952 1 27156 1 28245 1 37351 1 39756 1 40541 1 44280 1 20 0 4563 0 5729 0 5844 0 10940 0 27 1 1342 1 3689 1 16881 1 21243 1 22342 1 35323 1 36991 1 40947 1 48321 1 35 0 16800 0 17696 0 21391 0 26566 0 26975 0 33259 0 35297 0 38742 0 43513 0 47026 0 45 0 5891 0 6764 0 ...
result:
ok ok (1 test case)
Test #75:
score: 18
Accepted
time: 56ms
memory: 12436kb
input:
1 50000 199913 1 17199 0 1 34976 0 1 40637 0 2 19412 0 3 2252 1 3 2925 1 3 3029 1 3 6295 1 3 7328 1 3 10938 1 3 12057 1 3 17265 1 3 17912 1 3 18223 1 3 19003 1 3 21266 1 3 22296 1 3 22320 1 3 22663 1 3 24507 1 3 26280 1 3 26734 1 3 27637 1 3 28019 1 3 29941 1 3 31611 1 3 31704 1 3 31802 1 3 32467 1 ...
output:
YES 249913 4 0 967 0 9451 0 19596 0 10 0 5468 0 9292 0 23655 0 35219 0 46680 0 46842 0 47765 0 11 0 908 0 43219 0 17 0 6218 0 16039 0 31 0 25536 0 34864 0 34 0 8575 0 45162 0 35 0 5169 0 15926 0 16387 0 21316 0 24894 0 30821 0 32922 0 35234 0 48718 0 41 0 26798 0 30813 0 33460 0 35931 0 44297 0 4745...
result:
ok ok (1 test case)
Test #76:
score: 18
Accepted
time: 51ms
memory: 12368kb
input:
1 50000 199911 1 8404 1 1 17242 1 1 24057 1 1 31078 1 1 32448 1 1 33608 1 2 27010 1 2 47233 1 3 5128 1 3 6418 1 3 24676 1 3 48487 1 5 1034 1 5 10374 1 5 23871 1 5 31896 1 5 44262 1 6 22036 1 6 41207 1 7 2667 1 7 7316 1 7 30778 1 7 35899 1 7 47038 1 8 7828 1 9 9734 1 9 35195 1 9 49220 1 10 6037 1 11 ...
output:
YES 249911 1 1 8404 1 17242 1 24057 1 31078 1 32448 1 33608 1 2 1 27010 1 47233 1 16 1 22 1 7393 1 9730 1 10213 1 27317 1 32680 1 34010 1 39194 1 47100 1 47168 1 23 1 43320 1 25 1 1054 1 27544 1 28987 1 29 1 2586 1 31 1 25048 1 45326 1 33 1 13712 1 29729 1 36565 1 37147 1 42 1 11483 1 13875 1 14486 ...
result:
ok ok (1 test case)
Test #77:
score: 18
Accepted
time: 64ms
memory: 17000kb
input:
1 100000 199993 2 5800 1 2 38429 1 2 87603 1 2 97076 1 3 17781 0 3 27608 0 3 57980 0 3 60559 0 3 88247 0 4 14335 0 5 63749 1 7 25192 1 7 60951 1 7 63367 1 9 62836 1 10 21312 1 10 22145 1 10 78654 1 11 21555 1 11 84212 1 11 86088 1 11 99696 1 12 37520 1 13 15200 1 13 18408 1 14 89343 0 15 1999 1 15 1...
output:
YES 299993 2 1 5800 1 38429 1 87603 1 97076 1 17 1 30116 1 18 1 7437 1 54125 1 62939 1 31 1 20296 1 55067 1 82447 1 36 0 86272 0 39 1 51794 1 61767 1 85225 1 41 0 42487 0 53874 0 48 0 6693 0 12721 0 50770 0 94401 0 51 1 29416 1 54159 1 86803 1 53 1 31421 1 54468 1 54568 1 55 0 96344 0 61 1 30100 1 3...
result:
ok ok (1 test case)
Test #78:
score: 18
Accepted
time: 60ms
memory: 16260kb
input:
1 100000 199989 1 76702 0 2 12252 0 3 30590 0 3 95162 0 5 79468 0 7 51874 0 9 506 0 9 11079 0 9 52889 0 9 80135 0 11 9629 0 11 49499 0 11 55682 0 11 66404 0 12 27992 0 12 42958 0 12 48475 0 12 69809 0 15 13998 0 15 29664 0 17 14463 0 17 28903 0 17 48901 0 17 82954 0 17 92913 0 20 14614 1 20 20196 1 ...
output:
YES 299989 9 0 506 0 11079 0 52889 0 80135 0 10 0 12 0 27992 0 42958 0 48475 0 69809 0 13 0 14 0 17 0 14463 0 28903 0 48901 0 82954 0 92913 0 18 0 19 0 24 0 12778 0 41320 0 27 0 32 0 29968 0 37539 0 47818 0 33 0 45192 0 47371 0 53830 0 34 0 42021 0 36 0 38635 0 42 0 4088 0 22135 0 75129 0 99460 0 52...
result:
ok ok (1 test case)
Test #79:
score: 18
Accepted
time: 63ms
memory: 17444kb
input:
1 100000 199973 1 26091 1 3 4696 0 3 12011 0 3 14048 0 3 23953 0 3 48581 0 3 55894 0 3 58903 0 3 58965 0 3 64006 0 3 65907 0 3 81900 0 4 76090 1 5 44397 1 6 23916 0 6 24472 0 6 29712 0 6 29819 0 6 30269 0 6 34134 0 6 34773 0 6 37470 0 6 41593 0 6 43439 0 6 48579 0 6 52101 0 6 53803 0 6 60060 0 6 618...
output:
YES 299973 1 1 26091 1 4 1 76090 1 5 1 44397 1 7 1 28362 1 50931 1 58522 1 9 1 67671 1 12 1 16 1 7132 1 19 1 22671 1 27961 1 75058 1 22 1 23 1 63884 1 25 1 19300 1 30 1 85 1 19499 1 34543 1 31 1 39180 1 51877 1 75981 1 34 1 37 1 53868 1 64824 1 39 1 41592 1 40 1 42 1 7986 1 92923 1 46 1 27523 1 55 1...
result:
ok ok (1 test case)
Test #80:
score: 18
Accepted
time: 40ms
memory: 12276kb
input:
1 50000 199981 1 9617 0 1 13254 0 2 16509 1 2 27339 1 2 34328 1 2 38684 1 2 45351 1 3 1936 0 3 12116 0 3 21212 0 3 33378 0 3 41153 0 3 44569 0 3 49912 0 4 6411 0 4 17523 0 5 15195 1 5 19694 1 8 1301 1 8 12142 1 8 21098 1 8 29237 1 8 32347 1 8 36774 1 9 9064 1 9 26023 1 9 40620 1 10 4361 1 10 9251 1 ...
output:
YES 149549 3 0 12116 0 41153 0 44569 0 49912 0 8 1 21098 1 32347 1 11 1 48736 1 14 1 10615 1 38872 1 20 0 5729 0 5844 0 10940 0 22 1 29089 1 23 0 33386 0 25 0 2261 0 19324 0 26443 0 39690 0 44863 0 26 0 18706 0 23298 0 31496 0 43647 0 27 1 6826 1 31771 1 36991 1 38620 1 28 0 39978 0 29 0 709 0 10803...
result:
ok ok (1 test case)
Test #81:
score: 18
Accepted
time: 37ms
memory: 10252kb
input:
1 50000 199990 1 779 0 1 1093 0 1 3698 0 1 8592 0 1 11226 0 1 21318 0 1 24643 0 1 29562 0 1 45487 0 2 6651 0 2 9349 0 2 19670 0 2 19954 0 2 27340 0 2 28329 0 2 39707 0 2 46852 0 2 47818 0 3 2296 1 3 3615 1 3 8279 1 3 9627 1 3 11443 1 3 17694 1 3 23201 1 3 29842 1 3 32123 1 3 34302 1 3 43999 1 4 1155...
output:
YES 85139 1 0 3698 0 2 0 19954 0 39707 0 4 0 5 0 10 0 33004 0 11 0 13 0 14 0 15 1 7267 1 14325 1 19563 1 23006 1 23347 1 26285 1 30972 1 33375 1 39430 1 47766 1 17 0 18 0 19 0 20 0 21 0 22 0 23 0 10776 0 24 0 25155 0 26 0 28 0 25024 0 30 0 31 0 46068 0 32 0 33 0 34 0 2324 0 35 0 5065 0 7193 0 22209 ...
result:
ok ok (1 test case)
Test #82:
score: 18
Accepted
time: 37ms
memory: 10540kb
input:
1 50000 199983 1 11037 1 1 20705 1 1 22722 1 1 25398 1 1 32222 1 1 38283 1 1 43464 1 2 12626 1 2 25300 1 2 35398 1 2 40490 1 2 42361 1 2 42627 1 2 45506 1 3 9960 1 4 20466 1 4 34415 1 5 3631 1 5 7021 1 5 24632 1 5 30188 1 5 30666 1 5 32331 1 5 39201 1 5 45553 1 5 49795 1 6 5802 1 6 18080 1 6 20702 1...
output:
YES 85873 1 1 38283 1 2 1 4 1 5 1 30188 1 49795 1 6 1 7 1 11308 1 8 1 9 1 13 1 17 1 34363 1 18 1 19 1 20 1 21 1 39774 1 23 1 21304 1 24 1 25 1 28 1 29 1 30 1 33 1 2022 1 35 1 23844 1 36 1 37 1 800 1 29537 1 38 1 41 1 42 1 19708 1 24459 1 46 0 12238 0 16081 0 19315 0 19922 0 29572 0 48459 0 49 1 50 1...
result:
ok ok (1 test case)
Test #83:
score: 18
Accepted
time: 45ms
memory: 13188kb
input:
1 100000 199995 2 5800 1 2 38429 1 2 48015 1 3 12089 0 3 27718 0 3 49401 0 3 84851 0 4 7198 0 4 55509 0 4 86361 0 7 25192 1 7 74682 1 8 97749 1 9 2068 1 10 69054 1 10 78654 1 10 81225 1 11 44076 1 11 50618 1 12 37520 1 12 79722 1 13 62651 1 14 68509 0 14 68889 0 15 9694 1 15 17146 1 15 33158 1 15 74...
output:
YES 199661 2 1 5800 1 38429 1 48015 1 4 0 7 1 25192 1 11 1 44076 1 13 1 17 1 18 1 23 0 30 1 71529 1 31 1 55067 1 67481 1 36 0 86272 0 37 0 15356 0 32491 0 77215 0 39 1 19878 1 41241 1 76371 1 40 0 41 0 42 1 38531 1 46174 1 56647 1 60918 1 43 1 43713 1 45 1 50 0 28741 0 51 1 55 0 49971 0 79428 0 57 1...
result:
ok ok (1 test case)
Test #84:
score: 18
Accepted
time: 41ms
memory: 12184kb
input:
1 100000 199996 1 40390 0 1 49542 0 2 3647 0 2 40814 0 2 84407 0 2 87973 0 4 41330 0 4 45152 0 5 49392 0 7 376 0 7 51974 0 7 62702 0 9 13433 0 9 19038 0 9 28940 0 9 31353 0 9 78327 0 9 88453 0 10 80144 0 11 22291 0 11 55175 0 12 68366 0 12 77297 0 14 25334 0 14 92999 0 15 50979 0 15 56214 0 16 14896...
output:
YES 136325 5 0 49392 0 6 0 7 0 8 0 9 0 10 0 80144 0 11 0 55175 0 13 0 14 0 15 0 16 0 17 0 62549 0 18 0 19 0 20 1 11603 1 81653 1 83437 1 94502 1 23 0 99590 0 24 0 21893 0 25 0 26 0 27 0 28 0 29 0 30 0 77916 0 31 0 32 0 87531 0 33 0 3287 0 34 0 35 0 36 0 37 0 38 0 39 1 49003 1 53294 1 40 0 41 0 66377...
result:
ok ok (1 test case)
Test #85:
score: 18
Accepted
time: 45ms
memory: 12196kb
input:
1 100000 199993 2 36343 1 5 7051 1 5 19899 1 5 56841 1 5 78043 1 6 16961 0 6 82832 0 7 26247 1 7 39033 1 7 71905 1 7 73979 1 8 62552 1 8 92154 1 9 17984 1 9 26928 1 9 37416 1 9 83877 1 10 3821 1 10 10441 1 10 65072 1 10 77832 1 10 85366 1 12 35357 1 12 46221 1 12 72660 1 12 93814 1 12 96138 1 13 158...
output:
YES 135460 1 1 2 1 36343 1 4 1 5 1 7051 1 7 1 8 1 9 1 17984 1 10 1 12 1 13 1 51954 1 15 1 48897 1 16 1 19 1 22671 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 34 1 35 1 37 1 38 1 39 1 81316 1 40 1 19181 1 41 1 42 1 43 1 45 1 46 1 52786 1 84752 1 47 1 49 0 29010 0 30432 0 43330 ...
result:
ok ok (1 test case)
Test #86:
score: 18
Accepted
time: 28ms
memory: 10644kb
input:
1 100000 199995 2 4156 0 2 87333 0 2 90158 0 3 13118 0 3 15228 0 3 17999 0 4 2186 0 4 29195 0 4 47410 0 4 69083 0 4 78449 0 4 84967 0 6 28610 0 6 85599 0 7 17954 0 9 11209 0 11 35587 0 12 10861 0 12 78758 0 13 31375 0 13 89470 0 15 17362 0 15 25825 0 16 1142 0 16 2706 0 16 84404 0 18 5533 0 18 21178...
output:
YES 100000 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0 11 0 12 0 13 0 14 0 15 0 16 0 17 0 18 0 19 0 20 0 21 0 22 0 23 0 24 0 25 0 26 0 27 0 28 0 29 0 30 0 31 0 32 0 33 0 34 0 35 0 36 0 37 0 38 0 39 0 40 0 41 0 42 0 43 0 44 0 45 0 46 0 47 0 48 0 49 0 50 0 51 0 52 0 53 0 54 0 55 0 56 0 57 0 58 0 59 0 60 ...
result:
ok ok (1 test case)
Test #87:
score: 18
Accepted
time: 37ms
memory: 10504kb
input:
1 100000 199994 1 1585 1 1 73911 1 2 46807 1 3 939 1 4 18082 1 4 46856 1 7 10606 1 7 36179 1 7 53263 1 7 96897 1 10 50674 1 12 23467 1 14 3689 1 16 10071 1 16 63913 1 17 16662 1 17 23189 1 17 91225 1 17 95816 1 19 21529 1 20 47967 1 21 62050 1 22 21083 1 22 21376 1 22 84238 1 24 9167 1 24 49250 1 24...
output:
YES 100000 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 1 60 ...
result:
ok ok (1 test case)
Extra Test:
score: 0
Extra Test Passed