UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#118943#1393. 原始生物Body1008ms11404kbC++1.3kb2020-09-12 17:45:322020-09-12 17:45:34

answer


详细

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

Test #1:

score: 11
Accepted
time: 0ms
memory: 5264kb

input:

12
2 3
3 9
9 6
8 5
5 7
7 6
4 5
5 1
1 4
4 2
2 8
8 6

output:

15

result:

ok single line: '15'

Test #2:

score: 11
Accepted
time: 1ms
memory: 5268kb

input:

2
1 2
2 1

output:

3

result:

ok single line: '3'

Test #3:

score: 11
Accepted
time: 0ms
memory: 5268kb

input:

4
1 2
2 1
3 4
4 3

output:

6

result:

ok single line: '6'

Test #4:

score: 11
Accepted
time: 0ms
memory: 5268kb

input:

24
2 3
3 9
9 6
8 5
5 7
7 6
4 5
5 1
1 4
4 2
2 8
8 6
12 13
13 19
19 16
18 15
15 17
17 16
14 15
15 11
1...

output:

30

result:

ok single line: '30'

Test #5:

score: 11
Accepted
time: 0ms
memory: 7312kb

input:

382
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22...

output:

677

result:

ok single line: '677'

Test #6:

score: 11
Accepted
time: 0ms
memory: 11396kb

input:

67
1 4
2 1
3 10
4 2
5 16
6 3
7 22
8 4
9 28
10 5
11 34
12 6
13 40
14 7
15 46
16 8
17 52
18 9
19 58
20...

output:

83

result:

ok single line: '83'

Test #7:

score: 11
Accepted
time: 0ms
memory: 11400kb

input:

1932
1 3
1 5
1 7
1 9
1 11
1 13
1 15
1 17
1 19
1 21
1 23
1 25
1 27
1 29
1 31
1 33
1 35
1 37
1 39
1 41...

output:

3297

result:

ok single line: '3297'

Test #8:

score: 11
Accepted
time: 0ms
memory: 11404kb

input:

9987
999 1000
1000 999
1 2
1 47
1 71
1 222
1 275
1 301
1 392
1 579
1 730
1 942
1 997
2 11
2 20
2 25
...

output:

11677

result:

ok single line: '11677'

Test #9:

score: 11
Accepted
time: 7ms
memory: 11404kb

input:

49703
999 1000
1000 999
1 2
1 3
1 41
1 45
1 47
1 71
1 176
1 220
1 222
1 260
1 270
1 275
1 291
1 295
...

output:

53635

result:

ok single line: '53635'