QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#32173#27. The Battle for Wesnothflower#40 179ms394240kbC++141.3kb2022-05-18 00:21:052022-05-18 14:19:53

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 0ms
memory: 3820kb

input:

1 30
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1

result:

ok Output is correct

Test #2:

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

input:

2 80
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 2
2 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1

result:

ok Output is correct

Test #3:

score: 0
Accepted
time: 3ms
memory: 3720kb

input:

3 40
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 3
3 1
3 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1

result:

ok Output is correct

Test #4:

score: 0
Accepted
time: 1ms
memory: 3772kb

input:

4 50
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 4
2 2
4 1
4 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1

result:

ok Output is correct

Test #5:

score: 0
Accepted
time: 3ms
memory: 3696kb

input:

5 20
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 5
2 2
5 1
5 1
5 1
1 1
1 1
1 1
1 1
1 1
1 1

result:

ok Output is correct

Test #6:

score: 0
Accepted
time: 2ms
memory: 3696kb

input:

6 70
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 6
1 6
1 6
2 3
6 1
6 1
1 1
1 1
1 1
1 1
1 1

result:

ok Output is correct

Test #7:

score: 0
Accepted
time: 2ms
memory: 3700kb

input:

7 40
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 7
1 7
3 2
7 1
7 1
7 1
7 1
1 1
1 1
1 1
1 1

result:

ok Output is correct

Test #8:

score: 0
Accepted
time: 3ms
memory: 3700kb

input:

8 51
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 8
1 8
1 8
4 2
8 1
8 1
8 1
8 1
1 1
1 1
1 1

result:

ok Output is correct

Test #9:

score: 0
Accepted
time: 3ms
memory: 3752kb

input:

9 34
11
1 2 3 4 5 6 7 8 9 10 11

output:

1 9
1 9
3 3
4 2
9 1
9 1
9 1
9 1
9 1
1 1
1 1

result:

ok Output is correct

Test #10:

score: 0
Accepted
time: 22ms
memory: 3692kb

input:

10 1
100000
884878 751455 214308 292349 518777 621987 627497 913888 330915 676887 411803 309107 45478 905784 10996 847709 451664 824477 723026 472185 574143 254312 151912 964437 797786 350658 222631 852906 820189 19164 399894 42571 182177 533276 804359 273895 945080 658737 313612 236593 348856 74493...

output:

1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok Output is correct

Subtask #2:

score: 10
Accepted

Dependency #1:

100%
Accepted

Test #11:

score: 10
Accepted
time: 3ms
memory: 3860kb

input:

100 51
100
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

output:

1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
1 100
50 2
50 2
50 2
3 3...

result:

ok Output is correct

Test #12:

score: 0
Accepted
time: 2ms
memory: 3884kb

input:

90 40
90
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

output:

1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
1 90
18 5
18 5
45 2
45 2
45 2
45 2
45 2
45 2
45 2
45 2
45 2
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
90 1
...

result:

ok Output is correct

Test #13:

score: 0
Accepted
time: 3ms
memory: 3812kb

input:

95 90
95
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

output:

3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
3 31
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
2 47
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
1 95
...

result:

ok Output is correct

Test #14:

score: 0
Accepted
time: 3ms
memory: 3824kb

input:

85 3
85
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85

output:

1 85
1 85
3 28
4 21
5 17
6 14
7 12
8 10
9 9
10 8
12 7
12 7
14 6
14 6
17 5
17 5
17 5
21 4
21 4
21 4
21 4
28 3
28 3
28 3
28 3
28 3
28 3
28 3
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
85 1
8...

result:

ok Output is correct

Test #15:

score: 0
Accepted
time: 3ms
memory: 3800kb

input:

84 35
84
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

output:

1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
1 84
28 3
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
42 2
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
84 1
...

result:

ok Output is correct

Subtask #3:

score: 20
Accepted

Dependency #2:

100%
Accepted

Test #16:

score: 20
Accepted
time: 10ms
memory: 19108kb

input:

1000 51
1000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99...

output:

5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
5 200
...

result:

ok Output is correct

Test #17:

score: 0
Accepted
time: 6ms
memory: 18984kb

input:

999 40
999
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1...

output:

8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
...

result:

ok Output is correct

Test #18:

score: 0
Accepted
time: 8ms
memory: 18860kb

input:

998 36
998
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1...

output:

7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
6 166
...

result:

ok Output is correct

Test #19:

score: 0
Accepted
time: 12ms
memory: 18780kb

input:

997 33
997
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1...

output:

11 90
11 90
11 90
11 90
11 90
11 90
11 90
11 90
11 90
11 90
11 90
10 99
10 99
10 99
10 99
10 99
10 99
10 99
10 99
10 99
9 110
9 110
9 110
9 110
9 110
9 110
9 110
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
7 142
...

result:

ok Output is correct

Test #20:

score: 0
Accepted
time: 8ms
memory: 18852kb

input:

996 17
996
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1...

output:

5 199
5 199
5 199
5 199
5 199
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
4 249
3 332
3 332
3 332
3 332
3 332
3 332
3 332
3 332
3 332
3 332
3 332
3 332
3 332
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
2 498
...

result:

ok Output is correct

Test #21:

score: 0
Accepted
time: 13ms
memory: 18848kb

input:

995 40
995
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 1...

output:

8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
8 124
...

result:

ok Output is correct

Subtask #4:

score: 0
Wrong Answer

Test #22:

score: 0
Wrong Answer
time: 179ms
memory: 394240kb

input:

100000 40
1
39935

output:

20000 5

result:

wrong answer Output isn't correct

Subtask #5:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%