QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#76679 | #44. Paths | Minneapolis | 100 ✓ | 272ms | 55324kb | C++14 | 1.1kb | 2023-02-11 21:05:08 | 2023-02-11 21:06:37 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
Subtask #1:
score: 23
Accepted
Test #1:
score: 23
Accepted
time: 1ms
memory: 2976kb
input:
30 100 4 3 3 1 3 3 1 4 4 4 3 3 3 3 2 1 2 1 4 2 2 1 2 2 3 3 2 3 3 4 2 7 21 1 16 4 13 2 12 13 20 1 12 26 28 2 20 30 26 3 8 21 1 5 7 15 17 3 24 16 6 16 12 9 28 26 7 1 18 12 5 9 3 11 5 20 10 27 20 3 25 14 20 8 11 3 23 7 10 29 27 23 10 9 7 26 4 24 30 14 29 1 22 18 8 16 17 18 24 20 9 20 3 23 21 4 6 16 13 ...
output:
1316
result:
ok single line: '1316'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3048kb
input:
100 100 4 1 2 1 2 2 3 2 4 1 2 3 2 2 3 1 4 1 3 2 3 4 4 2 3 1 4 3 4 1 4 2 4 1 3 4 2 2 1 1 2 3 2 2 3 4 2 4 1 4 2 1 1 2 2 3 1 2 4 1 4 2 2 4 3 3 2 4 1 3 1 2 3 3 4 1 2 4 3 4 2 1 1 4 4 4 3 1 1 4 2 3 3 2 4 4 2 2 2 1 1 57 14 39 28 36 49 9 35 17 12 74 16 65 34 69 29 95 16 72 85 27 85 68 45 85 76 49 99 46 31 7...
output:
404
result:
ok single line: '404'
Test #3:
score: 0
Accepted
time: 1ms
memory: 3124kb
input:
50 100 3 2 1 1 1 1 1 1 1 2 3 2 1 2 3 2 3 2 2 2 2 3 2 3 3 1 1 1 2 3 1 3 1 2 1 3 3 1 2 1 3 3 1 2 1 2 3 2 2 2 2 25 13 16 25 35 25 33 8 48 42 15 16 36 33 5 4 16 32 31 34 19 28 6 30 39 43 50 19 10 50 13 15 13 29 30 18 46 21 39 35 45 8 43 14 23 48 26 23 1 35 47 32 13 22 29 24 40 32 21 38 30 44 44 46 33 6 ...
output:
348
result:
ok single line: '348'
Test #4:
score: 0
Accepted
time: 2ms
memory: 2972kb
input:
50 100 2 2 1 2 1 2 2 1 1 1 2 1 1 1 2 2 2 1 1 2 1 1 1 1 1 1 2 2 2 1 2 2 2 1 1 2 1 1 1 2 1 2 1 2 1 2 2 2 2 1 2 37 11 3 45 26 21 26 33 16 49 25 7 21 14 43 48 21 40 4 11 30 34 40 43 5 21 12 32 34 42 38 4 2 15 4 1 41 45 49 48 30 8 42 20 34 44 50 5 5 49 34 16 50 33 41 15 18 47 23 8 37 19 48 26 19 33 11 36...
output:
94
result:
ok single line: '94'
Test #5:
score: 0
Accepted
time: 1ms
memory: 2996kb
input:
50 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 41 25 26 50 33 20 38 35 22 25 14 50 12 15 20 19 23 8 44 50 22 42 9 50 39 21 26 20 44 23 24 31 12 28 23 49 25 14 43 37 2 24 8 19 26 11 43 5 9 18 47 22 9 28 50 27 30 5 22 28 7 6 48 18 37 47 15 ...
output:
0
result:
ok single line: '0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 2980kb
input:
100 100 4 4 1 3 3 4 3 4 2 4 3 2 1 2 2 3 2 4 2 2 3 4 1 4 3 4 3 2 3 2 3 1 4 1 4 1 1 1 1 1 1 1 3 4 4 3 1 1 2 1 1 4 2 4 4 3 3 2 1 4 2 2 3 2 3 2 1 2 3 2 4 1 1 4 3 1 1 1 4 2 3 1 3 2 3 4 3 3 4 2 2 1 1 1 2 4 2 4 4 2 1 91 30 94 91 38 91 72 91 23 91 91 4 91 33 91 18 91 41 91 14 91 5 39 91 100 91 50 91 91 6 43...
output:
3598
result:
ok single line: '3598'
Test #7:
score: 0
Accepted
time: 2ms
memory: 2976kb
input:
60 99 4 3 2 1 2 3 1 2 3 3 1 3 1 1 1 2 1 3 1 2 2 1 2 1 3 1 1 3 2 3 3 3 3 3 2 1 2 1 2 3 2 2 3 2 2 3 1 1 2 1 1 2 2 2 1 3 1 3 3 4 3 59 27 21 57 4 59 28 40 47 18 45 59 40 59 17 59 59 32 32 7 12 17 44 59 41 59 59 51 57 35 54 43 50 60 37 8 53 17 25 55 28 51 59 28 35 27 38 59 9 59 28 60 6 42 36 59 11 51 26 ...
output:
2406
result:
ok single line: '2406'
Test #8:
score: 0
Accepted
time: 1ms
memory: 2976kb
input:
100 100 4 4 2 3 1 2 4 4 1 4 4 4 4 4 3 1 1 2 1 1 4 4 3 3 3 2 1 3 3 3 1 1 2 1 4 2 3 4 3 2 2 3 2 3 1 3 4 2 1 2 2 4 2 3 2 3 3 1 2 2 2 4 1 4 3 2 1 3 1 4 4 2 2 2 2 4 3 2 4 2 1 1 3 1 3 4 4 2 1 2 4 3 4 3 2 1 2 1 4 4 4 45 72 77 72 25 27 13 14 92 25 33 70 94 71 82 24 100 66 72 64 88 11 73 16 16 40 19 10 31 26...
output:
316
result:
ok single line: '316'
Test #9:
score: 0
Accepted
time: 2ms
memory: 2952kb
input:
2 1 4 1 3 1 2
output:
2
result:
ok single line: '2'
Test #10:
score: 0
Accepted
time: 2ms
memory: 2968kb
input:
3 3 3 1 3 2 3 1 1 2 2 3
output:
12
result:
ok single line: '12'
Subtask #2:
score: 20
Accepted
Test #11:
score: 20
Accepted
time: 66ms
memory: 5500kb
input:
5000 300000 3 3 1 3 3 3 1 3 2 2 1 3 3 1 2 3 3 3 1 2 3 2 3 2 3 3 1 3 3 2 2 1 2 1 2 1 1 1 3 3 3 1 2 3 3 1 3 2 2 2 1 1 3 1 3 3 1 2 3 3 2 1 2 1 2 1 3 3 3 3 3 1 3 1 2 3 2 2 3 2 1 2 2 2 2 1 3 2 2 3 3 3 1 1 2 3 2 1 1 2 2 1 1 2 2 1 3 3 1 1 2 3 1 2 3 3 3 2 2 2 3 1 3 2 3 1 3 2 3 3 3 1 2 3 3 3 2 2 2 3 3 3 1 3 ...
output:
16436298
result:
ok single line: '16436298'
Test #12:
score: 0
Accepted
time: 60ms
memory: 4908kb
input:
800 300000 3 2 3 1 2 3 1 1 1 1 3 2 1 2 3 2 2 3 3 3 3 2 2 3 3 2 2 1 2 3 2 3 1 2 1 3 3 3 1 2 2 1 1 1 2 3 3 3 2 2 1 1 3 3 3 1 2 2 3 1 3 1 1 1 3 3 1 2 1 1 3 3 2 2 2 2 3 2 2 3 2 1 1 2 3 1 3 2 2 3 3 2 2 2 3 2 1 1 3 3 3 1 1 3 2 2 1 3 1 2 3 1 3 1 1 1 1 1 2 3 3 2 2 3 3 2 1 3 3 3 1 1 1 3 3 1 1 2 2 3 2 1 2 3 3...
output:
100589586
result:
ok single line: '100589586'
Test #13:
score: 0
Accepted
time: 138ms
memory: 36596kb
input:
300000 300000 3 2 3 3 2 3 3 2 2 2 2 3 1 3 1 1 1 1 1 1 1 1 1 1 3 2 2 1 1 3 3 2 1 1 2 3 1 2 3 2 2 3 1 1 3 1 2 2 2 2 1 2 2 1 1 2 2 2 3 2 2 1 1 3 3 2 1 1 1 3 1 1 3 3 2 2 3 3 1 2 2 2 1 2 1 2 2 3 1 2 3 1 2 2 2 3 2 1 3 1 1 1 3 3 2 3 2 3 3 3 3 1 1 2 2 3 1 1 1 3 2 1 1 2 1 2 1 3 3 2 1 1 1 2 2 2 2 1 1 1 1 2 2 ...
output:
665606
result:
ok single line: '665606'
Test #14:
score: 0
Accepted
time: 43ms
memory: 7016kb
input:
30000 300000 2 2 2 1 2 1 2 2 1 2 1 1 2 2 1 2 2 2 2 2 2 1 2 2 1 1 2 1 1 1 2 2 1 2 1 2 1 2 2 1 2 1 2 1 1 2 1 2 2 1 1 1 2 1 2 1 1 1 1 2 1 2 2 2 1 2 1 2 2 1 1 2 2 2 2 1 1 1 2 1 1 2 1 2 2 1 2 2 1 1 2 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 1 2 2 1 1 1 1 2 1 1 2 2 2 1 2 2 2 1 1 2 2 2 2 1 1 2 1 2 2 2 1 1 1 2 1 2 1 2...
output:
299694
result:
ok single line: '299694'
Test #15:
score: 0
Accepted
time: 58ms
memory: 6752kb
input:
30000 300000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
0
result:
ok single line: '0'
Test #16:
score: 0
Accepted
time: 117ms
memory: 25948kb
input:
200000 299999 3 3 3 1 1 2 1 1 2 2 2 2 3 1 3 1 2 2 3 3 2 2 3 2 1 1 1 3 3 2 1 1 2 2 1 2 3 2 3 1 3 3 3 1 2 1 1 3 3 1 1 2 2 1 2 2 3 1 3 2 3 1 2 3 3 3 1 2 2 1 1 1 2 1 3 1 1 3 1 3 3 3 2 1 2 2 3 3 3 1 1 2 2 2 2 2 1 2 2 2 1 3 1 3 1 3 1 2 1 2 3 1 1 2 1 1 1 3 1 3 1 3 3 1 3 1 1 1 2 1 2 2 1 3 3 3 3 3 2 2 1 3 3 ...
output:
8922060294
result:
ok single line: '8922060294'
Test #17:
score: 0
Accepted
time: 145ms
memory: 36708kb
input:
300000 300000 3 3 2 2 1 1 2 3 1 3 2 2 3 3 2 3 2 2 2 2 3 3 1 1 1 1 1 2 3 1 1 3 2 1 3 1 2 1 3 1 1 2 3 2 2 2 3 1 2 1 3 1 3 3 3 2 2 2 1 1 2 2 3 3 3 3 2 1 1 2 1 1 1 1 2 3 2 2 1 2 2 3 1 3 2 2 3 3 2 3 2 2 1 2 2 2 1 1 1 3 3 3 2 1 3 1 1 2 3 3 1 2 1 2 3 3 3 2 2 1 3 1 3 1 1 2 1 2 1 1 1 3 1 1 3 1 2 1 1 2 1 1 3 ...
output:
666528
result:
ok single line: '666528'
Test #18:
score: 0
Accepted
time: 124ms
memory: 36388kb
input:
300000 300000 3 1 3 1 1 2 1 1 1 3 1 2 3 1 3 1 2 2 3 1 3 1 2 2 2 1 3 3 3 2 1 3 3 2 1 2 2 3 1 2 3 1 3 1 3 1 1 1 3 3 2 3 3 2 1 2 1 3 2 2 1 2 2 2 1 2 2 2 2 1 1 2 1 1 3 2 1 1 1 3 1 3 3 2 1 3 3 3 1 3 3 1 2 1 2 3 1 1 2 1 2 3 2 3 1 1 1 1 3 2 1 2 3 2 3 2 2 3 3 3 3 1 3 2 3 3 1 3 1 2 3 2 2 2 1 1 2 3 3 2 3 3 2 ...
output:
577020
result:
ok single line: '577020'
Subtask #3:
score: 27
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #19:
score: 27
Accepted
time: 53ms
memory: 5436kb
input:
5000 300000 3 3 1 3 3 3 1 3 2 2 1 3 3 1 2 3 3 3 1 2 3 2 3 2 3 3 1 3 3 2 2 1 2 1 2 1 1 1 3 3 3 1 2 3 3 1 3 2 2 2 1 1 3 1 3 3 1 2 3 3 2 1 2 1 2 1 3 3 3 3 3 1 3 1 2 3 2 2 3 2 1 2 2 2 2 1 3 2 2 3 3 3 1 1 2 3 2 1 1 2 2 1 1 2 2 1 3 3 1 1 2 3 1 2 3 3 3 2 2 2 3 1 3 2 3 1 3 2 3 3 3 1 2 3 3 3 2 2 2 3 3 3 1 3 ...
output:
16436298
result:
ok single line: '16436298'
Test #20:
score: 0
Accepted
time: 55ms
memory: 4892kb
input:
800 300000 3 2 3 1 2 3 1 1 1 1 3 2 1 2 3 2 2 3 3 3 3 2 2 3 3 2 2 1 2 3 2 3 1 2 1 3 3 3 1 2 2 1 1 1 2 3 3 3 2 2 1 1 3 3 3 1 2 2 3 1 3 1 1 1 3 3 1 2 1 1 3 3 2 2 2 2 3 2 2 3 2 1 1 2 3 1 3 2 2 3 3 2 2 2 3 2 1 1 3 3 3 1 1 3 2 2 1 3 1 2 3 1 3 1 1 1 1 1 2 3 3 2 2 3 3 2 1 3 3 3 1 1 1 3 3 1 1 2 2 3 2 1 2 3 3...
output:
100589586
result:
ok single line: '100589586'
Test #21:
score: 0
Accepted
time: 211ms
memory: 36440kb
input:
300000 300000 3 2 3 3 2 3 3 2 2 2 2 3 1 3 1 1 1 1 1 1 1 1 1 1 3 2 2 1 1 3 3 2 1 1 2 3 1 2 3 2 2 3 1 1 3 1 2 2 2 2 1 2 2 1 1 2 2 2 3 2 2 1 1 3 3 2 1 1 1 3 1 1 3 3 2 2 3 3 1 2 2 2 1 2 1 2 2 3 1 2 3 1 2 2 2 3 2 1 3 1 1 1 3 3 2 3 2 3 3 3 3 1 1 2 2 3 1 1 1 3 2 1 1 2 1 2 1 3 3 2 1 1 1 2 2 2 2 1 1 1 1 2 2 ...
output:
665606
result:
ok single line: '665606'
Test #22:
score: 0
Accepted
time: 65ms
memory: 6968kb
input:
30000 300000 2 2 2 1 2 1 2 2 1 2 1 1 2 2 1 2 2 2 2 2 2 1 2 2 1 1 2 1 1 1 2 2 1 2 1 2 1 2 2 1 2 1 2 1 1 2 1 2 2 1 1 1 2 1 2 1 1 1 1 2 1 2 2 2 1 2 1 2 2 1 1 2 2 2 2 1 1 1 2 1 1 2 1 2 2 1 2 2 1 1 2 1 2 2 2 2 1 2 2 2 1 2 2 2 2 2 1 2 2 1 1 1 1 2 1 1 2 2 2 1 2 2 2 1 1 2 2 2 2 1 1 2 1 2 2 2 1 1 1 2 1 2 1 2...
output:
299694
result:
ok single line: '299694'
Test #23:
score: 0
Accepted
time: 43ms
memory: 6732kb
input:
30000 300000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
0
result:
ok single line: '0'
Test #24:
score: 0
Accepted
time: 125ms
memory: 25956kb
input:
200000 299999 3 3 3 1 1 2 1 1 2 2 2 2 3 1 3 1 2 2 3 3 2 2 3 2 1 1 1 3 3 2 1 1 2 2 1 2 3 2 3 1 3 3 3 1 2 1 1 3 3 1 1 2 2 1 2 2 3 1 3 2 3 1 2 3 3 3 1 2 2 1 1 1 2 1 3 1 1 3 1 3 3 3 2 1 2 2 3 3 3 1 1 2 2 2 2 2 1 2 2 2 1 3 1 3 1 3 1 2 1 2 3 1 1 2 1 1 1 3 1 3 1 3 3 1 3 1 1 1 2 1 2 2 1 3 3 3 3 3 2 2 1 3 3 ...
output:
8922060294
result:
ok single line: '8922060294'
Test #25:
score: 0
Accepted
time: 159ms
memory: 36712kb
input:
300000 300000 3 3 2 2 1 1 2 3 1 3 2 2 3 3 2 3 2 2 2 2 3 3 1 1 1 1 1 2 3 1 1 3 2 1 3 1 2 1 3 1 1 2 3 2 2 2 3 1 2 1 3 1 3 3 3 2 2 2 1 1 2 2 3 3 3 3 2 1 1 2 1 1 1 1 2 3 2 2 1 2 2 3 1 3 2 2 3 3 2 3 2 2 1 2 2 2 1 1 1 3 3 3 2 1 3 1 1 2 3 3 1 2 1 2 3 3 3 2 2 1 3 1 3 1 1 2 1 2 1 1 1 3 1 1 3 1 2 1 1 2 1 1 3 ...
output:
666528
result:
ok single line: '666528'
Test #26:
score: 0
Accepted
time: 144ms
memory: 36360kb
input:
300000 300000 3 1 3 1 1 2 1 1 1 3 1 2 3 1 3 1 2 2 3 1 3 1 2 2 2 1 3 3 3 2 1 3 3 2 1 2 2 3 1 2 3 1 3 1 3 1 1 1 3 3 2 3 3 2 1 2 1 3 2 2 1 2 2 2 1 2 2 2 2 1 1 2 1 1 3 2 1 1 1 3 1 3 3 2 1 3 3 3 1 3 3 1 2 1 2 3 1 1 2 1 2 3 2 3 1 1 1 1 3 2 1 2 3 2 3 2 2 3 3 3 3 1 3 2 3 3 1 3 1 2 3 2 2 2 1 1 2 3 3 2 3 3 2 ...
output:
577020
result:
ok single line: '577020'
Test #27:
score: 0
Accepted
time: 69ms
memory: 4904kb
input:
800 300000 4 3 2 4 4 1 4 1 3 2 4 3 2 3 1 2 3 2 2 2 2 4 1 4 3 4 2 2 4 1 2 1 3 2 2 2 1 4 3 4 2 1 1 1 2 3 1 2 4 3 1 4 3 2 1 1 4 1 4 1 1 3 3 2 2 1 2 3 2 4 4 4 4 1 3 2 3 3 3 4 3 4 2 2 3 4 4 1 3 1 4 2 2 4 4 1 3 3 2 4 1 1 1 1 3 4 2 3 1 2 3 2 3 4 2 4 2 1 4 2 4 3 1 4 4 4 4 2 1 2 2 2 4 3 2 3 3 2 1 3 1 4 1 4 4...
output:
31899888672
result:
ok single line: '31899888672'
Test #28:
score: 0
Accepted
time: 108ms
memory: 6368kb
input:
8000 300000 4 1 4 1 4 2 2 4 2 1 1 1 4 3 4 2 3 1 3 4 3 2 1 4 3 3 4 4 2 2 3 2 1 4 4 4 1 3 4 1 4 3 1 3 1 1 3 3 1 3 3 2 3 4 1 2 1 1 4 4 4 4 2 3 4 3 2 1 4 3 2 2 4 4 3 2 2 4 3 1 3 2 3 4 3 2 3 4 3 1 2 4 1 1 2 1 1 3 2 3 2 4 3 3 3 2 2 2 1 4 2 2 2 3 4 4 3 2 1 1 4 2 3 1 1 4 3 4 2 1 2 2 1 2 3 3 2 4 2 3 3 4 2 4 ...
output:
334222370
result:
ok single line: '334222370'
Test #29:
score: 0
Accepted
time: 272ms
memory: 55324kb
input:
300000 300000 4 1 3 3 3 4 4 3 3 3 2 1 2 2 1 4 3 3 1 3 2 4 2 1 2 4 3 2 2 4 3 3 4 1 3 2 4 3 3 4 2 2 2 4 2 4 1 4 3 1 1 2 4 2 2 2 3 2 2 2 2 1 3 2 4 4 1 2 2 2 4 3 2 4 1 3 3 4 1 3 4 1 4 2 2 4 2 2 2 1 3 3 3 1 3 4 1 1 1 3 3 3 4 2 3 1 3 2 3 3 2 4 2 1 4 2 2 3 2 2 3 4 3 4 2 2 4 3 4 4 1 3 4 2 4 1 1 2 3 2 1 3 3 ...
output:
1121790
result:
ok single line: '1121790'
Test #30:
score: 0
Accepted
time: 220ms
memory: 30052kb
input:
150000 299999 4 3 4 2 3 4 3 3 3 1 4 4 1 4 2 1 3 4 2 3 4 3 2 3 3 2 3 3 2 3 2 3 1 2 1 4 2 2 2 3 4 1 3 1 3 2 4 4 1 4 1 2 1 1 4 4 3 1 4 4 1 4 3 3 4 1 4 3 3 1 2 1 4 1 4 1 2 1 4 4 3 3 3 4 1 1 1 3 4 1 4 2 4 4 1 3 2 1 3 3 1 3 4 2 3 4 4 3 2 3 3 3 1 3 4 1 3 4 3 4 2 4 4 3 3 1 3 1 3 2 2 3 3 3 4 4 2 4 1 4 3 3 1 ...
output:
16831953826
result:
ok single line: '16831953826'
Test #31:
score: 0
Accepted
time: 166ms
memory: 30128kb
input:
150000 299999 4 3 4 4 3 4 3 4 2 2 2 4 4 3 3 3 2 3 4 2 3 3 3 3 2 4 2 3 3 2 2 4 3 3 2 3 4 4 4 4 4 4 2 2 2 4 3 2 4 4 2 3 4 3 3 4 2 3 3 4 4 2 3 2 4 2 3 2 4 4 4 3 3 2 4 3 3 2 4 4 2 4 3 4 2 3 4 2 4 4 3 3 2 4 3 4 4 4 4 4 2 3 3 4 3 3 3 3 2 4 4 3 2 4 3 4 2 2 4 3 3 2 3 3 3 4 2 2 3 3 4 3 4 3 4 2 2 3 3 2 4 2 3 ...
output:
16660046632
result:
ok single line: '16660046632'
Test #32:
score: 0
Accepted
time: 207ms
memory: 55300kb
input:
300000 300000 4 4 2 3 2 4 4 2 3 3 4 4 4 2 3 2 4 4 4 2 1 3 2 1 2 4 4 2 3 3 2 4 3 3 2 1 2 1 3 2 2 4 4 1 1 1 1 4 2 4 3 3 4 1 2 4 4 4 4 1 1 1 3 4 4 2 1 2 4 4 4 4 3 4 4 2 4 4 1 1 1 3 3 3 2 2 4 4 2 1 3 2 2 1 3 3 2 4 1 1 3 2 2 4 1 4 4 4 2 2 3 1 2 1 3 3 4 3 4 4 3 3 2 1 3 2 4 3 1 4 2 1 4 4 2 3 4 4 4 1 3 1 2 ...
output:
1126130
result:
ok single line: '1126130'
Test #33:
score: 0
Accepted
time: 0ms
memory: 2968kb
input:
30 100 4 3 3 1 3 3 1 4 4 4 3 3 3 3 2 1 2 1 4 2 2 1 2 2 3 3 2 3 3 4 2 7 21 1 16 4 13 2 12 13 20 1 12 26 28 2 20 30 26 3 8 21 1 5 7 15 17 3 24 16 6 16 12 9 28 26 7 1 18 12 5 9 3 11 5 20 10 27 20 3 25 14 20 8 11 3 23 7 10 29 27 23 10 9 7 26 4 24 30 14 29 1 22 18 8 16 17 18 24 20 9 20 3 23 21 4 6 16 13 ...
output:
1316
result:
ok single line: '1316'
Test #34:
score: 0
Accepted
time: 1ms
memory: 2988kb
input:
100 100 4 1 2 1 2 2 3 2 4 1 2 3 2 2 3 1 4 1 3 2 3 4 4 2 3 1 4 3 4 1 4 2 4 1 3 4 2 2 1 1 2 3 2 2 3 4 2 4 1 4 2 1 1 2 2 3 1 2 4 1 4 2 2 4 3 3 2 4 1 3 1 2 3 3 4 1 2 4 3 4 2 1 1 4 4 4 3 1 1 4 2 3 3 2 4 4 2 2 2 1 1 57 14 39 28 36 49 9 35 17 12 74 16 65 34 69 29 95 16 72 85 27 85 68 45 85 76 49 99 46 31 7...
output:
404
result:
ok single line: '404'
Test #35:
score: 0
Accepted
time: 2ms
memory: 2972kb
input:
50 100 3 2 1 1 1 1 1 1 1 2 3 2 1 2 3 2 3 2 2 2 2 3 2 3 3 1 1 1 2 3 1 3 1 2 1 3 3 1 2 1 3 3 1 2 1 2 3 2 2 2 2 25 13 16 25 35 25 33 8 48 42 15 16 36 33 5 4 16 32 31 34 19 28 6 30 39 43 50 19 10 50 13 15 13 29 30 18 46 21 39 35 45 8 43 14 23 48 26 23 1 35 47 32 13 22 29 24 40 32 21 38 30 44 44 46 33 6 ...
output:
348
result:
ok single line: '348'
Test #36:
score: 0
Accepted
time: 0ms
memory: 3040kb
input:
50 100 2 2 1 2 1 2 2 1 1 1 2 1 1 1 2 2 2 1 1 2 1 1 1 1 1 1 2 2 2 1 2 2 2 1 1 2 1 1 1 2 1 2 1 2 1 2 2 2 2 1 2 37 11 3 45 26 21 26 33 16 49 25 7 21 14 43 48 21 40 4 11 30 34 40 43 5 21 12 32 34 42 38 4 2 15 4 1 41 45 49 48 30 8 42 20 34 44 50 5 5 49 34 16 50 33 41 15 18 47 23 8 37 19 48 26 19 33 11 36...
output:
94
result:
ok single line: '94'
Test #37:
score: 0
Accepted
time: 2ms
memory: 3120kb
input:
50 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 41 25 26 50 33 20 38 35 22 25 14 50 12 15 20 19 23 8 44 50 22 42 9 50 39 21 26 20 44 23 24 31 12 28 23 49 25 14 43 37 2 24 8 19 26 11 43 5 9 18 47 22 9 28 50 27 30 5 22 28 7 6 48 18 37 47 15 ...
output:
0
result:
ok single line: '0'
Test #38:
score: 0
Accepted
time: 2ms
memory: 3016kb
input:
100 100 4 4 1 3 3 4 3 4 2 4 3 2 1 2 2 3 2 4 2 2 3 4 1 4 3 4 3 2 3 2 3 1 4 1 4 1 1 1 1 1 1 1 3 4 4 3 1 1 2 1 1 4 2 4 4 3 3 2 1 4 2 2 3 2 3 2 1 2 3 2 4 1 1 4 3 1 1 1 4 2 3 1 3 2 3 4 3 3 4 2 2 1 1 1 2 4 2 4 4 2 1 91 30 94 91 38 91 72 91 23 91 91 4 91 33 91 18 91 41 91 14 91 5 39 91 100 91 50 91 91 6 43...
output:
3598
result:
ok single line: '3598'
Test #39:
score: 0
Accepted
time: 2ms
memory: 2972kb
input:
60 99 4 3 2 1 2 3 1 2 3 3 1 3 1 1 1 2 1 3 1 2 2 1 2 1 3 1 1 3 2 3 3 3 3 3 2 1 2 1 2 3 2 2 3 2 2 3 1 1 2 1 1 2 2 2 1 3 1 3 3 4 3 59 27 21 57 4 59 28 40 47 18 45 59 40 59 17 59 59 32 32 7 12 17 44 59 41 59 59 51 57 35 54 43 50 60 37 8 53 17 25 55 28 51 59 28 35 27 38 59 9 59 28 60 6 42 36 59 11 51 26 ...
output:
2406
result:
ok single line: '2406'
Test #40:
score: 0
Accepted
time: 2ms
memory: 2980kb
input:
100 100 4 4 2 3 1 2 4 4 1 4 4 4 4 4 3 1 1 2 1 1 4 4 3 3 3 2 1 3 3 3 1 1 2 1 4 2 3 4 3 2 2 3 2 3 1 3 4 2 1 2 2 4 2 3 2 3 3 1 2 2 2 4 1 4 3 2 1 3 1 4 4 2 2 2 2 4 3 2 4 2 1 1 3 1 3 4 4 2 1 2 4 3 4 3 2 1 2 1 4 4 4 45 72 77 72 25 27 13 14 92 25 33 70 94 71 82 24 100 66 72 64 88 11 73 16 16 40 19 10 31 26...
output:
316
result:
ok single line: '316'
Test #41:
score: 0
Accepted
time: 2ms
memory: 3120kb
input:
2 1 4 1 3 1 2
output:
2
result:
ok single line: '2'
Test #42:
score: 0
Accepted
time: 2ms
memory: 3032kb
input:
3 3 3 1 3 2 3 1 1 2 2 3
output:
12
result:
ok single line: '12'
Subtask #4:
score: 30
Accepted
Dependency #1:
100%
Accepted
Test #43:
score: 30
Accepted
time: 2ms
memory: 2964kb
input:
2 1 5 5 3 1 2
output:
2
result:
ok single line: '2'
Test #44:
score: 0
Accepted
time: 55ms
memory: 3648kb
input:
480 100000 5 2 2 2 3 5 2 1 5 3 5 5 2 4 2 3 3 3 1 2 3 4 2 4 3 5 5 4 4 2 4 4 2 5 1 2 1 1 1 2 2 2 5 1 3 5 1 1 2 3 5 4 4 4 1 1 4 4 3 1 3 3 1 5 3 3 3 2 1 5 3 5 4 2 5 2 3 5 5 3 3 3 2 5 3 2 3 5 5 3 2 3 5 1 5 2 5 2 1 1 3 4 2 5 4 4 2 1 1 5 5 4 1 2 4 4 1 5 2 3 3 3 1 5 3 2 4 3 4 3 2 3 1 2 3 5 3 5 4 5 3 5 3 1 1...
output:
545258011824
result:
ok single line: '545258011824'
Test #45:
score: 0
Accepted
time: 151ms
memory: 32680kb
input:
100000 100000 5 4 2 3 3 5 1 2 5 5 5 1 3 4 5 2 3 2 3 4 2 2 4 4 5 1 3 3 5 5 1 2 5 5 5 5 3 3 4 5 1 2 3 4 4 5 4 2 5 3 2 4 3 4 5 2 2 1 2 5 5 4 1 5 4 4 5 5 3 4 5 3 2 2 4 5 4 3 4 2 4 2 4 4 5 3 3 4 5 3 2 5 1 4 5 4 4 4 4 5 5 3 1 5 1 4 5 2 3 5 2 4 1 2 4 1 1 3 3 3 3 5 5 1 1 2 2 1 2 5 4 5 2 3 1 5 4 2 3 1 4 3 2 ...
output:
564534
result:
ok single line: '564534'
Test #46:
score: 0
Accepted
time: 18ms
memory: 3324kb
input:
480 100000 3 3 2 3 3 2 2 1 1 3 2 2 1 2 1 1 2 1 2 1 3 1 1 3 1 2 2 2 2 3 1 2 2 1 2 1 3 1 3 2 2 1 2 2 3 3 1 2 1 3 1 1 3 2 1 3 2 2 3 1 3 2 3 3 2 3 1 1 1 1 3 2 2 2 3 2 2 3 2 3 3 1 1 3 3 1 3 2 3 1 3 3 2 3 1 1 3 2 2 3 1 1 2 2 2 3 1 1 1 2 3 1 3 2 2 2 1 1 2 1 1 1 3 1 2 1 1 2 3 3 3 3 1 1 2 3 3 3 3 2 3 2 3 3 2...
output:
18770760
result:
ok single line: '18770760'
Test #47:
score: 0
Accepted
time: 36ms
memory: 13880kb
input:
100000 100000 3 2 3 2 2 1 2 2 1 1 2 2 1 2 3 1 3 1 2 1 3 2 3 3 2 3 1 2 3 1 2 1 3 3 2 2 3 2 2 2 3 2 2 2 3 2 1 2 2 3 2 2 2 2 3 3 2 2 2 2 3 2 3 2 3 2 3 1 3 1 2 3 3 3 1 2 2 2 2 2 3 1 1 1 2 1 1 3 1 3 2 2 2 1 2 2 2 1 1 2 3 2 1 3 1 3 2 1 2 3 2 2 1 1 3 2 3 1 3 3 3 2 1 1 2 3 1 1 3 1 2 2 3 2 1 3 2 2 3 1 3 2 2 ...
output:
222836
result:
ok single line: '222836'
Test #48:
score: 0
Accepted
time: 43ms
memory: 13876kb
input:
100000 99999 3 1 2 2 2 3 1 1 3 1 2 1 1 2 2 2 3 3 1 1 1 1 2 2 3 1 1 1 2 2 2 3 1 2 1 3 1 3 3 2 2 2 2 2 1 2 2 2 2 1 2 3 3 3 1 3 3 3 1 3 2 1 1 2 1 3 3 1 3 3 2 1 1 3 1 1 1 3 2 3 2 1 3 1 3 1 1 1 1 1 3 3 2 3 2 1 3 2 3 3 2 2 2 1 3 1 2 3 2 2 2 1 3 1 2 1 3 3 3 1 3 1 3 3 2 3 1 3 1 3 2 2 2 2 1 1 3 1 2 2 1 3 2 2...
output:
2220366454
result:
ok single line: '2220366454'
Test #49:
score: 0
Accepted
time: 77ms
memory: 17768kb
input:
50000 89999 5 5 3 5 4 1 3 2 3 3 2 5 5 5 5 3 3 3 3 2 1 4 5 3 2 2 1 1 2 2 1 1 3 5 1 5 1 3 2 1 3 1 1 3 1 3 1 3 4 4 5 4 2 1 1 2 4 2 3 4 4 2 1 5 2 2 5 3 3 1 5 2 1 3 3 4 4 1 3 4 4 1 4 4 5 4 1 2 4 1 4 1 3 4 3 5 1 3 2 5 2 3 3 2 4 3 3 1 1 1 4 3 4 2 1 5 5 3 1 1 5 4 2 3 4 5 1 5 3 3 4 1 2 4 1 3 1 4 4 2 3 5 1 4 ...
output:
3454818410
result:
ok single line: '3454818410'
Test #50:
score: 0
Accepted
time: 20ms
memory: 3388kb
input:
480 100000 4 3 2 4 1 4 2 3 4 4 4 2 4 4 1 3 1 1 4 3 3 1 3 3 1 1 3 1 1 2 4 2 4 1 1 2 2 4 3 1 2 2 4 1 1 3 2 3 1 3 4 3 1 3 4 3 4 3 3 4 3 1 3 1 4 3 3 2 3 4 3 3 3 4 3 2 1 2 4 2 2 1 1 3 4 2 2 4 2 2 1 1 3 4 4 3 2 3 1 4 3 2 1 2 2 1 3 1 1 2 3 3 2 2 4 1 2 2 2 4 1 4 1 3 1 4 2 3 4 3 4 2 4 1 3 3 4 3 3 3 4 3 4 4 3...
output:
3277553092
result:
ok single line: '3277553092'
Test #51:
score: 0
Accepted
time: 66ms
memory: 20284kb
input:
100000 100000 4 1 1 1 1 3 3 4 1 4 4 2 3 1 1 2 4 4 1 3 1 4 3 2 2 2 3 3 4 3 4 3 2 4 2 1 1 3 3 4 4 1 4 1 2 3 1 1 4 4 2 4 2 1 4 4 2 1 1 2 2 2 3 3 1 1 3 4 3 4 1 1 3 4 1 4 2 1 1 3 4 3 4 1 3 1 2 3 4 2 1 4 4 2 2 1 3 2 2 3 4 4 3 1 4 2 1 2 2 4 4 2 3 3 4 3 2 1 4 4 3 3 2 3 3 2 1 1 1 4 2 1 4 1 4 3 4 3 4 1 3 2 4 ...
output:
374134
result:
ok single line: '374134'
Test #52:
score: 0
Accepted
time: 56ms
memory: 20128kb
input:
100000 99999 4 3 2 3 2 4 3 3 3 1 1 1 1 4 2 4 2 2 1 2 4 1 1 4 2 1 1 4 3 1 3 3 3 4 2 4 1 1 3 2 2 3 3 3 3 3 3 1 2 1 2 4 4 4 1 3 1 1 4 3 3 4 3 4 3 3 3 2 4 1 4 2 4 2 3 2 3 4 2 1 1 4 3 3 1 1 3 3 4 2 1 3 2 3 4 4 2 1 2 1 1 4 2 4 1 4 4 4 1 4 1 4 3 4 4 1 3 4 2 2 3 1 1 3 1 3 2 1 1 2 3 1 2 3 3 4 2 3 4 3 2 1 1 2...
output:
3760223314
result:
ok single line: '3760223314'
Test #53:
score: 0
Accepted
time: 44ms
memory: 20064kb
input:
100000 99999 4 2 4 2 3 3 4 2 4 3 2 2 2 3 3 3 2 4 2 2 2 4 4 4 4 4 2 3 3 4 4 4 4 3 4 4 2 4 2 3 4 4 2 4 2 2 4 3 2 4 4 3 3 3 3 3 3 3 3 3 3 4 3 2 4 2 3 2 2 4 2 3 4 4 2 2 2 4 4 2 2 4 4 2 2 2 3 3 3 3 2 3 4 4 2 3 3 4 2 3 3 4 4 4 4 2 3 2 2 2 2 4 3 3 4 4 3 3 4 4 4 2 2 3 3 3 4 2 2 2 2 3 3 2 4 2 2 2 3 3 4 4 4 4...
output:
4444622220
result:
ok single line: '4444622220'
Test #54:
score: 0
Accepted
time: 75ms
memory: 25236kb
input:
75000 99996 5 1 5 3 3 3 3 5 5 5 3 3 1 1 5 3 3 5 1 5 5 5 5 1 1 3 1 3 3 1 3 5 1 3 3 3 3 3 5 5 3 3 1 3 1 1 3 1 5 3 3 3 5 5 5 3 1 5 3 3 3 5 1 5 3 5 1 3 5 1 5 3 3 5 5 5 1 1 5 3 1 1 5 3 5 3 1 3 3 1 5 1 1 3 3 3 1 3 5 3 3 1 1 5 3 3 5 3 3 1 1 1 1 5 1 5 5 1 5 3 5 1 5 1 1 1 1 5 5 3 3 1 5 1 5 3 5 3 1 1 1 3 1 1 ...
output:
31252499849988
result:
ok single line: '31252499849988'
Test #55:
score: 0
Accepted
time: 71ms
memory: 17844kb
input:
50000 96664 5 4 5 1 4 1 4 5 1 1 4 1 5 4 5 1 1 4 4 4 4 1 4 1 1 4 1 4 5 1 5 5 4 5 5 4 5 4 4 1 4 5 5 4 4 4 5 5 1 4 1 5 1 4 5 4 4 5 1 1 4 5 5 4 5 4 5 1 5 4 5 5 1 4 5 1 4 5 1 4 1 1 1 4 1 5 1 5 4 1 5 1 4 1 5 5 1 4 5 1 5 1 1 5 1 5 1 1 4 4 4 5 1 1 4 4 1 1 5 1 5 1 1 1 4 1 4 5 1 1 5 5 4 4 5 4 4 5 5 1 1 4 4 4 ...
output:
9262597908028
result:
ok single line: '9262597908028'
Test #56:
score: 0
Accepted
time: 86ms
memory: 32616kb
input:
100000 100000 5 5 1 5 1 4 4 4 4 4 5 1 2 4 3 4 5 5 4 2 3 3 5 4 3 5 1 3 1 3 1 3 5 2 2 5 3 1 1 1 1 2 4 3 5 3 4 2 4 5 1 2 5 3 4 5 5 1 2 2 5 4 5 5 4 2 5 1 2 2 3 3 4 3 5 4 2 4 4 2 4 5 1 1 2 4 3 2 3 4 1 5 3 1 4 4 4 3 2 3 3 1 5 1 3 4 3 1 1 2 2 2 1 2 2 4 4 3 2 3 1 2 3 2 5 2 4 1 4 3 2 2 2 2 5 3 3 5 3 5 3 2 4 ...
output:
559300
result:
ok single line: '559300'
Test #57:
score: 0
Accepted
time: 79ms
memory: 32688kb
input:
100000 100000 5 1 2 2 3 2 3 5 1 4 3 4 4 2 1 4 5 2 4 2 5 5 3 5 3 3 3 4 2 5 1 5 2 1 5 5 4 2 3 3 5 2 5 4 1 1 4 1 2 3 2 5 2 3 4 3 3 4 1 5 4 4 3 5 4 4 3 3 2 4 1 3 4 4 4 3 1 5 2 1 1 1 4 2 2 5 5 2 3 5 1 2 2 4 1 1 2 5 2 1 3 5 5 1 4 3 2 1 5 4 2 5 2 3 2 2 3 2 2 3 1 4 3 1 4 4 1 5 2 3 4 2 5 2 2 3 5 5 1 2 2 1 1 ...
output:
398058
result:
ok single line: '398058'
Test #58:
score: 0
Accepted
time: 2ms
memory: 3048kb
input:
30 100 4 3 3 1 3 3 1 4 4 4 3 3 3 3 2 1 2 1 4 2 2 1 2 2 3 3 2 3 3 4 2 7 21 1 16 4 13 2 12 13 20 1 12 26 28 2 20 30 26 3 8 21 1 5 7 15 17 3 24 16 6 16 12 9 28 26 7 1 18 12 5 9 3 11 5 20 10 27 20 3 25 14 20 8 11 3 23 7 10 29 27 23 10 9 7 26 4 24 30 14 29 1 22 18 8 16 17 18 24 20 9 20 3 23 21 4 6 16 13 ...
output:
1316
result:
ok single line: '1316'
Test #59:
score: 0
Accepted
time: 2ms
memory: 2984kb
input:
100 100 4 1 2 1 2 2 3 2 4 1 2 3 2 2 3 1 4 1 3 2 3 4 4 2 3 1 4 3 4 1 4 2 4 1 3 4 2 2 1 1 2 3 2 2 3 4 2 4 1 4 2 1 1 2 2 3 1 2 4 1 4 2 2 4 3 3 2 4 1 3 1 2 3 3 4 1 2 4 3 4 2 1 1 4 4 4 3 1 1 4 2 3 3 2 4 4 2 2 2 1 1 57 14 39 28 36 49 9 35 17 12 74 16 65 34 69 29 95 16 72 85 27 85 68 45 85 76 49 99 46 31 7...
output:
404
result:
ok single line: '404'
Test #60:
score: 0
Accepted
time: 2ms
memory: 3040kb
input:
50 100 3 2 1 1 1 1 1 1 1 2 3 2 1 2 3 2 3 2 2 2 2 3 2 3 3 1 1 1 2 3 1 3 1 2 1 3 3 1 2 1 3 3 1 2 1 2 3 2 2 2 2 25 13 16 25 35 25 33 8 48 42 15 16 36 33 5 4 16 32 31 34 19 28 6 30 39 43 50 19 10 50 13 15 13 29 30 18 46 21 39 35 45 8 43 14 23 48 26 23 1 35 47 32 13 22 29 24 40 32 21 38 30 44 44 46 33 6 ...
output:
348
result:
ok single line: '348'
Test #61:
score: 0
Accepted
time: 2ms
memory: 3124kb
input:
50 100 2 2 1 2 1 2 2 1 1 1 2 1 1 1 2 2 2 1 1 2 1 1 1 1 1 1 2 2 2 1 2 2 2 1 1 2 1 1 1 2 1 2 1 2 1 2 2 2 2 1 2 37 11 3 45 26 21 26 33 16 49 25 7 21 14 43 48 21 40 4 11 30 34 40 43 5 21 12 32 34 42 38 4 2 15 4 1 41 45 49 48 30 8 42 20 34 44 50 5 5 49 34 16 50 33 41 15 18 47 23 8 37 19 48 26 19 33 11 36...
output:
94
result:
ok single line: '94'
Test #62:
score: 0
Accepted
time: 1ms
memory: 3052kb
input:
50 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 41 25 26 50 33 20 38 35 22 25 14 50 12 15 20 19 23 8 44 50 22 42 9 50 39 21 26 20 44 23 24 31 12 28 23 49 25 14 43 37 2 24 8 19 26 11 43 5 9 18 47 22 9 28 50 27 30 5 22 28 7 6 48 18 37 47 15 ...
output:
0
result:
ok single line: '0'
Test #63:
score: 0
Accepted
time: 3ms
memory: 2956kb
input:
100 100 4 4 1 3 3 4 3 4 2 4 3 2 1 2 2 3 2 4 2 2 3 4 1 4 3 4 3 2 3 2 3 1 4 1 4 1 1 1 1 1 1 1 3 4 4 3 1 1 2 1 1 4 2 4 4 3 3 2 1 4 2 2 3 2 3 2 1 2 3 2 4 1 1 4 3 1 1 1 4 2 3 1 3 2 3 4 3 3 4 2 2 1 1 1 2 4 2 4 4 2 1 91 30 94 91 38 91 72 91 23 91 91 4 91 33 91 18 91 41 91 14 91 5 39 91 100 91 50 91 91 6 43...
output:
3598
result:
ok single line: '3598'
Test #64:
score: 0
Accepted
time: 1ms
memory: 3040kb
input:
60 99 4 3 2 1 2 3 1 2 3 3 1 3 1 1 1 2 1 3 1 2 2 1 2 1 3 1 1 3 2 3 3 3 3 3 2 1 2 1 2 3 2 2 3 2 2 3 1 1 2 1 1 2 2 2 1 3 1 3 3 4 3 59 27 21 57 4 59 28 40 47 18 45 59 40 59 17 59 59 32 32 7 12 17 44 59 41 59 59 51 57 35 54 43 50 60 37 8 53 17 25 55 28 51 59 28 35 27 38 59 9 59 28 60 6 42 36 59 11 51 26 ...
output:
2406
result:
ok single line: '2406'
Test #65:
score: 0
Accepted
time: 3ms
memory: 2968kb
input:
100 100 4 4 2 3 1 2 4 4 1 4 4 4 4 4 3 1 1 2 1 1 4 4 3 3 3 2 1 3 3 3 1 1 2 1 4 2 3 4 3 2 2 3 2 3 1 3 4 2 1 2 2 4 2 3 2 3 3 1 2 2 2 4 1 4 3 2 1 3 1 4 4 2 2 2 2 4 3 2 4 2 1 1 3 1 3 4 4 2 1 2 4 3 4 3 2 1 2 1 4 4 4 45 72 77 72 25 27 13 14 92 25 33 70 94 71 82 24 100 66 72 64 88 11 73 16 16 40 19 10 31 26...
output:
316
result:
ok single line: '316'
Test #66:
score: 0
Accepted
time: 3ms
memory: 3032kb
input:
2 1 4 1 3 1 2
output:
2
result:
ok single line: '2'
Test #67:
score: 0
Accepted
time: 1ms
memory: 2964kb
input:
3 3 3 1 3 2 3 1 1 2 2 3
output:
12
result:
ok single line: '12'