QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#72168#5430. TriangeltalZhangYiDe100 ✓109ms9352kbC++141.7kb2023-01-14 18:57:472023-01-14 19:13:40

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 14
Accepted

Test #1:

score: 14
Accepted
time: 2ms
memory: 3316kb

input:

3
1 1 1

output:

YES
321

result:

ok Correct

Test #2:

score: 0
Accepted
time: 2ms
memory: 3444kb

input:

3
2 2 2

output:

NO

result:

ok Correct

Test #3:

score: 0
Accepted
time: 2ms
memory: 3312kb

input:

10
1 1 1 1 1 1 1 1 1 1

output:

YES
3211111111

result:

ok Correct

Test #4:

score: 0
Accepted
time: 2ms
memory: 3280kb

input:

10
3 3 3 3 3 3 3 3 3 3

output:

YES
3332221111

result:

ok Correct

Test #5:

score: 0
Accepted
time: 3ms
memory: 3480kb

input:

10
4 4 4 4 4 4 4 4 4 4

output:

NO

result:

ok Correct

Test #6:

score: 0
Accepted
time: 18ms
memory: 4456kb

input:

99999
33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 33333 ...

output:

YES
11111111111122222222222222111111111111111111111112222222222222222222222222222222222222222222222222111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222...

result:

ok Correct

Test #7:

score: 0
Accepted
time: 53ms
memory: 9156kb

input:

500000
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 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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

YES
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct

Test #8:

score: 0
Accepted
time: 55ms
memory: 9156kb

input:

500000
166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666 166666...

output:

YES
11111111111111222222222222222222111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222...

result:

ok Correct

Test #9:

score: 0
Accepted
time: 73ms
memory: 9352kb

input:

500000
166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667 166667...

output:

NO

result:

ok Correct

Test #10:

score: 0
Accepted
time: 44ms
memory: 9220kb

input:

500000
500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000 500000...

output:

NO

result:

ok Correct

Subtask #2:

score: 16
Accepted

Test #11:

score: 16
Accepted
time: 2ms
memory: 3448kb

input:

3
1 1 1

output:

YES
321

result:

ok Correct

Test #12:

score: 0
Accepted
time: 2ms
memory: 3484kb

input:

3
1 2 2

output:

NO

result:

ok Correct

Test #13:

score: 0
Accepted
time: 2ms
memory: 3264kb

input:

9
3 3 3 3 3 3 3 3 3

output:

YES
333222111

result:

ok Correct

Test #14:

score: 0
Accepted
time: 2ms
memory: 3292kb

input:

10
2 3 1 4 3 1 4 3 4 2

output:

YES
3231231212

result:

ok Correct

Test #15:

score: 0
Accepted
time: 2ms
memory: 3292kb

input:

10
1 9 5 4 3 9 4 6 5 1

output:

NO

result:

ok Correct

Test #16:

score: 0
Accepted
time: 2ms
memory: 3368kb

input:

10
5 3 2 2 3 2 5 3 3 3

output:

YES
1233231222

result:

ok Correct

Test #17:

score: 0
Accepted
time: 2ms
memory: 3364kb

input:

10
5 1 1 1 1 5 5 1 5 4

output:

YES
1222211213

result:

ok Correct

Test #18:

score: 0
Accepted
time: 2ms
memory: 3288kb

input:

10
1 1 1 1 7 1 7 1 2 1

output:

YES
2222121232

result:

ok Correct

Test #19:

score: 0
Accepted
time: 2ms
memory: 3444kb

input:

10
3 3 3 2 5 3 2 5 2 2

output:

YES
2223123132

result:

ok Correct

Test #20:

score: 0
Accepted
time: 1ms
memory: 3316kb

input:

10
5 3 3 3 3 3 5 2 2 3

output:

NO

result:

ok Correct

Test #21:

score: 0
Accepted
time: 2ms
memory: 3332kb

input:

10
2 2 7 7 1 1 1 1 1 1

output:

NO

result:

ok Correct

Test #22:

score: 0
Accepted
time: 0ms
memory: 3360kb

input:

10
1 3 1 3 3 2 4 1 5 2

output:

YES
3232221312

result:

ok Correct

Test #23:

score: 0
Accepted
time: 1ms
memory: 3364kb

input:

3
1 2 2

output:

NO

result:

ok Correct

Subtask #3:

score: 11
Accepted

Test #24:

score: 11
Accepted
time: 2ms
memory: 3316kb

input:

4
1 1 1 1

output:

YES
3211

result:

ok Correct

Test #25:

score: 0
Accepted
time: 2ms
memory: 3364kb

input:

5
2 2 1 1 1

output:

YES
11322

result:

ok Correct

Test #26:

score: 0
Accepted
time: 2ms
memory: 3360kb

input:

3
3 1 1

output:

NO

result:

ok Correct

Test #27:

score: 0
Accepted
time: 67ms
memory: 9148kb

input:

500000
1 2 3 1 2 3 2 2 3 3 1 1 2 3 1 1 2 3 1 3 2 1 2 3 1 3 3 3 1 2 3 2 2 2 1 3 1 2 2 2 2 3 3 1 3 3 1 2 2 3 1 2 3 2 2 1 1 1 3 2 3 1 1 2 3 1 2 1 1 1 1 1 1 3 3 1 2 2 2 2 3 2 2 1 3 3 3 2 1 3 1 1 1 1 2 3 3 3 3 2 2 3 1 1 1 2 2 1 3 3 3 2 2 3 3 1 2 3 2 3 2 2 2 2 2 3 1 3 2 1 2 1 2 2 2 1 1 1 1 2 1 3 1 1 1 1 2...

output:

YES
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct

Test #28:

score: 0
Accepted
time: 2ms
memory: 3292kb

input:

9
3 3 3 3 3 3 3 3 3

output:

YES
333222111

result:

ok Correct

Test #29:

score: 0
Accepted
time: 55ms
memory: 9308kb

input:

500000
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 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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

YES
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct

Test #30:

score: 0
Accepted
time: 2ms
memory: 3316kb

input:

8
3 3 3 3 3 3 3 3

output:

NO

result:

ok Correct

Test #31:

score: 0
Accepted
time: 2ms
memory: 3360kb

input:

8
2 2 3 2 3 2 1 3

output:

YES
32121231

result:

ok Correct

Test #32:

score: 0
Accepted
time: 2ms
memory: 3448kb

input:

6
1 2 3 2 2 1

output:

YES
321223

result:

ok Correct

Test #33:

score: 0
Accepted
time: 2ms
memory: 3356kb

input:

6
1 3 2 3 1 1

output:

YES
213122

result:

ok Correct

Test #34:

score: 0
Accepted
time: 0ms
memory: 3484kb

input:

6
2 2 1 1 3 3

output:

NO

result:

ok Correct

Subtask #4:

score: 23
Accepted

Dependency #2:

100%
Accepted

Test #35:

score: 23
Accepted
time: 2ms
memory: 3348kb

input:

3000
946 211 1053 111 456 1294 810 1329 967 1198 256 1323 97 1318 109 1436 778 460 277 78 1345 190 13 183 340 557 504 1183 1190 1049 174 362 1304 1001 843 1065 453 605 472 1418 1046 1478 353 843 1024 723 656 1099 921 1102 604 959 1434 1294 1295 541 635 739 516 908 1445 1380 832 1293 62 43 82 879 70 ...

output:

NO

result:

ok Correct

Test #36:

score: 0
Accepted
time: 2ms
memory: 3328kb

input:

3000
30 556 623 1011 135 983 737 231 804 760 1071 646 296 540 689 934 410 391 393 488 200 830 396 592 154 605 880 400 368 653 1080 898 529 881 250 1088 325 881 877 38 482 435 265 426 351 569 1013 503 855 636 1073 363 307 81 322 59 457 240 923 101 551 359 614 546 283 353 849 519 424 793 574 918 412 6...

output:

YES
32213112111122112222312232122111212121132222221212122323221322222212212121211111111111123213232121111121133213213112333122213222211312113321322211121223121321332231311211221333321321323112212232213123222211133122121311121111133212221211213222121123121221132112112121211122232111212222232232223333...

result:

ok Correct

Test #37:

score: 0
Accepted
time: 2ms
memory: 3316kb

input:

3000
1936 2558 2469 2070 19 603 1655 1032 2508 75 1532 1671 209 2848 338 2834 2846 205 2895 1944 480 1394 1867 265 1473 1032 1332 1979 77 551 2748 185 1609 1762 1507 1972 1684 2605 396 2722 486 1967 670 2018 2934 2015 2215 308 911 604 1788 15 203 2772 2449 2791 2458 2100 1055 2862 740 258 1343 2672 ...

output:

NO

result:

ok Correct

Test #38:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

3000
1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 ...

output:

YES
12222221111121111111111222222222222222222222222111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct

Test #39:

score: 0
Accepted
time: 2ms
memory: 3352kb

input:

3000
500 1000 500 500 1000 500 1000 1000 1500 1000 1000 1000 1000 500 1500 1000 1000 1500 1000 500 1000 1000 1500 1000 500 1000 1000 1000 500 1000 1500 1000 1000 1000 1000 1000 1000 500 1000 1000 1000 500 1500 500 500 1500 500 1000 1000 500 500 1000 500 1000 500 1500 1000 500 500 500 1500 1000 500 1...

output:

YES
32332322122223122123221232223212222223222313313223323231233312322223213232221233222213222222322221231323232123333221323223332121322222333231213222222122131122122313322321232222332323221121322123133123313122223233323232311222321213123222231223232233223322232323322232311122312132332231323133211313...

result:

ok Correct

Test #40:

score: 0
Accepted
time: 1ms
memory: 3416kb

input:

3000
1000 1500 1500 1000 1000 1000 500 500 500 1000 500 500 500 1500 1500 1000 1500 1500 1500 500 1500 1000 500 500 500 1500 1500 500 500 1000 1000 500 1000 1500 500 1500 1500 1000 500 500 1500 500 1500 500 1500 500 1500 500 1500 1000 500 500 500 500 1500 500 1000 500 1500 1000 1000 500 1500 500 100...

output:

YES
31133322232221131112132221122332312113221212121213222212321332123212222121111332211121232232122112223231211232212221313112322322222322111323122121121222122132311113222332133223222212211222232331222221222223121222212322213223112332223212121211223311111322132112322232232222112232112112222122231323...

result:

ok Correct

Test #41:

score: 0
Accepted
time: 2ms
memory: 3356kb

input:

3000
1500 500 500 1500 1000 1500 500 500 1000 1500 1500 1000 500 1500 1500 1000 1500 500 500 1000 1500 1500 500 1000 1000 1000 500 1000 1500 500 1500 1000 1500 500 1500 1500 500 500 500 1500 1000 500 1500 500 500 500 500 1500 1500 500 1500 500 500 500 500 500 500 1500 500 1500 1500 1500 1000 1500 15...

output:

NO

result:

ok Correct

Test #42:

score: 0
Accepted
time: 0ms
memory: 3404kb

input:

3000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

YES
22222222222222222222222222222222222232222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222...

result:

ok Correct

Test #43:

score: 0
Accepted
time: 3ms
memory: 3408kb

input:

3000
1000 999 1001 1001 999 1001 999 999 1001 999 1000 999 1001 999 1000 1000 1000 1000 1001 1001 1001 999 1000 1000 1001 1001 1000 1000 1001 1000 1000 1000 1001 1001 1001 999 999 999 999 1001 1001 1001 1000 1000 999 1000 1001 999 999 1000 1000 999 999 999 1001 1001 1000 1000 1001 1001 1000 1001 100...

output:

YES
32112122123212333311123311331333111222211133231223322211331131322313122213332232133332221311221312332213212323233121112113321213313323121221232121121112221123313311223313112122211332321213331113113131313121133132213331312133113322112321113231212232321311321231113313223232132331122133131321321113...

result:

ok Correct

Test #44:

score: 0
Accepted
time: 2ms
memory: 3464kb

input:

3000
1000 999 999 999 1001 1000 1000 1000 999 999 1001 999 999 1001 999 1000 999 1001 999 1001 1001 1001 1000 1001 1001 1000 1000 999 999 999 1000 1000 999 1000 1001 1001 999 1001 1001 999 999 1001 1000 999 999 1001 1001 1001 1000 1000 999 999 1001 1000 1001 1001 1001 999 1000 1000 999 1001 1001 100...

output:

NO

result:

ok Correct

Test #45:

score: 0
Accepted
time: 1ms
memory: 3324kb

input:

3000
500 1500 500 500 1000 1500 500 1500 1500 500 500 500 500 500 500 1500 1500 1500 1000 500 500 500 500 1500 500 1000 1500 1500 500 1500 1500 1500 1000 1000 500 1500 499 1499 500 1500 1500 500 500 1500 500 500 1500 500 1500 500 1500 500 500 1000 1500 1000 500 1500 500 500 1500 1500 500 1500 1500 1...

output:

YES
21223121122222211132222123112111332121211221221212122313212211211131122121212222223222122133211122223213121222111213233112113213322321211121212213121322313231312123121113121122112211211211211122133212212222112222222122221323332311221231222332111222221122211122232212211112213321222232123112212223...

result:

ok Correct

Subtask #5:

score: 36
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #46:

score: 36
Accepted
time: 76ms
memory: 9344kb

input:

500000
206683 149403 100051 60566 227661 69324 153148 193329 149233 122123 124155 164163 59896 22307 28638 207076 24957 82961 1746 143886 28313 235247 244761 105363 209301 66751 117250 192245 31513 34908 108799 26754 131274 51174 105538 192566 221101 194910 29614 234984 209439 94073 101334 31990 102...

output:

NO

result:

ok Correct

Test #47:

score: 0
Accepted
time: 75ms
memory: 9228kb

input:

500000
367492 384999 184260 21161 109059 497007 230955 188722 321918 306008 478775 360059 446071 58076 373158 53590 245847 372793 127111 186065 295913 87452 4873 286811 228106 33698 196763 136804 432997 142517 304362 178726 228588 2667 475749 184954 6453 11587 351759 314058 435152 410402 229442 1215...

output:

NO

result:

ok Correct

Test #48:

score: 0
Accepted
time: 45ms
memory: 6844kb

input:

300000
100000 100000 100000 100000 100000 100000 50000 100000 100000 150000 100000 100000 100000 100000 150000 50000 50000 100000 100000 50000 150000 50000 150000 50000 100000 150000 50000 100000 50000 100000 100000 50000 50000 150000 100000 50000 100000 100000 50000 50000 50000 50000 100000 50000 1...

output:

YES
22222232212222133223131321323223312322333323222332113333332223333323322221333232212222222123332122221323232312222313122222122322122222123223231233332321213222231213132122222312232123233223231132231231222222132323221333322222223323221223133223223221322221311322113221232123213213223332233222312322...

result:

ok Correct

Test #49:

score: 0
Accepted
time: 46ms
memory: 6812kb

input:

300000
50000 150000 50000 50000 50000 50000 50000 150000 50000 50000 100000 150000 150000 50000 50000 150000 50000 150000 100000 150000 150000 100000 50000 100000 50000 50000 50000 150000 50000 50000 150000 50000 50000 100000 50000 150000 50000 150000 150000 150000 100000 150000 50000 50000 50000 15...

output:

YES
21222221223112212131132322212212232121113122213222111222111132211331212212122222123211111111122312311121322211112212121122222212221222232311212113111122112321122221111232232123223311331121322132211222212121232332212221221312212133221122113122222312111223121122122122231221222322112121122112213221...

result:

ok Correct

Test #50:

score: 0
Accepted
time: 34ms
memory: 6964kb

input:

300000
100000 100000 150000 150000 150000 150000 150000 50000 50000 100000 150000 50000 150000 50000 150000 150000 50000 150000 50000 50000 150000 150000 50000 50000 50000 150000 50000 150000 150000 50000 50000 50000 50000 50000 150000 100000 150000 50000 150000 150000 50000 50000 50000 100000 50000...

output:

NO

result:

ok Correct

Test #51:

score: 0
Accepted
time: 45ms
memory: 9148kb

input:

500000
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 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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

YES
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222...

result:

ok Correct

Test #52:

score: 0
Accepted
time: 28ms
memory: 9292kb

input:

500000
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 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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

NO

result:

ok Correct

Test #53:

score: 0
Accepted
time: 54ms
memory: 9236kb

input:

500000
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

output:

YES
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222...

result:

ok Correct

Test #54:

score: 0
Accepted
time: 93ms
memory: 9228kb

input:

500000
199998 199997 199999 209997 210000 200000 199996 209998 89998 89999 199997 199997 90000 199998 199999 200000 199998 199999 199996 90000 209999 209998 210000 199997 209997 199999 199998 89999 89998 199997 199997 199999 209999 89997 199993 89998 199999 199994 199998 89999 200000 89996 90000 199...

output:

YES
22211221332232222223111212233222132322232332221332213323123323331212112122323232222113333232222223221113312332123323122231133133222313322112332333222333323331322122332332233221312213123313212212232233222321222222322233321232132223232312332232311133313333123332222232212212122323323333121222313231...

result:

ok Correct

Test #55:

score: 0
Accepted
time: 87ms
memory: 9172kb

input:

500000
166665 166662 166665 166667 166667 166666 166668 166668 166666 166661 166663 166665 166662 166664 166668 166661 166666 166664 166663 166668 166668 166663 166666 166663 166667 166664 166664 166665 166662 166665 166665 166666 166666 166665 166666 166666 166667 166665 166664 166662 166664 166666...

output:

YES
23211111133233131331131313323221121112333113313121313321113321221323323332131311311132333133122331313211123131133132313112121133213211123122233113332123322333133331331122111311113233233113321333313333233211313332333133113113131321333233333331331321321133131122213233313112231332311322221313113313...

result:

ok Correct

Test #56:

score: 0
Accepted
time: 46ms
memory: 9228kb

input:

500000
166665 166667 166668 166667 166665 166668 166667 166667 166667 166665 166667 166668 166667 166668 166667 166665 166668 166665 166668 166668 166668 166668 166668 166668 166667 166665 166668 166667 166665 166667 166667 166667 166667 166665 166668 166667 166668 166668 166668 166667 166668 166668...

output:

NO

result:

ok Correct

Test #57:

score: 0
Accepted
time: 47ms
memory: 9236kb

input:

500000
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 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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

YES
22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222...

result:

ok Correct

Test #58:

score: 0
Accepted
time: 109ms
memory: 9180kb

input:

500000
105760 146693 34690 104825 6922 17354 103212 144121 33617 81313 164032 130487 100630 158246 8488 124407 35495 106959 43994 100600 35203 38928 27734 64937 161032 141580 116349 103127 4453 107878 5083 74005 27689 7927 45133 120683 158637 2287 143724 31016 72851 47984 143175 108872 126393 151063...

output:

YES
11213311221111312121223211113132332113122211112112311122122111122222321112111212212222231212223221211312211311123112112312123122111231112113232111111111111121132231211121123221222312212131211111211221132111111233131121121311122212211121321211322123221322121232212321111211112312221131221121112212...

result:

ok Correct