QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#312753#4831. Eager Sortingdaoquanglinh20070 6ms3828kbC++201.2kb2024-01-24 11:24:022024-01-24 11:24:02

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3612kb

Interactor to First Run

5
0
1
1
0
0
0
1
0
-1

First Run to Interactor

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

Interactor to Second Run

5
0
0
0
1
0
0
0
0
0
0

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #2:

score: 100
Accepted
time: 1ms
memory: 3532kb

Interactor to First Run

1

First Run to Interactor

-1 -1

Interactor to Second Run

1

Second Run to Interactor

-1 -1

Manager to Checker

OK
good job!

result:

ok OK

Test #3:

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

Interactor to First Run

2
0

First Run to Interactor

1 2
-1 -1

Interactor to Second Run

2
0

Second Run to Interactor

1 2
-1 -1

Manager to Checker

OK
good job!

result:

ok OK

Test #4:

score: 100
Accepted
time: 1ms
memory: 3616kb

Interactor to First Run

2
1
0

First Run to Interactor

1 2
1 2
-1 -1

Interactor to Second Run

2
0
-1

Second Run to Interactor

1 2
-1 -1

Manager to Checker

OK
good job!

result:

ok OK

Test #5:

score: 100
Accepted
time: 1ms
memory: 3620kb

Interactor to First Run

9
1
0
0
1
0
0
0
0
1
0
1
0
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0

First Run to Interactor

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

Interactor to Second Run

9
0
0
0
0
0
0
0
0

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #6:

score: 100
Accepted
time: 1ms
memory: 3828kb

Interactor to First Run

9
0
1
1
0
0
0
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
1
0
1
1
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0

First Run to Interactor

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

Interactor to Second Run

9
0
0
0
0
0
0
0
0

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #7:

score: 100
Accepted
time: 1ms
memory: 3596kb

Interactor to First Run

6
1
0
0
0
1
0
0
0
1
0
1
1
0
0
0
1
0
1
0
0
0
0
1
0
1
1
0

First Run to Interactor

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

Interactor to Second Run

6
0
0
0
0
0

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #8:

score: 100
Accepted
time: 2ms
memory: 3784kb

Interactor to First Run

20
1
0
1
0
0
0
0
1
0
1
1
0
0
0
1
0
0
1
0
1
0
1
0
1
1
0
0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
1
1
0
0
1
1
0
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
0
1
0
1
1
0
0
0
1
0
0
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
0
1
0
0
0
1
0
0
0
0
0
0...

First Run to Interactor

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

Interactor to Second Run

20
0
0
0
0
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0...

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #9:

score: 100
Accepted
time: 1ms
memory: 3616kb

Interactor to First Run

15
0
0
0
0
0
1
0
0
0
0
1
0
1
0
1
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
1
1
0
0
0
1
0
1
0
1
1
0
0
0
0
1
0
1
0
0
0
0
1
1
1
0
1
0
0
1
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
1
1
0
1
0

First Run to Interactor

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

Interactor to Second Run

15
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #10:

score: 100
Accepted
time: 1ms
memory: 3828kb

Interactor to First Run

20
0
1
1
0
0
0
1
0
1
0
1
0
0
0
1
0
0
0
1
0
1
0
1
1
0
0
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
0
1
0
1
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
1
0
1
1
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
0
1
0...

First Run to Interactor

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

Interactor to Second Run

20
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #11:

score: 100
Accepted
time: 2ms
memory: 3600kb

Interactor to First Run

27
1
0
0
1
0
0
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
1
0
1
0
0
1
0
1
1
0
1
0
0
1
0
1
0
1
0
0
0
1
0
1
0
1
0
0
0
0
1
0
0
0
0
0
0
1
0
-1

First Run to Interactor

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

Interactor to Second Run

27
0
0
0
0
1
1
0
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
1
0
0
0
0
1
1
0
0
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
1
0
1
1
0
0
0
1
0
1
0
0
0
0
1
0
1
1
0
1
0
0
0
0
1
1
0
0...

Second Run to Interactor

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

Manager to Checker

OK
good job!

result:

ok OK

Test #12:

score: 100
Accepted
time: 1ms
memory: 3752kb

Interactor to First Run

30
0
1
0
1
0
1
0
0
0
0
1
0
1
0
1
0
0
0
1
0
1
0
1
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
1
0
1
0
0
1
0
1
1
0
1
0
0
1
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
1
1
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
0
1
0
1
0
1
1...

First Run to Interactor

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

Interactor to Second Run

30
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Second Run to Interactor

1 2
3 4
2 3
5 6
7 8
6 7
4 5
9 10
11 12
10 11
13 14
14 15
12 13
8 9
16 17
18 19
17 18
20 21
22 23
21 22
19 20
24 25
26 27
25 26
28 29
29 30
27 28
23 24
15 16
-1 -1

Manager to Checker

OK
good job!

result:

ok OK

Test #13:

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

Interactor to First Run

39
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
1
1
0
0
0
0
1
0
0
1
0
0
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
1
1
1
0
1
1
0
1
0
0
1
0
0
0
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
1
0
1
1
0
0
0
1
0
0
0
1
0
1
0
0
1
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0...

First Run to Interactor

1 2
2 3
1 2
1 3
2 3
4 5
3 4
1 2
2 3
4 5
4 5
1 4
2 4
3 4
6 7
7 8
6 7
6 7
6 8
7 8
9 10
8 9
6 7
7 8
9 10
9 10
6 9
7 9
8 9
5 6
1 2
2 3
4 5
4 5
3 4
1 2
2 3
1 2
1 2
1 3
2 3
4 5
1 4
2 4
3 4
6 7
6 7
7 8
6 7
6 8
7 8
9 10
8 9
6 7
7 8
9 10
9 10
6 9
7 9
8 9
1 6
2 6
3 6
6 7
4 6
7 8
5 7
6 8
8 9
7 8
8 9
11 12
12 1...

Interactor to Second Run

39
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-1

Second Run to Interactor

1 2
2 3
4 5
3 4
6 7
7 8
9 10
8 9
5 6
11 12
12 13
14 15
13 14
16 17
17 18
19 20
18 19
15 16
10 11
21 22
22 23
24 25
23 24
26 27
27 28
29 30
28 29
25 26
31 32

Manager to Checker

OK
good job!

result:

ok OK

Test #14:

score: 0
Wrong Answer
time: 6ms
memory: 3544kb

Interactor to First Run

70
0
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
1
1
1
0
1
0
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
1
0
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
1
0
1
0
1
1
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
-1

First Run to Interactor

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

Interactor to Second Run

70
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
0
1
0
0
0
0
1
0
1
0
0
0
1
0
0
0
0
0
0
1
1
0
1
0
0
0
1
0
0
1...

Second Run to Interactor

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

Manager to Checker

WA
array is not sorted!

result:

wrong answer WA