UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#99446#1427. 叶子的染色zsq2591004ms1620kbC++1.5kb2020-02-23 13:51:122020-02-23 13:51:14

answer


详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 10
Accepted
time: 0ms
memory: 1268kb

input:

10 5
0
0
1
0
1
3 10
2 7
4 9
1 8
5 6
6 9
7 8
6 10
7 10

output:

3

result:

ok single line: '3'

Test #2:

score: 10
Accepted
time: 0ms
memory: 1620kb

input:

10000 4996
1
1
1
0
1
1
0
1
0
1
0
1
0
0
1
1
0
1
1
0
0
0
0
1
0
1
1
1
0
1
0
0
0
1
0
0
0
0
1
0
0
0
1
1
0...

output:

1778

result:

ok single line: '1778'

Test #3:

score: 10
Accepted
time: 0ms
memory: 1272kb

input:

50 23
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
12 44
14 43
17 31
7 36
16 49
21 40
39 43
9 46
1 ...

output:

5

result:

ok single line: '5'

Test #4:

score: 10
Accepted
time: 0ms
memory: 1272kb

input:

100 50
0
0
0
1
0
0
0
0
0
1
0
1
0
0
1
0
1
1
1
0
0
0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
1
0
0
0
0
1
0
0
0
1
0...

output:

16

result:

ok single line: '16'

Test #5:

score: 10
Accepted
time: 0ms
memory: 1272kb

input:

200 98
1
0
1
0
1
0
1
1
1
1
0
0
1
1
1
1
0
1
0
1
0
1
0
0
0
1
1
1
1
0
0
1
0
1
0
0
1
1
1
0
1
0
1
1
1
1
1...

output:

33

result:

ok single line: '33'

Test #6:

score: 10
Accepted
time: 0ms
memory: 1280kb

input:

400 197
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
0
1
...

output:

38

result:

ok single line: '38'

Test #7:

score: 10
Accepted
time: 0ms
memory: 1308kb

input:

1000 498
1
0
1
0
1
0
0
1
0
1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
0
1
1
0
1
1
1
0...

output:

158

result:

ok single line: '158'

Test #8:

score: 10
Accepted
time: 2ms
memory: 1420kb

input:

4000 2044
1
0
1
1
1
0
1
0
1
1
1
1
1
0
0
1
1
0
0
0
1
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
0
1
1
0
1
1
1
0
1
...

output:

732

result:

ok single line: '732'

Test #9:

score: 10
Accepted
time: 0ms
memory: 1568kb

input:

8000 4004
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
...

output:

741

result:

ok single line: '741'

Test #10:

score: 10
Accepted
time: 2ms
memory: 1620kb

input:

10000 5021
0
0
1
1
1
1
1
1
1
0
0
1
0
1
0
1
0
1
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0...

output:

1604

result:

ok single line: '1604'