QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#405831#3307. Query on a Tree 17monstersqwqWA 4ms16868kbC++144.9kb2024-05-06 14:20:012024-05-06 14:20:01

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 16644kb

input:

7
1 6
1 7
7 3
3 2
7 5
5 4
4
1 2
1 4
1 6
2 6 7

output:

2
7
7
1

result:

ok 4 lines

Test #2:

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

input:

15
1 2
1 3
2 4
3 7
6 2
3 8
4 9
2 5
5 11
7 13
10 4
11 15
12 5
14 7
11
2 6 11
1 6
2 10 9
1 9
2 2 6
1 4
2 7 6
1 2
2 8 13
1 10
2 8 15

output:

2
2
2
2
2
2
2
2
2
2
2

result:

ok 11 lines

Test #3:

score: 0
Accepted
time: 0ms
memory: 15392kb

input:

2
1 2
1
1 1

output:

1

result:

ok single line: '1'

Test #4:

score: 0
Accepted
time: 0ms
memory: 16868kb

input:

2
1 2
1
2 1 2

output:

1

result:

ok single line: '1'

Test #5:

score: -100
Wrong Answer
time: 4ms
memory: 15296kb

input:

100
1 2
58 2
2 87
63 87
65 63
65 19
6 87
58 21
87 8
87 74
91 6
95 65
2 61
87 59
3 61
37 87
67 87
23 2
63 9
87 46
40 67
70 2
12 58
46 75
75 36
28 3
12 33
72 87
39 6
75 52
85 70
1 76
26 40
47 28
2 49
41 65
66 28
51 37
15 47
86 51
8 60
97 19
48 58
72 90
33 83
97 54
36 5
23 14
78 52
90 7
99 2
48 82
48 6...

output:

72
3
3
87
87
2
2
2
2
87
87
87
87
87
2
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
87
8...

result:

wrong answer 22nd lines differ - expected: '2', found: '87'