QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#284086#7682. Redundant Towersucup-team1376WA 90ms54032kbC++176.2kb2023-12-16 08:17:302023-12-16 08:17:30

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 15ms
memory: 53620kb

input:

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

output:

4
3
2
2
2
3

result:

ok 6 numbers

Test #2:

score: 0
Accepted
time: 58ms
memory: 53660kb

input:

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

output:

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

result:

ok 100000 numbers

Test #3:

score: 0
Accepted
time: 70ms
memory: 54032kb

input:

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

output:

18
19
18
18
19
18
19
18
17
16
15
16
15
15
15
14
13
14
15
14
14
13
12
13
12
11
12
11
11
12
13
12
11
12
13
12
11
10
11
10
9
10
9
8
9
10
9
8
7
6
7
8
9
8
9
8
7
8
9
10
9
8
7
8
7
6
7
6
7
8
7
8
7
6
5
6
7
8
9
8
7
8
9
8
9
8
9
9
10
11
10
9
8
8
9
10
9
8
9
8
9
8
9
10
9
10
11
12
11
10
11
10
11
10
9
10
11
10
9
10...

result:

ok 100000 numbers

Test #4:

score: 0
Accepted
time: 77ms
memory: 53404kb

input:

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

output:

14
13
13
12
11
10
11
11
11
11
12
11
11
12
12
11
12
11
11
10
11
12
11
12
12
11
10
9
10
9
8
7
8
9
8
9
10
10
9
10
10
9
10
11
11
10
9
8
9
9
8
9
9
10
9
9
10
10
9
8
9
8
10
10
10
11
12
12
11
10
11
10
9
10
11
10
9
8
9
8
9
10
10
11
10
9
8
9
9
10
11
10
11
10
9
8
9
8
9
8
7
6
5
6
5
6
7
8
9
10
9
10
11
10
9
10
11...

result:

ok 100000 numbers

Test #5:

score: 0
Accepted
time: 90ms
memory: 53344kb

input:

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

output:

18
19
18
16
16
16
15
14
13
12
12
11
12
12
12
14
13
12
11
12
13
12
13
12
13
14
13
12
13
12
11
10
9
10
11
12
11
10
11
12
11
12
11
10
11
10
9
8
9
10
11
10
9
9
9
10
11
11
12
11
10
9
8
9
9
8
7
7
8
8
7
7
8
7
7
8
9
8
9
10
9
10
11
10
10
9
10
12
13
12
11
12
13
12
13
12
13
14
13
12
13
12
11
10
11
10
11
10
9
8...

result:

ok 100000 numbers

Test #6:

score: -100
Wrong Answer
time: 36ms
memory: 53816kb

input:

50 2
29 14
34 42
4 15
7 8
16 5
19 31
3 32
44 50
22 35
39 26
1 16
2 29
5 48
40 21
35 2
8 18
14 22
38 17
21 13
37 44
48 23
12 19
46 43
28 34
9 38
10 37
49 25
42 41
23 3
50 4
43 1
24 40
6 36
17 46
47 20
31 7
27 24
41 9
25 10
13 47
18 33
32 6
20 27
11 12
26 28
36 30
33 39
15 11
30 49
45 45
100000
1
48
6...

output:

49
48
49
50
51
50
49
48
49
50
51
50
49
48
47
48
49
48
49
50
51
52
53
52
51
52
51
52
53
52
51
50
49
50
51
50
49
50
51
50
49
48
49
50
51
50
51
52
53
52
51
52
53
52
51
52
51
52
53
52
53
52
53
54
55
54
55
56
55
56
57
56
57
58
59
60
61
62
63
64
63
64
65
66
65
64
65
64
63
64
63
62
63
64
63
64
65
66
67
68
...

result:

wrong answer 2nd numbers differ - expected: '50', found: '48'