QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#274172 | #7604. Find the Vertex | GuanYunchang | AC ✓ | 88ms | 23236kb | C++17 | 792b | 2023-12-03 12:27:06 | 2023-12-03 12:27:07 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 15940kb
input:
5 6 1 0 1 1 2 5 4 1 2 3 2 3 4 4 2 1 5
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 0
Accepted
time: 3ms
memory: 15936kb
input:
6 6 0 1 2 0 2 1 1 2 2 3 3 4 4 5 5 6 6 1
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 3ms
memory: 17924kb
input:
10 9 1 2 0 0 0 0 2 2 1 0 1 4 8 5 4 9 10 8 3 8 9 8 7 9 6 8 2 9
output:
4
result:
ok 1 number(s): "4"
Test #4:
score: 0
Accepted
time: 0ms
memory: 15868kb
input:
10 12 2 1 2 0 2 0 1 0 1 1 7 5 5 2 7 1 9 6 3 2 1 2 10 6 4 3 6 2 7 10 8 1 6 7
output:
6
result:
ok 1 number(s): "6"
Test #5:
score: 0
Accepted
time: 3ms
memory: 17988kb
input:
10 20 2 1 0 2 2 2 1 0 1 1 5 3 4 1 7 4 2 4 6 2 5 2 1 7 4 5 9 1 1 5 6 1 6 4 8 2 10 8 3 1 2 7 9 5 8 7 8 9 9 2
output:
8
result:
ok 1 number(s): "8"
Test #6:
score: 0
Accepted
time: 0ms
memory: 15992kb
input:
10 30 1 1 2 0 1 2 1 2 1 1 7 5 7 2 9 6 8 7 8 9 7 1 4 1 3 1 9 10 9 7 6 1 9 4 9 1 1 5 4 7 2 10 8 2 3 5 9 3 10 6 5 4 2 9 4 2 10 4 10 5 1 10 1 8 6 3 2 5 5 6
output:
4
result:
ok 1 number(s): "4"
Test #7:
score: 0
Accepted
time: 2ms
memory: 17984kb
input:
100 99 1 1 1 1 0 2 2 0 0 1 1 2 1 2 0 1 0 0 0 0 0 2 1 1 2 0 2 1 1 1 0 0 0 0 0 2 0 0 1 0 2 0 2 2 0 1 2 1 0 1 2 0 2 1 0 1 0 0 2 2 2 2 2 0 1 0 0 0 1 0 2 0 1 2 0 2 0 1 1 1 1 2 0 0 2 2 2 0 1 0 0 0 1 0 2 0 2 2 1 0 57 62 63 3 39 15 70 71 72 86 87 30 60 30 17 76 15 14 22 28 89 38 61 28 93 66 21 86 6 30 40 76...
output:
49
result:
ok 1 number(s): "49"
Test #8:
score: 0
Accepted
time: 0ms
memory: 15936kb
input:
100 120 0 0 0 2 0 1 2 0 2 1 2 2 0 1 2 2 2 2 1 2 0 0 1 0 2 1 2 2 0 0 0 0 2 2 0 2 2 0 1 1 0 1 2 1 0 0 2 0 1 1 2 1 2 2 1 0 2 0 2 1 2 0 1 1 2 1 0 2 1 1 2 0 2 1 2 2 0 1 2 1 1 2 1 0 1 2 0 2 2 0 0 0 1 0 2 1 2 2 1 1 28 31 77 53 6 2 53 41 44 2 73 42 79 72 59 39 20 59 34 50 47 96 30 54 98 69 93 45 43 10 95 93...
output:
1
result:
ok 1 number(s): "1"
Test #9:
score: 0
Accepted
time: 0ms
memory: 18000kb
input:
100 200 1 2 0 1 2 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 1 0 2 0 1 0 2 0 1 2 1 0 1 0 0 2 1 0 1 2 2 1 2 2 1 2 0 0 2 1 2 1 1 0 2 1 2 1 2 2 0 2 1 1 2 1 0 0 1 2 0 0 0 0 0 1 2 2 1 1 0 0 1 0 0 0 1 2 1 0 2 0 1 2 2 2 1 1 1 2 26 71 21 29 9 100 45 18 92 88 17 2 93 26 7 5 98 8 83 84 66 11 94 25 74 18 100 15 6 30 5 24 2...
output:
81
result:
ok 1 number(s): "81"
Test #10:
score: 0
Accepted
time: 0ms
memory: 18044kb
input:
100 300 2 1 2 0 1 0 0 0 0 0 2 0 0 1 0 2 0 1 0 0 0 0 2 2 2 0 0 0 1 0 0 2 0 2 0 0 0 2 0 2 0 1 0 1 0 1 0 0 0 0 2 2 2 2 0 0 0 0 2 1 0 2 0 1 0 2 2 0 0 1 2 1 2 0 1 2 1 2 2 2 2 0 2 0 0 2 2 0 0 1 2 0 0 0 2 0 2 1 0 1 62 50 75 13 21 48 4 76 84 87 1 13 18 39 95 58 38 87 19 15 96 58 50 18 52 56 96 7 47 33 74 27...
output:
65
result:
ok 1 number(s): "65"
Test #11:
score: 0
Accepted
time: 5ms
memory: 18008kb
input:
10000 9999 1 1 2 1 2 0 0 2 2 1 2 1 1 0 1 1 0 2 1 2 1 1 0 2 1 0 1 2 1 2 2 0 2 0 0 2 0 0 1 1 0 2 0 2 2 2 0 2 1 2 0 1 2 2 1 0 0 1 1 2 0 1 0 0 0 0 0 2 2 1 1 1 1 0 0 2 2 0 0 2 1 0 1 2 1 2 2 0 2 0 2 2 1 0 2 1 2 1 0 1 0 1 1 1 1 2 0 1 2 1 0 1 1 0 2 1 0 0 1 1 0 0 0 1 2 0 2 2 0 0 0 0 0 2 0 2 0 2 0 1 0 2 2 1 1...
output:
8495
result:
ok 1 number(s): "8495"
Test #12:
score: 0
Accepted
time: 0ms
memory: 18000kb
input:
10000 12000 2 0 1 0 1 0 2 2 1 2 2 2 0 0 0 0 2 0 0 1 1 2 1 1 2 2 1 2 0 1 2 2 0 1 1 1 0 0 2 1 0 1 1 0 0 1 1 2 1 0 0 2 1 0 2 1 2 0 0 2 1 1 1 0 0 0 1 0 0 0 0 1 1 2 0 1 2 0 0 2 1 0 2 1 1 1 1 2 0 0 0 0 2 2 2 0 1 0 0 2 1 1 2 1 1 1 2 2 2 1 1 2 0 2 0 1 1 0 2 0 1 0 0 1 2 2 1 2 0 1 2 1 0 1 2 0 2 1 1 0 2 1 1 2 ...
output:
6173
result:
ok 1 number(s): "6173"
Test #13:
score: 0
Accepted
time: 0ms
memory: 15956kb
input:
10000 20000 1 0 0 1 0 1 2 1 1 1 2 1 2 2 1 1 0 1 0 0 0 0 0 0 1 0 2 2 1 1 1 0 1 1 0 1 2 2 1 1 2 0 1 0 0 2 1 2 2 1 1 0 2 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 2 2 1 1 2 0 1 0 1 2 0 2 0 2 2 1 1 1 2 0 2 1 1 0 0 1 1 0 2 1 1 0 0 2 1 1 2 2 2 0 1 1 2 0 0 1 1 1 0 0 1 0 1 1 2 1 0 0 1 0 2 1 2 0 1 2 1 0 1 1 1 1 2 0 1 0 ...
output:
8707
result:
ok 1 number(s): "8707"
Test #14:
score: 0
Accepted
time: 5ms
memory: 18120kb
input:
10000 30000 0 0 2 1 2 2 2 1 2 0 2 0 1 2 0 2 0 1 2 2 2 2 0 0 2 2 2 2 2 2 2 2 2 1 0 1 0 2 2 0 2 2 2 2 2 2 1 2 0 1 1 1 0 0 0 2 2 1 2 0 1 2 0 2 1 2 1 0 2 2 1 0 0 0 2 1 2 0 1 2 2 2 0 0 2 2 1 2 2 0 0 2 0 2 2 2 2 0 2 1 2 0 0 0 0 2 0 1 2 0 2 2 2 0 2 2 2 2 2 0 2 2 2 2 2 0 0 0 0 1 2 2 2 2 0 0 0 2 0 2 2 0 1 0 ...
output:
3998
result:
ok 1 number(s): "3998"
Test #15:
score: 0
Accepted
time: 41ms
memory: 21984kb
input:
250000 249999 1 2 2 0 1 0 1 0 1 1 2 1 1 0 2 0 0 1 1 2 0 2 1 0 1 2 0 2 0 0 0 2 0 2 2 1 2 2 0 0 2 2 2 1 1 1 0 0 2 0 0 0 0 1 2 1 2 0 2 2 2 1 1 2 0 0 0 2 0 2 0 1 2 2 1 1 1 0 1 0 0 2 1 0 1 0 0 0 1 2 0 0 2 1 2 0 0 0 2 1 1 1 1 1 1 0 1 2 0 2 0 2 1 1 1 2 0 0 0 2 0 1 2 0 0 2 2 0 2 1 2 2 0 0 2 0 2 2 0 2 2 0 2 ...
output:
179952
result:
ok 1 number(s): "179952"
Test #16:
score: 0
Accepted
time: 42ms
memory: 22820kb
input:
250000 250000 1 2 2 0 0 1 1 1 2 0 0 0 2 1 2 1 0 1 0 2 2 1 0 1 2 1 0 0 1 2 2 2 1 0 2 1 1 1 0 0 0 1 2 1 0 0 1 0 1 1 2 2 2 2 1 2 1 1 0 1 1 0 1 0 1 1 1 2 2 2 0 0 1 0 0 0 0 2 0 1 1 0 0 0 0 2 1 0 2 2 2 2 1 0 2 2 0 2 0 0 0 2 1 0 2 0 0 1 2 0 2 0 2 0 1 1 2 2 2 2 0 0 2 0 2 1 1 1 1 2 1 2 2 1 1 0 1 1 1 2 2 2 0 ...
output:
160937
result:
ok 1 number(s): "160937"
Test #17:
score: 0
Accepted
time: 46ms
memory: 21384kb
input:
250000 252500 0 1 2 2 2 2 2 2 1 2 0 2 1 2 0 1 1 0 2 2 0 1 2 1 2 1 0 0 1 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 2 0 2 2 2 0 2 1 2 1 2 0 2 2 1 2 2 2 0 1 1 0 0 0 2 1 2 1 0 0 1 1 0 1 1 1 2 2 2 0 0 2 1 0 1 1 1 0 0 1 2 2 0 0 1 1 1 2 2 2 0 1 0 2 2 2 1 0 0 2 0 1 0 0 0 0 0 2 0 2 0 2 1 2 1 0 1 2 1 0 1 0 2 1 1 2 1 ...
output:
67589
result:
ok 1 number(s): "67589"
Test #18:
score: 0
Accepted
time: 38ms
memory: 21404kb
input:
250000 255000 1 1 2 0 2 0 1 2 1 1 1 2 2 1 0 1 1 2 2 2 0 2 0 1 0 0 0 2 0 1 2 1 2 2 2 1 2 2 0 2 1 2 0 0 0 1 1 1 1 2 1 0 1 2 1 1 2 2 1 0 0 1 1 2 0 1 2 0 1 0 1 2 2 0 2 1 2 1 0 1 0 0 2 1 2 0 1 1 2 1 0 2 0 0 1 2 0 1 1 2 0 0 2 2 0 2 1 0 0 1 0 1 2 1 2 2 1 1 2 2 0 1 2 2 2 0 2 1 0 2 0 1 1 0 0 2 1 0 2 0 1 0 2 ...
output:
58903
result:
ok 1 number(s): "58903"
Test #19:
score: 0
Accepted
time: 43ms
memory: 21196kb
input:
250000 257500 0 1 1 1 2 0 2 0 2 0 0 0 0 0 1 1 0 0 1 1 2 0 1 2 2 1 0 0 0 2 0 2 1 1 0 0 2 0 2 2 0 2 2 2 2 2 2 1 2 2 2 0 2 0 0 2 1 0 0 1 0 0 0 1 0 2 2 1 2 2 1 2 1 0 0 0 2 2 0 1 0 2 1 2 1 1 2 0 0 0 1 0 2 1 1 1 2 2 2 1 1 1 1 0 1 0 2 1 2 1 2 1 1 2 2 0 1 2 0 2 1 0 0 0 2 0 1 2 2 0 0 2 2 1 0 2 1 1 0 0 2 0 2 ...
output:
246014
result:
ok 1 number(s): "246014"
Test #20:
score: 0
Accepted
time: 41ms
memory: 22968kb
input:
250000 260000 2 2 0 1 2 0 1 2 2 1 0 2 2 2 0 0 0 0 0 0 1 2 0 2 1 0 2 1 1 2 2 1 2 1 0 1 1 1 0 0 2 2 1 1 0 1 0 0 1 2 2 1 1 2 2 1 0 2 1 0 1 1 2 1 1 0 1 2 0 0 0 0 1 2 0 2 2 2 1 2 2 0 1 1 0 2 1 0 1 1 2 1 1 1 1 1 0 1 0 2 1 0 0 0 1 2 2 1 0 2 0 0 1 0 2 2 2 2 0 2 1 1 0 2 0 1 1 1 1 2 2 0 1 0 2 2 1 0 2 2 0 2 1 ...
output:
9416
result:
ok 1 number(s): "9416"
Test #21:
score: 0
Accepted
time: 52ms
memory: 21300kb
input:
250000 300000 1 0 2 1 1 2 0 2 1 1 2 2 2 0 2 0 0 1 1 1 2 2 1 2 0 1 1 2 1 2 1 0 0 0 1 0 0 2 1 1 1 2 2 1 2 1 0 0 1 2 1 0 0 2 2 2 0 1 2 2 0 1 1 2 0 1 2 0 2 1 1 0 1 2 1 1 0 0 0 1 1 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 1 1 2 1 1 0 0 0 1 2 2 2 1 2 1 0 2 2 2 1 0 0 1 2 1 1 0 0 1 1 1 2 1 1 0 0 1 1 1 1 2 1 1 1 ...
output:
237910
result:
ok 1 number(s): "237910"
Test #22:
score: 0
Accepted
time: 54ms
memory: 21228kb
input:
250000 350000 2 0 2 1 2 0 0 1 0 1 0 2 0 0 0 0 2 2 0 0 0 1 2 1 1 2 0 2 2 0 0 2 0 0 1 1 1 0 0 2 1 2 0 0 0 1 0 1 2 1 1 1 0 2 2 0 0 0 2 0 0 0 2 2 1 2 0 0 1 2 1 2 2 0 1 2 2 2 1 1 2 0 1 2 2 1 2 1 0 0 2 2 1 2 0 2 0 1 1 0 0 0 1 2 2 1 0 2 1 1 2 2 2 1 0 0 0 0 1 0 2 1 2 1 2 0 0 0 2 0 2 0 0 2 1 1 0 1 2 2 0 1 2 ...
output:
28823
result:
ok 1 number(s): "28823"
Test #23:
score: 0
Accepted
time: 61ms
memory: 21656kb
input:
250000 400000 2 1 2 0 0 0 2 1 0 1 2 2 2 0 0 0 0 0 0 1 0 0 1 0 1 1 2 2 2 1 2 2 2 0 2 0 0 0 0 1 0 2 2 1 1 0 0 0 0 1 0 0 1 2 0 2 2 2 1 2 0 2 2 1 2 0 2 2 0 0 1 1 2 0 1 2 1 1 0 1 1 2 0 0 2 1 2 0 0 2 2 0 0 0 0 2 1 0 1 1 2 0 0 0 2 0 1 0 0 0 2 2 0 1 0 1 0 0 2 0 0 1 1 1 2 0 0 1 0 2 2 2 0 0 0 0 0 2 2 0 0 2 1 ...
output:
247227
result:
ok 1 number(s): "247227"
Test #24:
score: 0
Accepted
time: 67ms
memory: 21360kb
input:
250000 450000 1 2 0 0 0 1 0 1 1 2 2 0 0 2 1 1 0 0 0 2 1 2 1 1 0 1 2 0 1 2 0 0 2 1 0 0 0 1 0 0 0 0 2 1 2 2 1 2 0 2 1 2 2 2 1 1 2 0 2 2 1 0 1 0 2 2 1 0 2 2 0 0 0 1 2 2 1 2 1 1 1 2 1 1 0 0 2 1 2 2 0 0 0 0 2 0 2 2 0 2 0 2 1 1 1 0 1 0 1 0 2 0 1 1 0 1 2 1 2 2 1 2 1 2 1 2 2 1 0 1 1 2 1 2 0 1 1 1 1 2 0 0 1 ...
output:
67494
result:
ok 1 number(s): "67494"
Test #25:
score: 0
Accepted
time: 75ms
memory: 21560kb
input:
250000 500000 1 1 0 1 0 1 0 1 2 2 0 0 0 1 0 2 2 2 0 0 2 0 2 1 1 0 2 0 0 0 2 2 2 1 1 0 1 2 0 2 2 1 0 2 2 0 0 2 2 0 0 0 1 0 2 0 1 2 0 1 1 1 1 0 2 0 0 1 1 1 1 2 0 2 2 1 1 1 2 1 2 0 0 0 1 0 0 2 0 2 2 0 0 1 0 1 1 0 1 1 1 0 2 1 1 1 0 0 1 2 1 0 0 0 0 1 0 0 0 0 2 1 2 2 1 1 1 1 0 1 0 0 2 1 1 2 2 0 2 2 0 2 2 ...
output:
118087
result:
ok 1 number(s): "118087"
Test #26:
score: 0
Accepted
time: 78ms
memory: 22904kb
input:
300000 500000 0 2 1 0 1 2 0 0 2 2 0 0 2 0 2 1 2 2 2 2 2 2 2 2 1 1 0 2 1 0 2 1 1 0 0 0 1 2 0 2 0 1 1 2 0 1 1 0 1 1 0 1 0 2 2 1 2 0 0 0 2 0 2 0 1 1 2 2 0 1 2 1 2 2 0 2 1 1 2 2 2 0 2 2 2 1 0 0 0 2 1 0 1 0 2 0 1 1 2 1 1 0 0 2 1 2 2 2 0 2 2 2 1 1 1 2 2 0 0 2 0 2 1 1 2 2 2 1 2 0 1 0 1 2 1 0 2 1 2 2 2 2 1 ...
output:
277224
result:
ok 1 number(s): "277224"
Test #27:
score: 0
Accepted
time: 79ms
memory: 22456kb
input:
400000 500000 0 1 0 1 0 0 0 1 0 1 0 2 1 0 2 2 1 1 1 0 2 1 2 2 1 0 0 1 2 1 1 2 0 2 0 0 1 2 1 1 0 2 2 0 2 0 0 2 0 1 1 2 1 2 2 0 1 2 0 1 0 2 2 1 0 0 0 1 1 2 0 0 2 2 0 0 0 2 0 0 2 1 2 1 1 1 1 2 2 0 1 2 0 2 0 2 1 2 1 2 1 0 0 0 0 0 2 2 1 2 2 0 0 2 1 2 1 2 2 0 1 2 0 1 2 1 2 2 0 2 2 2 2 0 2 2 0 2 1 0 2 1 2 ...
output:
208631
result:
ok 1 number(s): "208631"
Test #28:
score: 0
Accepted
time: 82ms
memory: 23200kb
input:
500000 500000 1 2 0 0 2 1 0 2 1 1 2 1 0 1 1 2 2 2 1 0 1 1 2 2 0 1 1 0 0 0 2 1 2 1 1 1 1 0 2 1 2 2 1 1 2 2 0 0 1 2 1 2 2 2 0 2 0 0 2 2 2 2 0 2 2 2 2 2 0 2 2 0 2 0 0 2 1 0 0 0 0 2 2 1 2 2 1 2 2 0 0 1 2 1 1 2 1 1 2 2 0 1 2 1 1 0 2 1 2 1 1 2 1 1 0 1 2 1 2 1 0 0 0 2 1 2 2 0 0 1 1 0 1 1 1 0 1 1 1 2 2 1 2 ...
output:
302244
result:
ok 1 number(s): "302244"
Test #29:
score: 0
Accepted
time: 0ms
memory: 15936kb
input:
1 0 0
output:
1
result:
ok 1 number(s): "1"
Test #30:
score: 0
Accepted
time: 0ms
memory: 17928kb
input:
100 99 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 0 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 5 99 5 81 5 10 5 98 5 100 5 51 5 30 5 43 5 54 5 46 5 67 5 8 5 17 5 63 5 82 5 35 5 44 5 2 5 94...
output:
56
result:
ok 1 number(s): "56"
Test #31:
score: 0
Accepted
time: 3ms
memory: 15944kb
input:
1000 999 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 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:
984
result:
ok 1 number(s): "984"
Test #32:
score: 0
Accepted
time: 0ms
memory: 17988kb
input:
10000 9999 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 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:
4988
result:
ok 1 number(s): "4988"
Test #33:
score: 0
Accepted
time: 13ms
memory: 18056kb
input:
100000 99999 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 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:
47630
result:
ok 1 number(s): "47630"
Test #34:
score: 0
Accepted
time: 63ms
memory: 20204kb
input:
500000 499999 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 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:
137055
result:
ok 1 number(s): "137055"
Test #35:
score: 0
Accepted
time: 73ms
memory: 21480kb
input:
500000 499999 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 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:
46758
result:
ok 1 number(s): "46758"
Test #36:
score: 0
Accepted
time: 69ms
memory: 20528kb
input:
500000 499999 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 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:
322304
result:
ok 1 number(s): "322304"
Test #37:
score: 0
Accepted
time: 37ms
memory: 22036kb
input:
250000 249999 1 1 0 2 2 1 0 0 1 2 2 0 2 0 2 0 1 0 2 2 2 0 2 0 2 2 0 2 2 0 2 0 0 1 1 1 0 2 1 2 2 2 1 0 0 2 0 1 2 0 2 2 0 2 0 1 0 2 1 0 0 2 0 1 2 2 0 2 1 0 1 2 2 2 1 0 1 0 0 2 1 0 2 2 0 2 2 1 1 0 2 2 1 1 0 2 1 1 2 0 0 2 0 2 0 0 1 1 0 0 2 0 1 1 1 2 2 0 0 1 1 0 2 2 0 2 0 2 2 1 1 0 0 2 2 1 0 2 2 0 2 2 0 ...
output:
180263
result:
ok 1 number(s): "180263"
Test #38:
score: 0
Accepted
time: 41ms
memory: 22836kb
input:
250000 250000 2 1 0 1 2 2 0 0 1 1 1 1 2 0 0 2 1 0 1 0 0 1 2 2 1 0 1 0 1 1 2 0 0 2 2 0 0 0 2 2 1 0 0 0 0 2 0 0 0 1 0 1 2 2 2 1 2 1 2 1 1 2 0 1 0 2 0 2 0 0 2 2 0 2 2 1 2 1 1 1 2 0 2 1 0 0 2 1 2 2 1 1 0 2 0 2 0 1 1 2 2 0 0 2 0 0 2 0 1 1 2 2 1 2 2 2 2 1 0 2 1 0 2 1 2 0 2 2 2 0 1 1 0 0 1 1 2 0 2 0 0 2 2 ...
output:
22413
result:
ok 1 number(s): "22413"
Test #39:
score: 0
Accepted
time: 53ms
memory: 22772kb
input:
250000 400000 1 0 2 0 1 2 0 0 1 2 2 2 1 2 0 0 1 2 0 0 2 0 0 1 1 2 2 2 1 2 0 2 1 0 0 0 1 2 0 0 0 2 0 0 0 1 1 1 1 2 1 2 2 1 0 1 2 0 0 1 2 2 2 0 2 1 0 0 1 2 2 2 2 0 0 1 2 2 0 2 0 2 1 2 1 2 2 0 1 1 0 0 2 2 2 2 0 2 2 1 0 2 0 2 1 2 2 2 1 2 0 1 1 2 2 2 0 2 0 1 2 0 2 2 0 1 2 0 0 0 2 0 0 2 1 2 1 1 1 0 2 2 2 ...
output:
101763
result:
ok 1 number(s): "101763"
Test #40:
score: 0
Accepted
time: 73ms
memory: 21940kb
input:
250000 500000 2 1 0 1 1 1 0 1 1 2 2 0 2 2 1 0 1 1 1 1 0 1 2 2 2 1 1 0 0 0 2 0 0 1 2 0 1 2 0 0 0 0 2 2 1 2 1 2 1 1 1 0 1 0 0 1 0 1 0 0 2 2 2 2 2 2 1 1 0 0 0 0 1 0 1 1 0 0 2 0 0 0 1 1 0 0 0 1 1 2 2 2 0 2 0 2 1 0 0 1 2 1 1 0 0 2 1 2 1 2 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 1 0 2 0 2 1 0 2 1 2 0 1 1 0 2 1 0 0 ...
output:
164561
result:
ok 1 number(s): "164561"
Test #41:
score: 0
Accepted
time: 83ms
memory: 23128kb
input:
500000 499999 2 2 1 0 1 2 0 2 1 0 2 2 2 0 2 1 0 0 1 0 0 0 2 0 0 2 0 1 0 1 0 1 0 1 2 1 0 0 2 0 2 2 2 0 0 2 2 1 2 0 1 0 2 1 0 0 1 2 2 0 2 2 0 0 1 1 1 1 2 2 2 2 2 1 2 1 0 0 1 0 1 2 0 1 1 0 0 0 1 2 1 2 2 0 0 1 2 1 0 0 2 1 0 0 0 2 1 0 1 2 0 0 1 1 1 0 0 1 1 0 2 2 1 1 2 0 0 1 1 2 2 1 1 0 1 2 1 1 2 2 0 0 2 ...
output:
448614
result:
ok 1 number(s): "448614"
Test #42:
score: 0
Accepted
time: 88ms
memory: 23236kb
input:
500000 500000 0 2 2 1 0 2 2 1 2 0 2 2 1 2 2 0 1 2 1 1 0 0 2 0 1 2 1 0 2 1 0 0 1 0 0 2 2 1 2 0 2 2 2 0 0 1 2 2 0 0 1 1 2 0 2 2 1 1 0 2 2 2 2 2 2 2 1 0 2 2 2 0 1 2 2 1 0 1 0 1 0 1 1 0 0 0 2 1 0 2 1 0 1 1 0 2 0 1 0 1 1 1 1 1 2 1 1 1 2 0 2 2 1 2 2 0 2 2 2 0 2 1 0 0 1 0 1 1 2 0 1 2 1 1 2 0 1 1 0 2 1 2 2 ...
output:
41021
result:
ok 1 number(s): "41021"
Test #43:
score: 0
Accepted
time: 42ms
memory: 21300kb
input:
250000 249999 0 2 1 1 2 1 2 2 0 2 1 0 0 0 1 2 1 1 1 0 0 0 0 0 1 2 0 2 2 0 1 0 0 2 2 1 1 1 2 1 1 2 2 2 0 0 1 2 2 2 0 1 1 0 1 2 1 0 0 1 1 2 1 2 0 2 2 2 0 1 2 1 0 1 2 1 0 2 2 2 0 1 1 1 1 1 2 1 2 1 1 1 2 2 1 0 0 1 2 2 0 2 2 0 1 1 2 2 1 0 0 0 2 0 0 0 2 0 2 2 1 0 1 0 2 0 0 1 2 1 0 2 1 0 2 0 1 2 2 0 0 2 1 ...
output:
149349
result:
ok 1 number(s): "149349"
Test #44:
score: 0
Accepted
time: 33ms
memory: 22652kb
input:
250000 250000 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 0 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 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 1 2 2 2 2 2 ...
output:
96370
result:
ok 1 number(s): "96370"
Test #45:
score: 0
Accepted
time: 56ms
memory: 22316kb
input:
250000 400000 2 2 2 2 0 2 2 0 0 0 2 2 0 2 2 2 2 2 0 1 2 2 1 2 0 1 2 2 1 1 2 0 2 1 2 2 2 1 0 2 0 2 2 2 0 1 2 2 0 2 2 0 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 0 1 2 1 2 2 1 2 2 2 1 2 0 0 1 1 2 0 2 1 2 0 2 1 2 2 2 2 2 0 1 0 2 2 1 0 2 1 0 2 1 2 2 1 2 2 2 0 2 1 2 2 0 0 0 2 1 2 1 2 0 2 1 2 2 ...
output:
66931
result:
ok 1 number(s): "66931"
Test #46:
score: 0
Accepted
time: 72ms
memory: 22676kb
input:
250000 500000 1 2 2 2 2 0 2 1 0 2 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 0 1 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 1 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 0 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 ...
output:
185953
result:
ok 1 number(s): "185953"
Test #47:
score: 0
Accepted
time: 80ms
memory: 23192kb
input:
500000 499999 2 2 2 0 0 2 0 0 2 2 2 0 2 2 0 2 2 1 1 2 1 0 1 1 1 1 0 2 2 1 1 0 0 2 1 0 1 0 1 1 1 0 0 1 0 2 2 0 0 1 2 0 2 2 1 0 0 0 0 2 2 0 0 0 2 0 0 1 0 0 0 2 0 2 0 2 0 0 1 0 0 0 2 1 0 1 0 1 1 2 0 0 2 1 0 1 0 2 0 1 0 1 2 1 1 0 1 0 1 2 1 2 0 0 0 1 0 0 0 2 1 0 2 0 1 0 2 0 2 0 2 1 2 0 1 0 0 1 2 0 0 1 1 ...
output:
265842
result:
ok 1 number(s): "265842"
Test #48:
score: 0
Accepted
time: 65ms
memory: 23188kb
input:
500000 500000 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 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 0 2 0 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:
263153
result:
ok 1 number(s): "263153"