QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#546670#8258. Gift ExchangeHuangHanSheng41 144ms31176kbC++232.6kb2024-09-04 11:26:332024-09-04 11:26:41

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 4
Accepted
time: 0ms
memory: 20044kb

input:

10
13 14 16 18 17 19 20 8 6 4
7 12 15 2 11 10 9 3 5 1
10
2 3
1 6
1 7
5 8
1 10
2 6
5 10
3 6
3 7
4 7

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 #2:

score: 4
Accepted
time: 0ms
memory: 20040kb

input:

10
12 19 15 20 14 9 4 13 17 16
11 18 7 5 10 8 3 1 2 6
10
6 10
2 6
6 7
3 8
1 8
7 8
6 8
4 5
1 7
4 5

output:

Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes

result:

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

Test #3:

score: 4
Accepted
time: 0ms
memory: 20060kb

input:

10
15 8 12 19 6 10 16 18 20 17
13 3 5 14 1 4 9 7 2 11
10
1 3
2 6
5 7
1 4
2 7
1 2
2 5
1 3
2 6
4 5

output:

No
No
Yes
Yes
Yes
No
No
No
No
No

result:

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

Test #4:

score: 4
Accepted
time: 2ms
memory: 20040kb

input:

10
15 9 13 20 17 19 8 3 10 16
11 7 5 18 2 12 6 1 4 14
10
1 2
4 7
6 7
7 10
3 6
6 10
6 10
6 7
1 3
1 2

output:

No
Yes
No
No
Yes
No
No
No
Yes
No

result:

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

Test #5:

score: 4
Accepted
time: 0ms
memory: 22088kb

input:

7
14 7 5 8 12 10 13
4 6 3 2 11 9 1
10
4 5
3 7
1 5
1 3
5 6
3 7
3 7
4 7
5 7
4 5

output:

No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No

result:

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

Test #6:

score: 4
Accepted
time: 0ms
memory: 17984kb

input:

10
14 2 10 19 4 20 16 15 8 17
13 1 9 7 3 18 12 11 6 5
10
8 9
1 9
7 10
2 6
9 10
5 8
1 2
1 9
2 3
6 8

output:

No
No
Yes
No
Yes
No
No
No
No
No

result:

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

Test #7:

score: 4
Accepted
time: 0ms
memory: 19996kb

input:

10
9 12 19 5 13 17 7 15 10 20
8 1 18 2 4 16 6 14 3 11
10
1 8
3 6
2 3
2 3
7 9
5 9
3 8
7 10
5 9
4 8

output:

No
No
No
No
No
No
No
Yes
No
No

result:

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

Test #8:

score: 0
Wrong Answer
time: 2ms
memory: 22060kb

input:

10
20 11 4 9 19 15 8 13 14 17
3 10 1 6 18 12 7 2 5 16
10
4 5
4 8
3 10
4 10
4 6
2 9
3 10
4 8
3 5
7 10

output:

No
Yes
No
No
No
Yes
No
Yes
No
No

result:

wrong answer expected NO, found YES [2nd token]

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 10
Accepted

Test #30:

score: 10
Accepted
time: 87ms
memory: 26992kb

input:

100000
200000 87337 190412 58171 10676 178924 155670 153538 106523 166320 196463 174807 19706 66971 196345 114283 119288 59218 155349 194059 154822 98022 199346 153510 145408 187388 174214 150932 65211 35112 20551 176504 139581 41024 52730 150416 18789 190510 108780 47812 169962 158959 135239 191992...

output:

Yes

result:

ok YES

Test #31:

score: 10
Accepted
time: 89ms
memory: 27024kb

input:

99996
199992 55108 192122 156535 96703 158022 98612 154080 174501 80333 191718 138961 171355 154101 62771 14226 197265 155606 29245 170843 138895 82846 166147 165740 146215 131388 86029 172891 136364 149984 101524 192965 86471 145997 174545 141753 76373 143913 197383 78031 92038 142017 128688 134591...

output:

Yes

result:

ok YES

Test #32:

score: 10
Accepted
time: 83ms
memory: 26944kb

input:

99999
199997 170879 161773 28645 163801 191566 171319 165453 53288 132456 157500 91941 146443 170074 93531 161983 19502 64479 129891 144995 171001 161313 193878 181848 137588 99441 195737 143467 111802 194680 190788 115429 120877 169533 140028 197536 31383 148612 118644 93306 188532 134687 93192 735...

output:

Yes

result:

ok YES

Test #33:

score: 10
Accepted
time: 93ms
memory: 27072kb

input:

99998
199995 171377 133250 170806 197343 162890 176641 198229 156952 106802 148078 134198 38360 182569 58669 116012 120742 177680 93529 99582 123704 150105 171634 107951 125500 163732 179649 88588 39234 198625 121214 176445 63415 179868 187758 171381 182891 158588 157548 88592 171267 76505 73211 320...

output:

Yes

result:

ok YES

Test #34:

score: 10
Accepted
time: 87ms
memory: 24944kb

input:

99994
199986 176184 128449 165655 180411 108099 175456 183507 96091 70117 144956 115377 154518 160497 55545 181168 131848 118193 156102 182500 168439 63241 171910 127138 197292 163655 42841 94923 164742 143990 146191 166736 107846 141059 183167 82715 147429 71721 89024 132050 176003 157826 80392 158...

output:

Yes

result:

ok YES

Test #35:

score: 10
Accepted
time: 89ms
memory: 26944kb

input:

99992
199982 94622 159310 166234 105469 44414 52091 123694 172916 179711 149323 115375 166040 92513 67125 146185 197622 76337 98286 145089 106898 45508 188859 181520 186912 62260 77767 114546 103202 139705 181802 79604 153783 143459 173771 53329 161991 122820 59148 175497 171100 191733 170006 112486...

output:

Yes

result:

ok YES

Test #36:

score: 10
Accepted
time: 90ms
memory: 27024kb

input:

99994
199986 172588 101761 173680 154796 47906 165246 155807 142583 82053 124298 185751 146473 152843 53592 189568 141547 56758 179491 145227 199189 152477 77578 119916 185291 113298 199873 172624 155978 67770 48535 89031 186445 190000 86320 101939 89859 95948 119667 111209 45026 105189 107948 49321...

output:

No

result:

ok NO

Test #37:

score: 10
Accepted
time: 89ms
memory: 31176kb

input:

99992
199982 109852 155026 157923 110059 91615 184436 197597 189940 165799 197946 168174 61274 182820 197704 185711 79614 179286 55824 153991 71910 157841 175794 134500 29170 66409 76993 183438 161616 88974 76217 121790 147837 134276 136205 106385 89486 107495 102229 187620 174748 76130 75940 194935...

output:

No

result:

ok NO

Test #38:

score: 10
Accepted
time: 90ms
memory: 26932kb

input:

100000
199999 74639 195073 197398 179979 168474 145783 79979 159184 131687 174609 183930 160341 68420 127730 176972 164251 182791 133617 83641 167951 133542 35978 163253 187454 122787 187615 85608 79476 125951 114704 188425 93638 120054 192421 174834 106180 42561 71789 170972 180724 95208 199400 117...

output:

Yes

result:

ok YES

Subtask #4:

score: 31
Accepted

Test #39:

score: 31
Accepted
time: 63ms
memory: 29824kb

input:

74998
147369 94378 68913 123990 65257 88482 116281 130255 78568 141536 99818 113372 26849 44703 95080 48018 147366 120676 91071 19208 101933 124465 78741 140833 90216 52837 145872 105601 142557 113425 86814 84542 101123 108992 78297 100014 104368 69638 40964 118227 76398 117479 115743 72849 102952 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 #40:

score: 31
Accepted
time: 92ms
memory: 26940kb

input:

100000
170854 85803 190478 195356 68149 101079 160091 179386 130394 139476 179555 126978 167547 72065 161727 131638 174824 164983 186730 137165 199164 176656 182858 115220 171372 182351 157236 123780 62649 186367 133008 181264 148394 194183 128269 58610 118326 47996 183674 131477 91894 76140 154928 ...

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 #41:

score: 31
Accepted
time: 61ms
memory: 25644kb

input:

72263
130381 105716 139143 33477 86587 120207 73233 38155 92520 125495 23580 69974 121855 74665 137812 18565 132361 95705 128027 144100 124410 59047 128296 55909 122780 117585 50625 136320 49469 99327 72567 114712 39178 85774 98604 91033 96296 129069 106417 137597 55731 103597 92014 133512 101043 10...

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 #42:

score: 31
Accepted
time: 83ms
memory: 27004kb

input:

100000
126626 150000 164533 93954 84178 127720 196307 191298 197000 58182 74847 177055 162414 81634 197421 66855 75160 114529 152612 39251 195125 173835 185089 111782 87465 123997 67067 47121 108359 155858 183706 177604 157701 150153 132993 179460 130275 74441 147142 158401 175469 194555 174393 1407...

output:

Yes
No
No
Yes
No
Yes
No
No
Yes
Yes

result:

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

Test #43:

score: 31
Accepted
time: 89ms
memory: 23532kb

input:

98148
12647 155973 20767 36805 168027 146372 113253 66852 57625 1895 12580 165096 49832 70925 51643 104757 37054 65869 192814 19113 33302 2095 107427 178717 180641 23141 25274 164150 81130 106741 49558 145423 35903 177929 194630 68466 115774 120908 107796 114055 18798 78402 188605 138386 106234 5350...

output:

Yes
No
No
Yes
No
No
No
No
No
No

result:

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

Test #44:

score: 31
Accepted
time: 91ms
memory: 25580kb

input:

100000
10705 194107 21546 73701 152844 24382 42696 113958 60425 157337 37450 71952 62746 111551 19905 160604 108607 112452 11252 38865 119652 144352 121417 134813 133291 136001 199480 196487 185112 105850 198182 167163 17348 115046 28792 99322 28320 73922 133873 46997 31716 155771 165925 157474 311 ...

output:

Yes
No
No
No
Yes
No
Yes
Yes
Yes
Yes

result:

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

Test #45:

score: 31
Accepted
time: 64ms
memory: 24676kb

input:

74884
106721 73638 67742 96410 111958 112231 35979 93104 109910 105533 125985 31820 90312 4917 46772 87091 16222 49834 38316 93439 42894 370 140805 105063 73687 4903 70500 147126 118714 75867 53811 137670 116357 131869 87300 100714 50125 48637 12083 6759 25059 11873 127244 80583 30114 98073 36066 58...

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 #46:

score: 31
Accepted
time: 87ms
memory: 23556kb

input:

100000
194884 180232 99694 108507 186527 179325 154704 107083 14761 84155 140296 122106 99807 153759 3855 115584 187176 135737 105877 181408 9860 197000 84071 29406 37504 61026 56016 124009 147261 93231 123279 144432 10668 163135 75226 99713 189311 178949 118610 82204 184588 112542 56956 141800 7422...

output:

Yes
No
No
No
No
No
No
No
Yes
No

result:

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

Test #47:

score: 31
Accepted
time: 100ms
memory: 26304kb

input:

100000
48901 66438 27493 126347 130802 155756 127723 92218 110921 137983 87294 436 109907 103035 99539 168737 62151 62196 157894 186573 94231 136003 60825 61386 175468 129878 161172 11870 145933 138542 140182 97212 170789 82148 100299 80105 88294 81217 143864 127082 82070 46886 95073 130845 154295 1...

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 #48:

score: 31
Accepted
time: 100ms
memory: 24412kb

input:

100000
178066 2105 144975 117797 157700 173597 18760 176834 114946 88498 166855 141665 106055 149341 150425 196974 156802 94010 196259 96085 127390 154621 126879 101948 129822 149298 194479 87007 194971 174906 184770 91357 54911 148488 64651 67797 99102 26425 133707 175049 91625 44341 102338 72602 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 #49:

score: 31
Accepted
time: 71ms
memory: 22860kb

input:

100000
94066 77176 193622 73714 97624 79426 94370 176580 157580 141690 66586 8788 64196 100696 26030 179482 59510 95582 133752 61416 24964 24972 67522 10986 176770 156222 31440 11510 146460 138834 184146 143574 63056 13172 96790 124082 187668 108376 25664 77452 46238 97974 85546 5384 159972 111534 1...

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 #50:

score: 31
Accepted
time: 85ms
memory: 27512kb

input:

100000
105814 136154 194761 156342 191016 193768 121961 116018 128308 130066 179571 110568 126164 187249 140327 166565 157452 136488 184871 140336 163399 160402 112921 101237 119873 163459 183730 119422 100908 102471 171234 141366 198103 162068 100262 197971 158113 183657 185043 148264 197171 158909...

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 #51:

score: 31
Accepted
time: 96ms
memory: 26940kb

input:

100000
34427 128914 170520 39932 27524 58354 158017 146548 155397 2898 64206 3208 72908 110224 193130 22216 78165 25443 69044 36906 194074 15318 172534 179861 139244 127178 178361 171405 114224 44236 142627 68844 125054 134709 145945 136955 95026 171961 32488 179275 34036 86326 94732 92023 22627 494...

output:

No
No
No
Yes
No
No
No
No
No
Yes

result:

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

Subtask #5:

score: 0
Wrong Answer

Test #52:

score: 8
Accepted
time: 124ms
memory: 25824kb

input:

71726
4 5 7 10 11 17 20 24 26 27 28 29 31 35 36 38 40 42 44 46 48 50 51 52 55 56 57 59 61 62 66 68 69 70 72 73 75 78 79 83 85 86 91 93 96 97 98 100 105 107 108 109 110 111 112 113 116 117 120 124 125 126 127 129 132 133 135 139 144 145 146 148 149 152 153 154 156 157 159 161 163 165 167 173 174 178 ...

output:

Yes
Yes
No
No
Yes
No
No
No
No
No
No
No
No
No
No
Yes
No
Yes
No
No
No
Yes
No
No
No
No
No
No
No
No
No
Yes
No
No
No
Yes
No
No
No
Yes
Yes
No
No
No
Yes
No
No
No
No
No
Yes
Yes
No
No
No
No
No
Yes
No
Yes
Yes
No
Yes
No
No
No
No
No
Yes
Yes
No
No
No
No
Yes
Yes
No
No
No
No
No
No
Yes
No
No
No
No
Yes
No
No
Yes
No
...

result:

ok 200000 token(s): yes count is 62654, no count is 137346

Test #53:

score: 0
Wrong Answer
time: 144ms
memory: 28728kb

input:

100000
3 7 9 14 18 20 21 22 27 28 29 32 36 38 39 44 45 47 48 49 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 75 76 77 79 81 83 85 87 89 91 93 94 97 100 102 104 106 107 110 113 114 116 120 122 123 124 125 130 131 135 136 139 141 143 144 145 146 147 148 152 154 155 157 160 161 163 166 168 170 173 178 ...

output:

No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
Yes
Yes
No
Yes
No
No
No
No
Yes
Yes
No
No
No
No
No
No
No
No
No
No
Yes
No
No
No
No
No
No
Yes
No
Yes
Yes
No
No
No
No
No
No
No
Yes
No
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
No
Yes
No
No
No
No
No
No
Yes
Yes
No
No
No
No
Yes
N...

result:

wrong answer expected NO, found YES [16th token]

Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

0%

Subtask #8:

score: 0
Skipped

Dependency #1:

0%