QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#448924 | #8647. JOI Tour | DitaMirika# | 52 | 282ms | 52752kb | C++23 | 2.3kb | 2024-06-20 12:28:16 | 2024-06-20 12:28:17 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 0ms
memory: 4160kb
input:
400 1 1 0 2 2 0 2 1 1 1 1 0 1 2 2 2 2 0 0 2 0 2 0 2 1 1 2 2 1 2 1 0 1 2 2 2 0 0 0 2 1 2 2 0 0 0 1 2 1 1 0 1 1 2 1 2 2 2 1 1 0 1 1 1 2 2 1 1 0 0 1 1 0 0 1 1 1 2 2 2 1 1 2 1 1 1 0 2 0 2 1 0 1 1 2 0 0 2 1 0 2 2 1 0 0 0 0 1 1 1 0 1 2 1 1 1 2 0 2 2 0 2 0 1 0 1 1 1 1 0 1 1 0 0 0 2 2 0 2 2 2 1 1 0 1 2 0 1 ...
output:
597892 604453 604236 600488 598028 594449 593671 586072 582432 581797 586919 588018 591441 592178 589303 587825 591777 595845 591906 591733 593937 592286 587593 583280 582383 580941 576582 577908 579779 578590 578141 577238 577854 584168 591759 594698 591476 590496 583825 582797 581264 586076 587779...
result:
ok
Test #2:
score: 6
Accepted
time: 1ms
memory: 4100kb
input:
3 1 2 2 0 2 0 1 100 1 0 2 0 0 2 0 0 0 1 2 1 0 2 0 1 0 2 0 1 0 2 1 2 2 2 0 1 2 0 1 0 1 2 1 0 1 1 0 2 1 2 1 0 2 2 2 0 1 1 0 1 1 2 2 1 2 2 2 0 2 2 2 0 2 1 2 0 2 1 1 1 1 0 1 1 0 0 2 0 0 1 1 0 1 2 0 0 0 1 1 1 0 0 2 2 0 1 2 0 0 2 2 2 2 1 1 2 0 1 1 1 1 2 1 0 0 2 2 0 2 1 0 0 0 1 1 2 1 1 2 2 1 2 0 2 1 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2 2 0 0 0 2 2 1 1 1 2 1 1 0 1 0 0 2 1 2 1 2 0 0 2 0 2 1 2 1 1 0 2 2 2 1 1 0 2 0 0 0 1 2 2 1 2 1 0 2 0 0 1 0 0 0 1 2 0 2 1 0 0 0 0 1 1 2 1 1 0 1 0 ...
output:
89736 92089 97184 97881 97958 97957 98575 98780 98194 98636 98571 98118 98137 96880 97697 97751 97126 95885 95846 95881 95780 96554 97541 97088 97147 97124 97229 97271 97761 98723 98751 99213 99575 99558 99541 100018 99689 100639 100160 101057 98928 99588 98995 99010 98196 103072 103702 103678 10365...
result:
ok
Test #7:
score: 6
Accepted
time: 2ms
memory: 3952kb
input:
400 1 1 0 2 2 0 2 1 1 1 1 0 1 2 2 2 2 0 0 2 0 2 0 2 1 1 2 2 1 2 1 0 1 2 2 2 0 0 0 2 1 2 2 0 0 0 1 2 1 1 0 1 1 2 1 2 2 2 1 1 0 1 1 1 2 2 1 1 0 0 1 1 0 0 1 1 1 2 2 2 1 1 2 1 1 1 0 2 0 2 1 0 1 1 2 0 0 2 1 0 2 2 1 0 0 0 0 1 1 1 0 1 2 1 1 1 2 0 2 2 0 2 0 1 0 1 1 1 1 0 1 1 0 0 0 2 2 0 2 2 2 1 1 0 1 2 0 1 ...
output:
17280 17415 17280 17408 17272 17145 17272 17136 17000 16988 17112 16988 16851 16974 17097 17080 17202 17324 17202 17324 17466 17324 17182 17061 16940 16920 16800 16660 16541 16520 16380 16356 16497 16638 16779 16660 16520 16497 16356 16497 16638 16520 16541 16560 16577 16714 16592 16605 16728 16740 ...
result:
ok
Subtask #2:
score: 8
Accepted
Dependency #1:
100%
Accepted
Test #8:
score: 8
Accepted
time: 34ms
memory: 4380kb
input:
4000 2 0 2 1 2 1 0 2 0 2 2 1 0 2 2 2 2 1 1 2 2 1 1 0 2 0 0 2 1 0 0 1 1 1 0 2 0 2 2 1 0 2 2 1 0 2 2 1 2 2 0 2 0 1 1 2 2 0 2 0 0 1 0 0 0 1 2 1 0 2 2 1 0 0 0 0 1 2 0 0 1 2 1 0 0 1 2 2 1 2 0 2 0 2 1 2 1 0 0 1 1 2 2 2 1 2 2 0 2 0 1 2 0 1 2 1 2 2 1 1 1 2 0 0 0 0 1 2 2 2 0 1 1 2 2 2 0 1 0 0 2 1 1 0 2 0 1 0...
output:
620474975 620091276 620213053 620215716 620182492 619967950 620433875 620378867 619791163 620294584 620042350 620254670 619599499 619635328 619632073 619845490 620198042 620214770 620452856 620637250 620099913 620537344 620561024 620602104 620531392 620536225 620559149 621081398 621137321 621348648 ...
result:
ok
Test #9:
score: 8
Accepted
time: 8ms
memory: 4252kb
input:
4000 0 1 1 2 1 2 1 2 2 2 0 0 2 1 2 1 1 0 0 2 0 0 2 0 2 1 2 1 0 2 2 1 2 0 2 1 0 1 2 1 1 0 0 0 0 1 2 0 1 2 0 1 2 2 1 2 1 2 1 1 0 0 0 0 1 0 0 0 2 2 1 2 2 0 0 1 0 1 1 0 1 1 0 0 1 1 1 1 0 0 0 2 0 0 0 2 1 1 2 0 0 0 0 0 0 0 2 0 1 1 1 2 2 2 1 2 0 1 0 2 0 0 1 2 0 2 1 0 0 1 0 2 2 0 0 0 1 0 1 0 0 2 2 1 2 0 0 0...
output:
42768942 42797072 42797223 42840318 42832995 42797246 42797380 42817147 42816920 42815937 42778805 42753526 42752585 42787135 42764416 42796136 42796797 42766303 42765309 42764279 42740223 42739766 42767580 43539681 43587532 43564273 43590474 43562674 43561503 43524119 43524798 43524001 43525085 435...
result:
ok
Test #10:
score: 8
Accepted
time: 20ms
memory: 4260kb
input:
4000 2 0 2 1 2 1 0 2 0 2 2 1 0 2 2 2 2 1 1 2 2 1 1 0 2 0 0 2 1 0 0 1 1 1 0 2 0 2 2 1 0 2 2 1 0 2 2 1 2 2 0 2 0 1 1 2 2 0 2 0 0 1 0 0 0 1 2 1 0 2 2 1 0 0 0 0 1 2 0 0 1 2 1 0 0 1 2 2 1 2 0 2 0 2 1 2 1 0 0 1 1 2 2 2 1 2 2 0 2 0 1 2 0 1 2 1 2 2 1 1 1 2 0 0 0 0 1 2 2 2 0 1 1 2 2 2 0 1 0 0 2 1 1 0 2 0 1 0...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok
Subtask #3:
score: 6
Accepted
Test #11:
score: 6
Accepted
time: 94ms
memory: 33672kb
input:
200000 0 2 2 0 2 2 0 1 1 0 2 2 0 1 2 2 0 1 0 2 1 1 0 1 0 2 0 2 0 0 0 1 0 0 2 0 2 1 0 0 1 1 1 0 0 2 1 2 2 1 0 2 2 2 0 2 2 1 2 0 1 0 0 1 2 0 0 2 1 1 1 0 1 1 1 2 1 0 1 1 0 1 2 2 2 0 1 0 1 1 0 2 0 1 0 2 0 0 2 2 2 2 2 0 0 2 1 2 2 1 2 0 1 1 1 1 1 0 2 0 2 0 1 1 1 0 1 0 2 1 2 0 1 1 0 2 1 2 2 2 0 0 2 2 2 0 1...
output:
77241161705660
result:
ok
Test #12:
score: 6
Accepted
time: 108ms
memory: 33400kb
input:
200000 2 1 2 0 2 1 2 1 2 1 1 1 2 1 2 1 2 1 1 1 1 2 0 1 2 1 1 2 1 2 2 2 1 2 2 2 1 2 2 1 1 1 2 2 1 1 2 2 1 2 1 1 2 2 1 2 2 2 1 2 2 2 1 2 1 1 2 2 2 1 1 2 2 1 1 2 1 2 1 1 2 1 2 2 2 1 1 1 2 2 2 2 1 1 1 2 1 1 2 1 1 2 1 2 2 2 2 1 1 2 1 2 2 1 1 1 2 1 1 1 2 0 2 1 2 2 1 1 2 2 2 2 1 1 1 1 2 1 1 2 2 2 1 1 1 1 2...
output:
14535453821146
result:
ok
Test #13:
score: 6
Accepted
time: 89ms
memory: 30292kb
input:
200000 2 2 0 2 2 0 0 0 0 0 2 2 2 2 0 2 2 2 2 1 0 2 0 2 2 0 0 2 2 0 0 2 2 1 0 2 0 2 0 0 2 1 0 0 0 2 0 0 0 2 2 0 2 0 2 2 0 0 0 0 2 0 0 2 0 2 0 2 0 2 2 2 2 2 0 2 2 2 2 0 0 0 0 0 2 0 2 2 0 2 0 0 2 0 0 2 2 2 0 2 0 2 2 0 2 2 2 0 0 2 0 1 0 2 0 2 2 0 2 2 2 0 2 2 0 2 0 2 0 2 0 0 0 0 2 0 0 2 0 0 0 2 0 0 0 2 0...
output:
15024455356747
result:
ok
Test #14:
score: 6
Accepted
time: 100ms
memory: 34304kb
input:
200000 1 0 0 1 2 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 2 0 0 0 1 1 0 0 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 2 1 0 1 1 1 1 0 1 2 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 1 0 1 0 1 0 1 2 1 0 0 1...
output:
14979709993295
result:
ok
Test #15:
score: 6
Accepted
time: 44ms
memory: 24300kb
input:
200000 0 1 2 1 2 1 0 1 0 0 2 0 0 1 0 0 2 0 0 0 2 1 0 1 0 0 2 2 2 1 0 2 1 1 2 1 2 1 2 0 2 1 0 2 0 2 2 2 2 0 2 1 2 1 1 1 0 1 2 2 1 1 0 0 0 1 1 1 0 0 1 1 1 2 0 2 2 0 2 2 2 2 0 2 2 0 1 0 1 0 1 0 2 1 1 2 0 0 2 1 1 0 0 2 2 1 2 2 2 1 1 0 1 2 0 0 1 1 1 1 1 1 0 0 2 1 1 0 0 0 0 0 2 1 1 2 2 1 1 0 2 0 1 1 1 2 2...
output:
457084700208
result:
ok
Test #16:
score: 6
Accepted
time: 47ms
memory: 24500kb
input:
200000 0 0 1 0 1 1 1 1 0 2 2 1 2 1 2 0 0 0 2 0 0 1 0 1 1 0 1 0 2 0 0 1 1 1 1 2 1 1 1 0 2 0 0 2 2 2 0 2 1 0 0 2 0 0 2 1 0 2 1 2 0 2 2 1 0 1 0 0 2 1 2 2 2 0 1 2 2 2 2 0 1 0 2 2 1 0 0 1 2 1 0 2 1 2 0 0 2 0 2 2 2 2 1 0 0 2 0 2 0 2 2 2 1 1 1 1 1 0 1 1 0 0 2 2 1 0 2 0 2 1 2 2 2 2 2 0 0 1 0 1 0 1 2 1 0 0 2...
output:
490004211265
result:
ok
Test #17:
score: 6
Accepted
time: 64ms
memory: 24224kb
input:
200000 1 1 1 1 0 2 1 0 1 0 2 0 2 0 2 2 2 0 2 1 1 2 0 0 0 0 0 2 2 2 0 2 1 2 0 1 0 2 2 1 2 1 0 0 2 1 0 2 1 1 0 1 2 2 0 0 2 0 2 2 1 2 1 2 0 0 1 1 0 1 2 1 2 0 2 2 0 2 0 2 1 0 2 2 2 0 1 0 0 0 2 2 2 2 0 0 0 0 1 2 2 1 1 2 2 1 2 1 2 0 0 1 2 1 0 1 0 0 0 2 1 1 1 0 0 1 2 1 1 1 0 1 1 0 2 1 1 0 1 1 2 2 1 2 1 1 0...
output:
149609988117
result:
ok
Test #18:
score: 6
Accepted
time: 73ms
memory: 24204kb
input:
200000 0 1 2 1 2 2 2 2 0 1 1 2 0 0 0 0 1 1 0 2 0 2 1 1 1 2 2 0 2 2 0 1 1 1 2 0 0 1 2 1 2 1 0 1 2 1 1 2 0 1 1 0 0 1 0 1 0 1 0 0 1 2 2 2 2 1 2 0 0 2 1 2 1 2 1 0 2 2 0 2 1 1 1 1 2 2 1 0 2 2 2 2 1 0 2 2 0 0 1 0 1 2 1 1 2 0 2 1 1 2 2 2 1 0 2 2 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 2 0 0 2 1 1 0 2 2 1 1 0 1...
output:
490004211265
result:
ok
Test #19:
score: 6
Accepted
time: 72ms
memory: 24764kb
input:
200000 2 1 1 1 2 0 0 1 2 0 1 1 1 2 0 0 2 1 2 0 0 0 2 1 0 1 1 1 2 2 2 2 2 1 0 2 2 2 1 2 0 1 2 0 0 2 2 0 0 0 0 1 2 0 1 0 0 1 1 2 2 0 0 1 2 2 1 0 1 2 2 2 0 0 0 1 2 1 1 2 2 1 2 1 0 0 0 2 1 1 2 2 2 1 0 1 2 2 1 1 1 1 2 1 1 2 2 1 2 1 2 1 0 2 2 2 2 0 0 1 2 2 2 0 1 0 2 2 0 0 0 2 2 0 2 0 0 1 0 0 2 0 1 0 1 1 2...
output:
1812572240374
result:
ok
Test #20:
score: 6
Accepted
time: 94ms
memory: 24948kb
input:
200000 1 0 0 2 0 2 0 0 2 1 2 1 0 0 0 1 1 2 1 2 0 2 0 0 2 0 2 0 2 1 1 1 2 2 0 0 2 2 2 1 1 2 2 0 2 0 0 0 0 0 1 1 0 0 0 1 2 0 1 2 1 2 0 1 2 0 0 0 2 2 2 1 2 2 0 1 2 1 1 0 0 1 1 2 0 1 0 0 2 0 2 2 0 2 2 2 0 1 0 1 0 0 2 0 1 2 1 1 1 0 1 1 1 0 0 2 2 1 0 2 0 1 2 2 1 1 1 1 1 1 0 0 1 0 2 1 2 0 0 1 2 0 2 2 2 0 0...
output:
7322589985203
result:
ok
Test #21:
score: 6
Accepted
time: 72ms
memory: 28980kb
input:
200000 2 2 2 1 1 0 1 0 0 1 1 0 0 1 0 0 0 2 0 0 2 0 0 1 1 2 1 0 2 1 1 1 2 2 1 0 0 2 2 0 0 1 2 0 0 1 2 2 0 1 1 1 1 1 0 2 2 2 1 0 2 1 0 1 0 2 1 0 0 0 1 0 2 1 2 0 0 0 0 2 2 2 2 0 0 1 0 1 1 0 1 2 2 2 2 2 2 2 1 0 0 2 1 0 2 0 2 2 0 0 2 1 2 0 2 2 0 2 0 0 1 0 2 1 1 2 2 1 1 2 1 2 0 0 2 2 0 0 0 2 0 0 1 2 1 0 1...
output:
33075374608087
result:
ok
Test #22:
score: 6
Accepted
time: 77ms
memory: 29024kb
input:
200000 2 1 1 2 2 2 2 1 2 1 2 0 1 2 1 1 2 2 1 2 2 2 2 2 1 2 1 1 1 1 2 1 2 1 1 2 2 1 2 1 2 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 0 1 1 2 1 1 2 2 1 1 1 1 1 1 2 2 0 1 1 2 1 2 1 2 2 2 1 1 2 1 0 1 2 2 2 1 2 1 1 1 1 0 1 1 2 1 0 2 2 1 1 2 2 2 0 1 2 1 2 2 2 1 1 2 1 2 2 2 1 2 2 2 1 1 1 2 2 1 2 2 2 2 2 2 1 2 2 1 1 1...
output:
6216545751865
result:
ok
Test #23:
score: 6
Accepted
time: 108ms
memory: 28808kb
input:
200000 2 0 2 0 0 2 0 2 0 2 2 2 0 2 2 2 0 2 2 0 2 2 2 2 0 2 0 0 0 2 2 2 2 0 2 2 0 0 0 2 2 0 0 0 2 0 2 0 0 2 2 0 2 2 0 0 0 2 2 0 0 2 0 0 0 0 2 2 0 2 0 0 2 2 2 0 0 0 0 0 0 0 2 2 2 2 2 1 0 0 2 1 2 0 2 2 0 0 0 0 0 0 0 2 0 0 0 0 0 0 2 0 0 2 0 0 2 0 0 0 2 2 2 2 0 2 0 0 0 2 2 0 2 2 0 0 0 2 2 0 0 2 2 2 2 2 2...
output:
6090130973914
result:
ok
Test #24:
score: 6
Accepted
time: 80ms
memory: 28260kb
input:
200000 1 1 0 0 1 2 0 2 0 0 0 1 0 0 0 1 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 1 0 2 0 0 1 1 0 1 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 1 0 0 2 0 1 2 1 0 0 0 2 0 0 0 2 0 0 1 1 1 2 1 1 1 0 1 0 1 1 2 1...
output:
6392103279027
result:
ok
Test #25:
score: 6
Accepted
time: 106ms
memory: 36608kb
input:
200000 0 0 0 2 1 1 1 0 0 1 1 2 0 2 1 2 2 0 0 2 0 2 2 1 0 2 1 2 2 2 2 0 1 1 1 1 1 1 1 1 1 2 2 1 0 2 0 1 0 1 2 0 0 2 0 2 0 0 1 0 2 2 0 0 1 0 2 1 1 0 1 0 2 0 2 0 1 2 2 1 1 0 1 2 0 1 2 1 2 0 0 0 1 0 1 2 2 0 1 1 0 0 0 1 1 2 0 0 2 2 0 0 2 2 2 2 1 0 0 1 1 1 2 2 2 2 0 0 0 1 1 1 0 1 1 2 1 1 1 0 0 2 1 0 2 0 1...
output:
98889219873489
result:
ok
Test #26:
score: 6
Accepted
time: 0ms
memory: 3820kb
input:
3 0 0 1 1 2 0 2 0
output:
0
result:
ok
Test #27:
score: 6
Accepted
time: 1ms
memory: 3916kb
input:
4 0 0 1 1 0 2 1 2 2 3 0
output:
0
result:
ok
Test #28:
score: 6
Accepted
time: 1ms
memory: 4112kb
input:
5 2 0 2 2 0 0 2 0 1 0 3 2 4 0
output:
0
result:
ok
Test #29:
score: 6
Accepted
time: 1ms
memory: 3824kb
input:
6 1 0 2 2 0 1 1 3 4 5 0 4 0 1 2 5 0
output:
4
result:
ok
Test #30:
score: 6
Accepted
time: 87ms
memory: 24560kb
input:
200000 0 0 0 2 0 0 1 0 2 2 2 1 2 0 1 0 0 0 0 1 0 2 0 2 1 0 2 2 2 2 2 0 0 2 2 0 1 1 0 1 1 0 1 2 2 2 0 1 2 1 2 2 1 0 2 2 2 1 2 2 2 0 1 2 2 2 2 2 1 1 0 0 1 0 2 0 2 1 1 2 2 0 2 1 2 0 2 2 1 2 2 2 0 2 2 2 0 2 0 1 1 1 2 0 1 2 2 1 2 0 2 0 0 2 1 1 2 2 0 2 0 2 0 1 0 0 0 0 2 0 1 2 0 1 2 2 2 0 1 0 0 2 2 2 1 0 0...
output:
827878641518
result:
ok
Test #31:
score: 6
Accepted
time: 76ms
memory: 24540kb
input:
200000 1 1 2 2 1 1 2 2 2 2 2 1 2 2 2 2 2 1 2 1 2 2 1 2 1 2 2 2 2 2 1 2 1 1 1 2 2 2 1 0 1 2 2 2 2 1 2 2 1 2 1 1 2 2 1 2 1 2 1 1 2 1 2 2 2 1 2 1 1 1 2 2 2 1 1 2 1 2 1 1 2 1 1 1 0 2 1 1 1 2 1 2 2 2 1 2 1 1 1 2 1 1 2 2 1 2 1 2 1 1 1 2 0 2 1 1 2 2 2 1 2 2 2 2 2 1 2 1 1 2 2 1 1 1 2 1 2 1 2 2 1 1 1 1 1 1 1...
output:
148910253102
result:
ok
Test #32:
score: 6
Accepted
time: 78ms
memory: 24556kb
input:
200000 2 0 2 2 0 2 0 0 0 2 2 0 2 0 0 0 0 2 0 2 0 0 0 2 0 0 0 0 2 0 0 2 0 2 1 0 0 0 2 2 0 2 2 0 0 2 2 0 1 2 2 2 1 0 0 2 0 2 2 0 2 2 0 0 2 2 0 2 0 2 2 0 2 2 0 2 2 0 2 0 0 0 0 2 2 2 0 0 0 2 2 2 2 0 0 0 2 2 0 2 0 2 1 2 2 0 0 2 2 0 2 0 1 2 2 0 2 0 0 2 2 0 0 0 1 0 0 0 0 0 2 0 0 2 0 0 0 0 2 2 0 2 2 0 2 2 2...
output:
181252557212
result:
ok
Test #33:
score: 6
Accepted
time: 82ms
memory: 24704kb
input:
200000 1 0 2 1 2 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 0 1 2 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 1 0 0 0 2 1 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 1 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 1 1 0 0 0...
output:
155843324547
result:
ok
Test #34:
score: 6
Accepted
time: 49ms
memory: 25112kb
input:
200000 0 2 2 0 2 2 0 1 1 0 2 2 0 1 2 2 0 1 0 2 1 1 0 1 0 2 0 2 0 0 0 1 0 0 2 0 2 1 0 0 1 1 1 0 0 2 1 2 2 1 0 2 2 2 0 2 2 1 2 0 1 0 0 1 2 0 0 2 1 1 1 0 1 1 1 2 1 0 1 1 0 1 2 2 2 0 1 0 1 1 0 2 0 1 0 2 0 0 2 2 2 2 2 0 0 2 1 2 2 1 2 0 1 1 1 1 1 0 2 0 2 0 1 1 1 0 1 0 2 1 2 0 1 1 0 2 1 2 2 2 0 0 2 2 2 0 1...
output:
0
result:
ok
Test #35:
score: 6
Accepted
time: 58ms
memory: 24936kb
input:
200000 2 1 2 0 2 1 2 1 2 1 1 1 2 1 2 1 2 1 1 1 1 2 0 1 2 1 1 2 1 2 2 2 1 2 2 2 1 2 2 1 1 1 2 2 1 1 2 2 1 2 1 1 2 2 1 2 2 2 1 2 2 2 1 2 1 1 2 2 2 1 1 2 2 1 1 2 1 2 1 1 2 1 2 2 2 1 1 1 2 2 2 2 1 1 1 2 1 1 2 1 1 2 1 2 2 2 2 1 1 2 1 2 2 1 1 1 2 1 1 1 2 0 2 1 2 2 1 1 2 2 2 2 1 1 1 1 2 1 1 2 2 2 1 1 1 1 2...
output:
0
result:
ok
Test #36:
score: 6
Accepted
time: 47ms
memory: 25020kb
input:
200000 2 2 0 2 2 0 0 0 0 0 2 2 2 2 0 2 2 2 2 1 0 2 0 2 2 0 0 2 2 0 0 2 2 1 0 2 0 2 0 0 2 1 0 0 0 2 0 0 0 2 2 0 2 0 2 2 0 0 0 0 2 0 0 2 0 2 0 2 0 2 2 2 2 2 0 2 2 2 2 0 0 0 0 0 2 0 2 2 0 2 0 0 2 0 0 2 2 2 0 2 0 2 2 0 2 2 2 0 0 2 0 1 0 2 0 2 2 0 2 2 2 0 2 2 0 2 0 2 0 2 0 0 0 0 2 0 0 2 0 0 0 2 0 0 0 2 0...
output:
0
result:
ok
Test #37:
score: 6
Accepted
time: 60ms
memory: 25104kb
input:
200000 1 0 0 1 2 0 0 0 1 1 0 1 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 2 0 0 0 1 1 0 0 1 0 1 0 1 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 2 1 0 1 1 1 1 0 1 2 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 1 0 1 0 1 0 1 2 1 0 0 1...
output:
598441952
result:
ok
Subtask #4:
score: 16
Accepted
Test #38:
score: 16
Accepted
time: 0ms
memory: 3784kb
input:
3 1 1 1 0 1 1 2 100 2 0 0 0 0 2 2 1 0 1 0 0 0 1 0 0 1 0 2 2 0 1 0 0 0 1 1 1 0 0 2 0 2 1 2 2 0 2 2 1 2 2 2 0 0 1 2 1 0 2 0 1 2 0 2 1 0 0 2 0 2 1 2 2 0 2 2 0 0 0 2 1 2 0 2 2 1 2 0 1 1 1 2 1 0 0 0 2 0 1 0 0 1 2 1 0 1 2 1 0 0 1 2 2 2 1 2 2 0 2 1 2 2 1 0 0 0 2 0 1 1 1 2 0 0 0 1 2 0 2 0 0 1 0 0 1 0 2 2 1 ...
output:
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 1 2 1 2 1 0 2 4 4 2 1 2 4 2 0 2 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 1 0 0 0 3 0 0 2
result:
ok
Test #41:
score: 16
Accepted
time: 1ms
memory: 3816kb
input:
6 0 1 2 0 1 2 0 1 1 2 2 3 3 4 4 5 100 2 1 5 1 5 2 1 2 2 2 3 2 2 1 0 2 3 1 3 0 0 1 0 0 3 2 5 1 4 2 1 0 0 1 5 0 1 2 5 1 5 2 4 0 0 0 0 2 2 2 0 0 1 0 2 0 0 1 1 2 2 2 2 0 2 1 1 1 4 1 3 0 1 0 3 1 0 0 5 0 1 1 2 0 2 1 2 0 4 2 3 0 1 2 4 0 2 1 3 1 3 2 2 2 3 0 4 1 5 1 5 0 4 2 3 2 2 1 4 0 5 1 2 0 1 1 1 0 4 1 3 ...
output:
4 4 0 4 4 2 1 3 0 0 3 2 4 3 1 2 4 2 2 1 0 0 1 3 2 0 0 0 0 0 0 0 0 1 0 0 1 3 3 6 0 0 0 0 0 3 1 0 0 3 4 3 0 0 2 0 2 0 0 3 3 2 0 1 0 0 0 0 4 4 3 4 4 4 3 2 2 2 3 0 0 2 0 0 0 0 0 0 2 4 3 2 1 0 1 0 0 1 2 3 6
result:
ok
Test #42:
score: 16
Accepted
time: 0ms
memory: 3872kb
input:
400 0 2 2 1 0 2 2 1 2 0 1 2 0 0 2 1 2 0 1 0 2 2 0 2 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 2 1 2 2 1 0 1 1 2 0 1 2 0 2 1 2 1 1 2 1 1 0 1 0 2 2 2 2 1 0 1 0 0 0 2 2 0 2 1 1 0 0 0 1 1 1 0 0 2 0 0 2 0 1 2 1 1 0 1 2 1 0 1 0 1 1 0 1 2 0 1 0 2 2 1 0 0 1 0 2 1 2 0 1 1 1 0 1 1 0 1 0 2 0 1 1 2 0 2 2 2 2 2 0 1 0 0 2 2 ...
output:
748492 751280 745592 746546 748685 749066 748286 746439 742602 741927 739801 738044 740003 732801 732137 732791 741037 740750 744502 744511 744015 746300 749460 745730 745106 751192 750538 754769 756253 757792 760457 756172 757024 761186 760814 761345 762058 764833 769148 767330 764502 764339 767930...
result:
ok
Test #43:
score: 16
Accepted
time: 4ms
memory: 4912kb
input:
4000 1 1 1 2 0 2 2 1 1 2 0 1 0 1 2 0 1 1 1 1 1 0 0 0 2 2 1 2 2 0 1 2 0 0 2 0 1 0 2 1 2 0 0 0 0 2 0 2 2 1 0 2 2 2 2 1 0 2 1 0 1 1 2 1 0 0 0 2 1 1 0 1 0 1 2 2 2 1 0 1 2 0 2 2 1 2 1 0 1 1 0 1 0 0 2 0 2 2 1 0 1 2 0 2 1 1 0 2 1 2 2 0 0 0 1 2 0 2 1 2 0 0 2 1 1 2 1 1 0 2 1 0 2 0 1 1 0 0 0 0 2 0 2 1 2 0 0 2...
output:
791220194 791202818 791448703 790793734 790538710 790399232 790680228 790274544 789587326 789569532 789589951 789568904 789520169 789458372 789475557 788952064 788936826 788957112 788606079 788625706 788314564 788853784 788476658 788033878 787760817 787604725 787949498 787930696 787950912 787946164 ...
result:
ok
Test #44:
score: 16
Accepted
time: 47ms
memory: 52548kb
input:
200000 1 2 0 2 1 2 1 1 0 1 1 1 0 1 2 0 2 1 2 1 1 0 0 0 0 2 2 2 0 0 1 1 1 2 1 0 0 2 2 0 2 1 0 2 0 0 1 1 2 2 0 2 0 0 1 1 2 2 0 2 1 1 1 1 0 2 0 1 1 0 2 0 0 2 1 0 2 2 2 0 0 2 0 2 0 2 2 1 2 1 1 2 0 1 0 0 2 0 2 2 1 0 0 2 1 0 2 0 2 1 0 2 1 0 2 0 0 0 0 0 2 0 0 2 2 1 0 2 0 2 1 2 1 2 2 2 0 2 0 0 0 0 2 1 0 0 1...
output:
98878415111108
result:
ok
Test #45:
score: 16
Accepted
time: 45ms
memory: 52640kb
input:
200000 1 2 2 1 2 2 2 2 1 2 1 1 2 2 1 2 1 1 2 2 1 2 1 2 2 2 1 2 1 1 2 2 1 1 2 1 1 1 1 2 2 2 2 1 2 2 1 2 2 1 2 2 2 2 1 1 2 2 1 2 1 2 2 1 1 2 2 1 1 1 2 1 2 2 1 2 2 1 2 2 2 2 2 2 1 0 1 1 1 2 2 1 0 2 1 2 2 2 1 1 1 2 1 2 2 2 2 2 2 2 1 2 2 1 1 1 1 0 1 1 1 2 1 2 2 1 1 1 2 2 2 2 1 1 2 2 2 1 2 1 1 1 1 1 2 2 2...
output:
18725807625786
result:
ok
Test #46:
score: 16
Accepted
time: 39ms
memory: 52544kb
input:
200000 0 2 2 2 0 2 0 2 0 2 0 0 0 0 2 0 2 2 0 2 0 0 2 2 2 2 2 2 0 2 2 0 0 0 0 0 0 0 2 0 0 1 2 0 2 2 2 0 2 0 0 0 2 0 0 2 2 0 2 0 0 0 0 0 2 2 2 0 0 0 2 2 0 0 0 0 2 0 2 0 1 2 2 0 0 2 0 2 0 2 2 0 2 0 2 0 0 2 0 0 0 2 0 0 0 2 0 2 0 0 2 0 0 2 0 2 0 2 2 2 0 0 2 0 2 2 2 2 1 0 0 0 2 2 0 2 0 2 0 2 2 2 0 0 0 0 0...
output:
19001142419904
result:
ok
Test #47:
score: 16
Accepted
time: 55ms
memory: 52484kb
input:
200000 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 1 2 2 1 0 0 1 0 2 1 2 1 2...
output:
19038058071323
result:
ok
Test #48:
score: 16
Accepted
time: 61ms
memory: 27692kb
input:
100000 0 2 1 1 0 2 0 0 2 2 2 2 0 0 1 1 0 2 2 2 0 2 1 2 1 0 2 0 0 2 0 1 0 1 2 0 0 2 2 1 0 2 2 1 0 2 1 0 2 1 2 0 2 0 1 2 1 0 2 0 1 0 1 0 0 0 0 2 1 2 0 1 1 0 1 0 0 2 2 0 2 1 0 2 2 1 2 0 1 0 2 1 2 0 2 0 0 0 0 2 1 1 0 1 1 2 2 1 2 0 1 1 1 1 0 0 2 2 2 2 2 2 0 2 2 1 0 1 0 0 1 0 0 1 1 2 1 1 2 1 1 0 1 1 2 0 0...
output:
12305851592762 12305852134900 12306133507778 12305866995960 12305585087263 12305866995960 12305585642746 12305866995960 12305585642746 12305866995960 12305585642746 12305583154618 12305582570257 12305583154618 12305864493268 12305582570257 12305583154618 12305864493268 12305863525808 12305581608077 ...
result:
ok
Test #49:
score: 16
Accepted
time: 68ms
memory: 27596kb
input:
100000 1 2 0 2 2 1 2 0 2 1 1 0 0 1 1 2 2 1 2 1 1 1 0 0 0 2 1 2 1 2 1 1 0 0 1 2 1 0 1 1 1 0 0 2 2 2 0 1 2 2 1 0 1 0 1 2 0 0 0 2 0 1 0 2 0 2 2 0 0 0 1 2 1 1 1 0 1 2 2 1 2 0 1 0 0 2 0 0 2 2 1 2 1 1 2 2 2 2 2 0 2 2 0 0 0 0 2 0 2 2 1 0 1 2 1 1 0 2 2 1 0 1 2 1 1 2 2 2 0 1 2 2 1 2 1 2 2 0 0 1 1 1 0 2 2 1 2...
output:
12301813256756 12302373157130 12301813256756 12302373157130 12302924262596 12302925522835 12302374383909 12302373157130 12301813256756 12302373157130 12302374383909 12301813256756 12302367485243 12302364362222 12302924262596 12302364362222 12302367485243 12301813256756 12302364362222 12302925522835 ...
result:
ok
Test #50:
score: 16
Accepted
time: 45ms
memory: 27756kb
input:
100000 2 2 2 2 1 0 2 1 2 1 1 2 0 1 1 2 1 1 0 2 1 0 1 1 1 1 1 1 0 0 0 0 1 2 1 2 0 1 0 2 0 2 0 1 0 1 2 1 0 1 1 1 2 0 1 0 0 2 0 0 1 2 1 0 1 2 1 1 2 2 2 1 1 0 1 2 1 0 0 0 0 0 0 0 0 2 1 1 2 0 0 0 0 0 1 1 1 2 0 2 1 2 1 1 1 0 2 1 0 1 0 0 2 2 2 2 2 2 1 0 2 2 0 2 2 0 0 1 2 2 0 2 1 2 1 1 2 1 2 1 1 2 2 1 2 1 0...
output:
12418513167989 12418318171086 12418165193041 12418160409001 12418126763330 12418040055626 12418267377528 12418272506223 12417820448436 12417972199669 12417773522932 12417576059620 12417757013704 12417825430253 12418053743032 12418508820771 12418503688442 12418439828326 12418689699116 12418838558201 ...
result:
ok
Test #51:
score: 16
Accepted
time: 77ms
memory: 27876kb
input:
100000 2 1 2 1 2 2 1 1 1 1 2 1 2 1 1 2 2 1 2 1 2 2 1 1 2 2 2 2 2 1 2 2 2 1 1 2 1 2 2 2 2 1 1 2 2 1 2 1 2 1 2 1 2 1 1 1 1 2 2 2 2 2 1 2 1 2 2 1 2 1 2 2 1 1 1 1 0 2 1 2 1 2 2 1 1 2 2 2 1 1 0 1 2 1 1 1 1 2 1 1 1 1 2 2 1 1 1 2 0 1 2 2 2 1 2 1 2 1 1 1 1 1 2 1 1 1 0 1 1 1 1 1 1 2 2 2 2 2 1 1 2 2 1 2 1 2 1...
output:
2346723587578 2346797006215 2346772375460 2346809727919 2347690734887 2347721226196 2347677034956 2347711403087 2347703419765 2347769503612 2347741902138 2348263987234 2348275750601 2348310490766 2348282698683 2348245269554 2348276304355 2348288123222 2348310435745 2348929711544 2348877359493 234885...
result:
ok
Test #52:
score: 16
Accepted
time: 45ms
memory: 27664kb
input:
100000 2 0 2 2 2 2 2 2 2 2 0 0 2 0 2 0 2 2 0 2 0 0 0 0 0 1 2 0 1 0 2 2 0 2 0 2 0 2 2 0 0 0 2 0 2 2 2 0 2 0 0 2 2 0 0 2 2 2 2 0 0 0 0 0 2 0 0 2 0 2 0 0 2 2 0 2 2 0 2 0 0 0 2 0 2 2 0 2 0 2 1 2 0 0 0 0 0 0 0 1 2 0 0 0 0 2 0 0 0 2 2 0 0 0 0 0 0 0 2 2 2 2 2 0 2 0 2 0 2 0 1 2 2 2 0 0 2 0 2 2 0 2 2 0 2 2 2...
output:
2400462386571 2400462158148 2400461544795 2400461889958 2400461185189 2400461548434 2400461920357 2400461234560 2400460695567 2400460511380 2400459879735 2400460424304 2400460567413 2400460041056 2400459736037 2400459512574 2400459660195 2400459345806 2400575350120 2400575946924 2400575378804 240057...
result:
ok
Test #53:
score: 16
Accepted
time: 49ms
memory: 27640kb
input:
100000 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 2 1 0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 0...
output:
2323745275743 2323777633776 2323806469161 2323833154157 2323840493310 2323808770580 2324765240403 2324758452482 2323776601856 2323753628594 2323785579860 2323750302594 2323802364215 2323774143294 2323758276966 2323764116183 2323699833384 2324252351662 2324767071839 2324755050915 2324753777905 232472...
result:
ok
Test #54:
score: 16
Accepted
time: 117ms
memory: 52492kb
input:
200000 1 1 0 2 1 2 1 2 2 0 1 0 2 1 1 1 2 2 2 1 0 2 2 1 2 1 0 0 1 2 1 0 1 1 2 2 0 1 1 0 1 2 2 1 2 2 0 1 2 0 2 0 2 1 0 0 1 2 2 1 1 0 1 2 0 1 1 2 1 0 2 1 0 2 2 2 0 1 0 2 2 0 0 0 2 1 2 1 0 0 1 2 1 1 0 0 1 2 0 2 1 2 1 0 2 1 2 2 1 0 0 1 0 2 2 2 1 0 1 1 0 2 2 1 1 0 2 2 2 0 0 0 1 0 2 0 1 2 1 1 1 0 0 0 2 1 0...
output:
98436910774628 98435790492478 98436353021634 98437473264408 98435641752233 98434521544912 98435641752233 98435650540959 98434527058080 98432660574726 98432663853112 98432964316426 98432961059499 98432964316426 98432961059499 98432964316426 98434084562142 98432964316426 98434084562142 98432873827394 ...
result:
ok
Test #55:
score: 16
Accepted
time: 106ms
memory: 52552kb
input:
200000 0 1 2 1 1 2 2 2 2 1 2 1 2 0 0 2 1 1 2 0 2 2 1 2 0 1 2 2 2 2 2 1 2 0 2 2 1 1 0 2 1 2 1 0 2 0 2 1 0 2 2 1 1 1 2 2 2 0 0 1 0 2 1 0 0 0 2 1 0 1 0 0 2 1 2 2 1 2 0 2 2 2 2 2 0 1 2 0 1 1 2 2 0 2 2 1 1 0 2 0 2 1 1 0 1 2 0 2 1 1 1 0 0 1 2 2 0 2 0 1 0 0 2 0 2 1 0 1 0 2 1 2 0 2 0 0 0 1 1 1 1 1 1 1 0 2 1...
output:
98656322568720 98654089382763 98656300074379 98654089382763 98656300074379 98654089382763 98656322568720 98656332308779 98654099189422 98656309947638 98656300074379 98654084729795 98656309947638 98656300074379 98654089382763 98651874038179 98654099189422 98654089382763 98654099189422 98656332308779 ...
result:
ok
Test #56:
score: 16
Accepted
time: 170ms
memory: 52752kb
input:
200000 0 1 0 2 1 0 2 1 2 0 1 2 2 0 1 2 0 0 1 0 0 2 0 0 1 1 0 0 1 0 2 0 0 1 0 2 2 1 2 0 2 2 0 2 2 1 0 0 0 2 1 1 1 2 1 2 0 2 2 1 2 1 2 0 1 2 0 1 1 0 0 0 1 1 2 2 2 1 2 0 1 0 1 0 0 2 2 1 1 2 1 2 0 2 1 0 2 2 1 1 2 1 1 0 0 0 1 2 0 0 1 1 0 2 2 0 0 0 1 2 1 2 0 2 1 2 2 0 1 2 1 2 1 1 1 0 1 0 2 0 1 1 0 0 0 1 1...
output:
98966103892595 98967140571022 98967143550915 98967142609596 98966185678400 98966421102932 98965911821926 98965913407716 98965918104910 98965913417511 98965122079850 98965524762266 98965522367911 98966328834972 98966123179251 98966127823396 98967012540625 98969031950525 98969028633876 98967004001828 ...
result:
ok
Test #57:
score: 16
Accepted
time: 113ms
memory: 52528kb
input:
200000 0 2 2 2 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 0 1 2 1 1 2 2 1 2 1 2 2 2 2 2 1 2 2 1 1 2 2 2 0 1 1 2 1 2 1 2 2 1 1 1 2 1 2 2 2 1 1 1 2 1 2 1 2 1 2 2 1 2 2 2 2 2 1 2 1 1 1 1 1 2 2 1 2 2 2 1 2 2 2 2 0 2 2 2 2 1 2 1 1 1 2 1 2 2 1 2 2 2 1 1 1 1 1 2 2 2 2 2 2 2 1 2 1 2 2 2 1 2 2 2 1 1 1 2 2 1 1...
output:
18697396764912 18695300327400 18695417492428 18695412390750 18695497770485 18695645619754 18695621483891 18695621059672 18695547575010 18695796159440 18697905632033 18697974160176 18697990665232 18698059102482 18700429463664 18700271546880 18700128236136 18700269015812 18700479008398 18700459208097 ...
result:
ok
Test #58:
score: 16
Accepted
time: 123ms
memory: 52632kb
input:
200000 2 2 0 2 2 2 2 2 0 2 2 2 0 2 2 2 0 0 1 2 0 2 0 2 0 0 2 0 0 2 0 0 0 2 0 2 0 2 0 2 2 2 2 0 0 1 0 0 0 0 0 0 0 2 0 0 0 2 0 2 0 0 0 0 0 0 1 0 1 0 2 0 2 2 0 2 2 0 2 2 0 2 0 2 2 0 0 0 0 2 2 2 2 0 2 0 2 2 0 2 0 0 2 2 2 2 0 2 2 2 2 0 0 0 0 0 0 2 0 2 0 0 2 0 2 2 2 0 2 2 0 2 0 2 2 2 0 0 0 2 2 2 0 2 0 0 0...
output:
19301561644377 19301561010923 19301560519357 19301560658860 19301560141868 19301560283528 19301560403681 19301560821780 19301561367932 19301560929964 19297228945278 19297228845345 19297228942726 19297228773359 19297229163546 19297229516549 19297229611392 19297228960187 19297229206178 19297229572763 ...
result:
ok
Test #59:
score: 16
Accepted
time: 118ms
memory: 52552kb
input:
200000 1 0 1 0 0 2 0 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 2 2 1 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 1...
output:
18631796300984 18631687250817 18631856709119 18631764152424 18631788410608 18631743814247 18631869669973 18631874454986 18631609360317 18633884518788 18633849370968 18633712111542 18633473133941 18633515779302 18633579888709 18633651258564 18633894929986 18634024209976 18634169079793 18634278683400 ...
result:
ok
Subtask #5:
score: 16
Accepted
Test #60:
score: 16
Accepted
time: 0ms
memory: 3912kb
input:
3 2 0 0 0 1 0 2 100 0 1 2 2 2 1 1 1 0 0 2 2 1 2 0 2 0 1 0 0 0 1 0 2 2 1 1 0 2 2 2 0 0 0 0 2 1 1 1 2 2 2 2 1 0 0 2 2 0 1 1 0 0 0 2 0 1 1 1 0 2 1 2 0 0 2 0 1 2 2 1 1 0 0 0 1 2 1 0 0 2 0 0 1 2 1 2 0 0 2 2 2 0 1 2 0 0 0 0 1 2 1 0 2 0 1 0 2 2 2 1 0 1 1 1 2 1 0 1 2 1 0 0 0 1 1 0 1 1 0 2 0 1 2 1 0 0 2 0 0 ...
output:
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
result:
ok
Test #61:
score: 16
Accepted
time: 0ms
memory: 3824kb
input:
4 1 0 1 0 0 1 0 2 1 3 100 0 2 3 2 1 1 0 1 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
score: 16
Accepted
time: 2ms
memory: 3808kb
input:
6 2 1 0 2 1 2 0 1 0 2 1 3 1 4 2 5 100 5 1 4 0 3 1 5 2 4 2 2 1 2 0 2 1 5 0 3 0 4 1 0 1 4 0 1 0 0 0 1 1 5 1 4 2 0 1 1 2 3 1 3 2 0 2 1 0 3 0 1 2 1 0 1 1 1 2 4 1 2 0 1 0 5 0 0 0 5 1 5 0 1 2 0 2 5 2 0 0 3 2 3 0 3 2 3 1 0 2 4 0 5 1 4 1 3 0 5 2 3 1 4 0 1 1 5 1 2 2 5 2 5 1 3 2 0 0 0 1 4 2 2 0 5 2 1 0 3 1 2 ...
output:
1 1 3 1 2 1 0 1 0 3 5 2 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 2 3 2 3 3 3 0 4 4 3 2 2 2 1 0 0 0 2 2 2 4 2 4 2 2 0 0 0 0 0 0 3 3 3 3 2 2 2 0 0 3 0 0 0 0 0
result:
ok
Test #64:
score: 16
Accepted
time: 0ms
memory: 3856kb
input:
400 1 1 1 0 1 0 2 2 0 0 2 1 2 2 1 2 2 1 1 1 2 1 0 1 2 0 0 1 0 0 1 0 1 2 1 2 1 2 0 0 1 1 0 2 1 1 1 1 0 2 2 1 2 0 0 1 1 2 1 2 1 1 0 0 0 2 0 2 2 0 1 2 0 2 0 1 0 0 2 2 1 0 2 2 2 2 1 2 1 1 2 1 2 2 2 2 0 0 2 1 2 0 1 1 1 1 0 1 1 0 2 0 0 1 1 1 1 0 1 2 0 2 1 2 1 1 1 0 0 0 2 2 1 0 1 0 0 1 2 1 1 2 0 2 0 1 1 2 ...
output:
81027 81548 82381 82262 82052 81837 81658 81443 82127 81941 82560 80316 79750 80735 80890 73382 73536 73359 73138 72918 72653 71997 72478 72672 72911 72261 72853 73213 72954 73769 74787 74121 73931 71563 71778 70747 70281 70114 67043 66640 66415 65849 66006 66629 66799 66844 71682 71874 72971 72416 ...
result:
ok
Test #65:
score: 16
Accepted
time: 8ms
memory: 4268kb
input:
4000 1 1 1 0 1 1 0 2 1 1 2 1 2 2 1 0 1 2 2 0 1 1 1 1 2 0 1 1 0 0 2 0 1 1 2 2 2 2 1 1 1 1 0 0 1 2 0 1 0 2 1 2 2 1 2 0 1 2 0 0 0 1 1 0 1 2 1 1 1 1 0 1 0 1 1 2 1 1 0 1 1 0 0 2 2 0 1 0 0 1 1 2 0 0 1 0 0 1 0 0 2 0 2 2 1 1 2 0 2 1 2 2 0 1 1 1 1 1 1 1 0 2 0 2 0 1 1 1 1 1 1 0 0 0 1 2 1 2 0 0 0 0 1 1 2 0 0 0...
output:
14132542 14132780 14127197 14127091 14141758 14141687 14141782 14142021 14142204 14134941 14142824 14142974 14140574 14140667 14180192 14184660 14184584 14184417 14184136 14167667 14167744 14167912 14167710 14167788 14174353 14182082 14181898 14186831 14198546 14205957 14196800 14206231 14206053 141...
result:
ok
Test #66:
score: 16
Accepted
time: 47ms
memory: 24296kb
input:
200000 0 1 1 2 2 0 2 2 0 2 0 2 1 1 2 1 1 0 1 1 1 2 1 1 0 1 1 0 2 2 1 0 1 0 1 0 0 1 2 1 1 0 0 1 1 1 1 0 2 0 2 1 0 2 2 0 2 0 0 1 1 1 2 1 0 0 1 0 2 2 2 1 1 2 1 0 0 1 0 2 1 0 1 1 1 2 1 0 1 1 2 2 2 1 2 2 0 1 1 1 2 0 0 2 0 1 0 1 0 2 0 2 1 2 2 1 0 0 0 2 1 2 0 0 1 2 2 1 1 1 0 0 1 2 2 2 2 0 0 1 1 0 1 0 1 2 2...
output:
44705759734
result:
ok
Test #67:
score: 16
Accepted
time: 35ms
memory: 24412kb
input:
200000 1 1 2 1 2 0 2 2 1 2 1 2 1 2 2 2 2 2 2 2 1 1 1 1 2 2 1 1 2 1 1 2 2 2 2 1 2 1 2 1 1 1 1 1 0 2 2 1 1 2 1 1 1 2 1 1 1 1 2 1 1 1 0 1 2 1 2 2 2 1 1 2 1 1 1 2 2 2 1 1 2 1 2 2 2 1 1 2 2 1 2 1 1 1 0 0 1 2 1 1 2 0 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 2 2 1 1 1 2 2 1 2 1 1 2 2 1 1 1 2 2 2 2 1 1 2 1 2 2 1 0...
output:
8081399556
result:
ok
Test #68:
score: 16
Accepted
time: 46ms
memory: 24268kb
input:
200000 0 2 2 0 2 2 2 2 2 2 0 2 0 2 0 0 0 0 2 0 0 0 2 0 0 2 1 2 0 2 0 0 0 2 0 0 2 0 2 2 2 2 2 0 0 2 1 0 0 2 2 2 2 0 0 2 2 0 2 0 2 2 0 2 0 2 2 0 0 0 0 2 2 2 2 2 0 2 0 0 2 2 2 0 2 2 0 2 0 0 2 0 2 2 2 0 2 2 0 2 0 2 0 2 2 0 0 2 0 2 2 0 0 0 0 2 2 2 0 2 0 2 2 0 1 0 0 0 0 0 2 0 0 0 2 1 0 0 2 2 2 2 2 0 2 2 1...
output:
7578518269
result:
ok
Test #69:
score: 16
Accepted
time: 56ms
memory: 24252kb
input:
200000 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 2 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 1 1 0 0 2 1 0 0 1 1 0 1 1 1 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 0 1 2 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 2 0 1 1 1 1 0 1 0 0 2 0 0 0 0 1 0 1 0 1 0...
output:
7842611505
result:
ok
Test #70:
score: 16
Accepted
time: 47ms
memory: 13720kb
input:
100000 0 2 0 0 0 0 2 2 1 1 2 1 1 1 0 2 1 2 1 1 2 1 2 2 1 0 0 0 2 2 1 2 2 2 2 2 2 0 1 2 0 2 1 1 0 1 2 0 2 0 2 0 2 0 2 0 0 1 0 0 0 1 2 2 1 0 2 0 1 2 0 0 2 2 1 1 0 1 2 2 0 1 2 1 0 2 0 0 0 0 0 0 1 0 1 1 0 0 1 2 1 0 2 2 2 0 2 0 2 0 1 2 1 2 1 2 0 1 1 2 2 2 1 1 2 2 2 2 1 0 2 2 2 1 2 2 1 1 2 0 0 1 1 2 1 0 2...
output:
8821295872 8821296147 9564139052 8821295872 8821295681 9564138785 9564557503 9564371980 8821528877 8821295963 8821273000 8821273290 8821273000 9564071254 8821273290 9564071254 8821273000 8821273290 9564071254 8821273290 8820974722 9563750804 8820974722 8820974425 9563750804 8820974722 8821039686 882...
result:
ok
Test #71:
score: 16
Accepted
time: 89ms
memory: 13736kb
input:
100000 1 0 2 1 0 2 2 0 2 2 2 2 2 0 2 1 1 0 1 1 1 1 0 1 2 1 1 2 2 2 2 2 0 1 1 2 1 1 2 0 1 1 1 1 2 0 0 1 2 0 2 0 1 2 2 1 2 2 2 2 1 2 0 2 2 0 1 1 1 1 2 0 1 1 1 2 1 1 0 2 2 2 1 1 0 2 2 1 2 2 1 2 1 2 1 1 2 0 1 1 2 1 2 1 1 1 2 0 1 2 0 1 0 2 0 0 2 2 0 0 1 1 2 0 1 1 1 1 1 0 0 2 1 2 2 0 1 1 0 0 2 1 2 2 0 0 0...
output:
9900828574 9901123105 9901558117 9901559863 9901561538 9901241053 9901243302 9900841539 9901073511 9900841551 9901224707 9900891827 9901193513 9901191456 9900859127 9900508225 9900868272 9900869818 9901103676 9901101160 9901405928 9901403850 9901736004 9902118965 9902402250 9902404114 9902169373 990...
result:
ok
Test #72:
score: 16
Accepted
time: 124ms
memory: 13948kb
input:
100000 1 2 2 2 0 2 1 1 0 0 2 0 2 1 0 2 2 1 1 1 2 0 0 2 2 2 0 1 2 2 2 0 0 1 1 1 0 0 0 0 0 1 0 2 0 1 0 1 0 0 0 1 0 2 0 0 2 0 2 2 2 2 1 0 1 2 0 0 0 2 0 0 1 2 1 0 0 1 0 2 1 1 2 2 2 2 2 0 1 0 2 2 2 2 1 0 0 2 2 2 0 2 0 1 2 2 2 2 1 1 0 2 0 2 1 1 2 1 0 0 1 0 0 1 1 2 1 2 1 2 1 0 1 0 0 2 0 1 1 0 1 0 1 2 1 1 2...
output:
8866532903 8866266025 8866265404 8866264491 8865969722 8865968574 8865970233 8866204005 8865029098 8865196570 8865368030 8865370923 8865369538 8865168328 8865135093 8865385470 8865384250 8865383594 8865076149 8865313844 8865546375 8865244496 8864975343 8864974133 8864739724 8864740482 8864739477 886...
result:
ok
Test #73:
score: 16
Accepted
time: 103ms
memory: 13736kb
input:
100000 1 2 2 0 1 1 2 1 2 1 1 2 2 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 2 2 1 2 1 2 2 2 1 2 2 2 1 1 1 2 2 1 1 1 1 1 1 2 2 2 0 2 1 1 2 1 2 2 2 2 1 2 2 2 2 2 1 1 1 1 2 2 2 1 1 1 2 1 1 1 1 2 1 2 2 2 1 1 1 1 1 1 2 1 1 1 2 1 2 2 1 2 2 1 1 2 2 1 2 1 1 1 2 2 2 1 1 2 0 1 2 1 2 2 2 1 1 2 2 1 1 1 2 1 2 2 1 1 1 1 1 2 2...
output:
1923134841 1923098761 1923068781 1923100856 1923136813 1923178461 1923151422 1923190446 1923139511 1923107348 1923142475 1923193068 1922471761 1922501746 1922531560 1922483959 1923074561 1923029924 1922988637 1923039300 1923012232 1923055404 1923709851 1924332573 1924291452 1924336408 1923841979 192...
result:
ok
Test #74:
score: 16
Accepted
time: 88ms
memory: 13744kb
input:
100000 2 0 2 2 2 2 0 0 2 0 0 0 0 2 2 2 2 2 2 2 0 0 2 2 2 2 0 2 0 2 0 2 2 2 2 2 2 2 2 0 1 0 0 0 2 0 0 0 2 2 2 2 0 2 1 0 0 2 0 0 0 2 2 0 2 0 2 0 2 2 0 2 0 1 0 0 2 2 2 2 0 2 0 0 0 2 2 0 2 0 0 0 0 2 0 0 0 0 0 0 2 2 2 0 0 2 2 2 0 2 2 2 2 2 0 0 2 0 2 2 0 0 0 0 2 0 0 2 2 2 0 0 2 0 2 2 0 2 1 0 0 2 2 0 2 0 2...
output:
1525082875 1525082664 1525098402 1525098613 1525098402 1525098613 1525098666 1525098457 1530990775 1530990974 1530991108 1530990905 1530990702 1530990737 1530990721 1530990924 1530990945 1530990921 1531653395 1531653190 1531653395 1531653190 1531653147 1531653354 1531653381 1531653176 1531687363 153...
result:
ok
Test #75:
score: 16
Accepted
time: 108ms
memory: 13668kb
input:
100000 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 1 1 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 1 0 1 0 1 1 0 1 1 1 0 1 1 2 1 0 0 0 1 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 0 2 1 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1...
output:
2063072176 2063026328 2063571586 2064283826 2064244031 2064284088 2064324207 2063683556 2063638505 2063590631 2063627298 2063648635 2063605542 2063913146 2063956384 2063999436 2063960585 2063923816 2063883884 2063860177 2063893092 2063929914 2064077069 2064034617 2063988435 2064000191 2063960758 206...
result:
ok
Test #76:
score: 16
Accepted
time: 151ms
memory: 24384kb
input:
200000 2 2 2 0 2 0 0 1 2 1 2 2 2 0 2 0 1 2 2 2 2 0 2 0 0 0 1 0 1 1 2 1 2 0 0 0 1 2 2 0 0 2 1 1 2 1 1 1 1 0 0 2 2 0 0 1 1 0 2 1 2 0 1 2 0 2 1 1 0 2 2 2 0 2 1 2 1 1 1 1 0 2 0 2 2 1 2 2 2 0 0 2 0 0 0 2 1 2 0 2 1 1 0 2 1 0 1 1 0 0 1 0 1 1 0 0 2 2 2 0 1 2 0 0 1 1 0 2 0 2 2 0 2 2 0 0 1 1 0 2 2 2 2 0 2 0 0...
output:
35803105614 38762344942 38761437962 35802153839 38761437962 38762063367 35802734800 35802734454 38762063367 35802734800 38762063367 38762064512 35802735377 38762064512 38762643916 35803270356 35803270016 38762643916 35803270016 35803268938 38762642614 35803268938 38762642614 35803269286 35803463662 ...
result:
ok
Test #77:
score: 16
Accepted
time: 276ms
memory: 24296kb
input:
200000 1 0 1 0 0 2 1 0 1 2 0 1 1 1 0 1 2 2 1 0 2 0 0 2 1 1 1 0 1 1 2 1 2 2 0 2 2 2 0 0 1 1 2 0 0 2 0 1 1 1 0 0 0 1 2 1 0 2 1 0 1 2 0 2 2 0 1 0 0 2 2 1 2 0 1 2 1 0 2 1 1 1 1 1 1 0 1 0 0 2 1 1 2 0 2 2 1 2 1 2 2 0 0 1 2 0 1 1 2 0 2 2 0 0 2 1 2 2 1 0 2 2 1 0 0 0 1 0 0 0 0 0 2 1 0 0 0 2 0 2 2 0 0 2 2 0 2...
output:
43444761896 43445433771 43445977597 43445201981 43445746105 43445006762 43445006666 43445724756 43445723551 43445121919 43445841023 43445839953 43445839539 43445839231 43446516618 43447290990 43448075191 43448075302 43447423180 43447834695 43447163589 43447706753 43447705667 43447704670 43446988668 ...
result:
ok
Test #78:
score: 16
Accepted
time: 250ms
memory: 24168kb
input:
200000 1 1 2 0 1 0 0 1 1 2 0 0 1 2 2 2 1 0 2 2 0 2 1 0 0 1 0 2 2 1 1 2 2 0 1 1 0 2 0 2 1 0 0 1 2 1 1 0 1 2 0 0 1 1 2 2 0 1 1 0 0 0 1 2 2 1 1 1 0 2 1 0 1 1 1 2 1 2 2 0 0 2 2 1 0 1 0 1 0 2 0 2 2 2 0 2 1 2 1 0 1 1 1 2 2 1 0 2 1 1 1 1 2 2 2 2 2 2 2 1 2 2 0 2 1 0 2 2 1 1 2 0 1 1 1 0 0 2 0 2 2 2 0 0 2 0 2...
output:
44897023717 44897026214 44896465355 44896591251 44896593006 44896590513 44895834212 44895368461 44894907040 44895640846 44895212634 44895677125 44894935040 44895723594 44896330327 44896326613 44896856238 44896170213 44895426076 44895423193 44895428090 44895426675 44895786854 44895241240 44894631441 ...
result:
ok
Test #79:
score: 16
Accepted
time: 233ms
memory: 24304kb
input:
200000 2 1 1 2 1 2 2 1 1 2 1 1 0 2 2 2 1 1 2 2 2 2 2 2 2 1 1 1 2 2 2 1 2 1 2 2 2 1 2 1 2 2 1 1 0 2 2 1 2 1 1 2 1 2 2 2 2 2 1 1 1 2 1 2 2 2 1 1 1 2 1 1 2 1 2 1 1 1 1 1 1 2 2 1 1 2 2 2 2 1 1 2 2 2 1 1 2 2 2 1 2 2 2 1 1 1 0 1 2 2 1 1 2 1 2 1 1 1 2 2 2 1 2 1 2 2 1 2 2 0 2 2 1 1 2 1 1 1 1 1 2 1 2 1 2 2 2...
output:
8101789485 8101739494 8103558728 8103498085 8103578182 8103664670 8103590427 8103512505 8103596589 8103555534 8103628457 8103701618 8103629649 8103726089 8103641305 8103685315 8104669426 8104768182 8104683042 8104599420 8104685426 8104775423 8104866920 8104042681 8103946158 8104045127 8103977963 810...
result:
ok
Test #80:
score: 16
Accepted
time: 269ms
memory: 24304kb
input:
200000 0 0 1 0 0 0 0 2 0 2 2 2 0 0 0 0 2 0 0 2 2 2 0 2 0 0 2 2 0 0 2 2 2 1 0 2 0 0 2 2 2 0 0 2 2 2 0 2 0 2 2 2 2 2 0 2 2 2 0 0 0 2 2 0 2 2 2 0 0 2 0 1 0 0 0 2 2 0 2 1 0 0 2 2 0 2 2 0 2 2 2 2 2 0 0 0 0 2 2 2 0 0 0 2 2 0 2 0 2 0 0 2 0 0 2 0 2 0 2 0 2 1 2 0 1 0 2 0 2 2 2 2 0 0 2 0 0 0 0 2 0 2 0 2 0 2 0...
output:
11328642689 11329157196 11329157389 11329157196 11329157003 11329157196 11329157033 11329157228 11329157389 11329157582 11329157338 11329157501 11329157338 11329157143 11329157593 11329157752 11329157481 11329157290 11329157455 11329157266 11329157433 11329157600 11329157785 11329157538 11329157701 ...
result:
ok
Test #81:
score: 16
Accepted
time: 282ms
memory: 24248kb
input:
200000 0 0 0 1 0 1 0 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 0 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 0 2 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 1 1 0 0 0 1 1 1 0...
output:
7202374285 7202488860 7202567943 7202610579 7202678643 7203651400 7203653724 7203779776 7203727143 7202795337 7202721296 7202788305 7203614354 7203691259 7203631682 7203564301 7203734098 7203722068 7203783310 7203872538 7203799847 7203858616 7203914809 7203824076 7203876720 7203805758 7203894616 720...
result:
ok
Subtask #6:
score: 0
Time Limit Exceeded
Dependency #2:
100%
Accepted
Test #82:
score: 0
Time Limit Exceeded
input:
100000 2 1 0 2 1 2 2 2 0 1 2 1 1 2 1 2 1 1 1 1 1 0 1 0 0 1 0 1 1 2 0 1 2 1 0 1 2 2 2 1 0 1 0 2 1 1 2 0 1 0 0 2 0 2 2 2 2 1 0 2 0 1 1 2 2 2 0 2 1 0 1 1 0 1 1 0 1 1 1 2 2 0 2 1 1 2 0 0 0 2 0 2 2 1 1 2 2 1 2 2 1 0 2 0 1 2 2 1 1 1 2 2 1 1 1 2 0 0 0 0 1 0 0 0 2 0 2 0 0 2 1 0 0 2 2 2 0 1 1 1 1 1 0 1 0 0 1...
output:
9559281849549 9558726709272 9558729881442 9559281849549 9558726709272 9559281849549 9558729881442 9559281849549 9558729881442 9559281849549 9558726709272 9559281849549 9559183715845 9558884413811 9558329259230 9558343181485 9558898362995 9558346366933 9558349676690 9558901679573 9558349676690 955890...
result:
Subtask #7:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
0%