QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#511824#5526. Jewel of Data Structure ProblemsZhangYiDeWA 35ms9916kbC++202.2kb2024-08-10 11:41:152024-08-10 11:41:16

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

-1
5
4
5
3
5

result:

ok 6 numbers

Test #2:

score: -100
Wrong Answer
time: 35ms
memory: 9916kb

input:

2 200000
1 2
2 1
2 1
2 1
1 2
1 2
2 1
1 2
2 1
2 1
1 2
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
1 2
1 2
2 1
1 2
1 2
1 2
1 2
2 1
1 2
1 2
1 2
2 1
2 1
1 2
2 1
2 1
2 1
2 1
1 2
1 2
2 1
2 1
1 2
2 1
1 2
1 2
2 1
1 2
1 2
2 1
2 1
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
2 1
1 2
2 1
1 2
1 2
2 1
1 2
2 1
1 2
2 1
2 1
2 1
2 1...

output:

2
-1
2
0
2
-1
2
0
2
-1
2
-1
2
-1
2
-1
2
0
2
-1
2
0
2
0
2
0
2
-1
2
-1
2
-1
2
0
2
0
2
-1
2
0
2
-1
2
0
2
-1
2
-1
2
-1
2
-1
2
-1
2
0
2
0
2
-1
2
0
2
0
2
-1
2
0
2
0
2
0
2
0
2
-1
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
0
2
-1
2
-1
2
0
2
0
2
0
2
...

result:

wrong answer 4th numbers differ - expected: '-1', found: '0'