QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#122496#6543. Visiting FriendHuangHanShengWA 4ms47536kbC++143.2kb2023-07-10 16:50:552023-07-10 16:50:59

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 45648kb

input:

1
5 5
1 2
1 3
2 4
4 5
2 5
5
1 2
1 4
2 3
2 5
3 5

output:

2
4
3
3
5

result:

ok 5 number(s): "2 4 3 3 5"

Test #2:

score: 0
Accepted
time: 4ms
memory: 46072kb

input:

100
10 25
7 4
1 10
7 2
3 4
5 7
9 10
10 5
8 10
6 7
9 1
4 2
2 6
8 5
6 9
5 9
7 1
2 1
4 1
9 8
8 3
1 8
4 8
2 10
3 1
3 6
100
6 4
10 8
5 4
7 8
3 10
5 9
6 9
6 8
2 10
10 9
6 9
1 8
3 6
10 9
1 4
10 8
1 6
5 1
5 10
9 1
3 5
8 7
3 2
3 9
2 9
9 4
2 10
8 4
6 2
2 1
7 4
3 6
6 5
10 6
1 4
5 1
7 10
7 1
8 5
3 8
7 5
3 9
5 4...

output:

10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
...

result:

ok 10000 numbers

Test #3:

score: -100
Wrong Answer
time: 1ms
memory: 47536kb

input:

100
10 10
5 10
6 4
2 9
9 8
9 10
1 5
7 2
7 4
9 3
6 5
100
4 7
4 5
3 10
7 10
4 10
6 7
3 2
5 2
1 2
10 8
3 1
10 5
6 1
2 4
5 9
6 7
1 8
5 6
7 9
9 8
9 3
6 1
9 10
4 10
1 4
2 7
8 9
9 4
7 9
6 7
9 1
9 6
9 1
4 3
9 6
2 3
9 5
6 7
7 8
8 1
4 8
9 6
8 2
4 5
3 5
4 8
5 10
6 4
8 6
8 7
7 2
3 4
4 8
1 2
3 2
2 10
4 10
3 6
8 ...

output:

10
9
10
10
10
10
10
9
10
10
10
9
10
10
7
10
10
9
8
2
2
10
8
10
10
10
2
8
8
10
8
8
8
10
8
10
7
10
10
10
10
8
10
9
9
10
9
10
10
10
10
10
10
10
10
10
10
10
9
2
8
10
10
10
10
10
10
2
10
10
10
9
8
9
10
8
8
10
10
10
10
10
10
10
10
2
9
9
9
8
9
8
10
10
2
9
10
10
9
10
9
6
7
9
9
9
10
9
5
7
5
10
9
9
9
10
10
6
...

result:

wrong answer 1809th numbers differ - expected: '9', found: '10'