QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#173254#7178. Bishopsucup-team646#WA 22ms6832kbC++232.8kb2023-09-09 22:43:472023-09-09 22:43:47

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 5

output:

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

result:

ok n: 2, m: 5, bishops: 6

Test #2:

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

input:

5 5

output:

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

result:

ok n: 5, m: 5, bishops: 8

Test #3:

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

input:

100000 100000

output:

199998
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
11 1
12 1
13 1
14 1
15 1
16 1
17 1
18 1
19 1
20 1
21 1
22 1
23 1
24 1
25 1
26 1
27 1
28 1
29 1
30 1
31 1
32 1
33 1
34 1
35 1
36 1
37 1
38 1
39 1
40 1
41 1
42 1
43 1
44 1
45 1
46 1
47 1
48 1
49 1
50 1
51 1
52 1
53 1
54 1
55 1
56 1
57 1
58 1
59 1
60 1
61...

result:

ok n: 100000, m: 100000, bishops: 199998

Test #4:

score: 0
Accepted
time: 16ms
memory: 5260kb

input:

100000 99999

output:

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

result:

ok n: 100000, m: 99999, bishops: 199998

Test #5:

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

input:

100000 50000

output:

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

result:

ok n: 100000, m: 50000, bishops: 149998

Test #6:

score: 0
Accepted
time: 11ms
memory: 4352kb

input:

1 100000

output:

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

result:

ok n: 1, m: 100000, bishops: 100000

Test #7:

score: 0
Accepted
time: 16ms
memory: 5396kb

input:

34535 99889

output:

134423
1 34536
34535 34536
1 34537
34535 34537
1 34538
34535 34538
1 34539
34535 34539
1 34540
34535 34540
1 34541
34535 34541
1 34542
34535 34542
1 34543
34535 34543
1 34544
34535 34544
1 34545
34535 34545
1 34546
34535 34546
1 34547
34535 34547
1 34548
34535 34548
1 34549
34535 34549
1 34550
34535...

result:

ok n: 34535, m: 99889, bishops: 134423

Test #8:

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

input:

12231 97889

output:

110119
6110 48938
6110 48952
6111 48938
6111 48952
6112 48938
6112 48952
6113 48938
6113 48952
6114 48938
6114 48952
6115 48938
6115 48952
6116 48938
6116 48952
6117 48938
6117 48952
6118 48938
6118 48952
6119 48938
6119 48952
6120 48938
6120 48952
6121 48938
6121 48952
6122 48938
6122 48952
6116 48...

result:

ok n: 12231, m: 97889, bishops: 110119

Test #9:

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

input:

10000 100000

output:

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

result:

ok n: 10000, m: 100000, bishops: 109998

Test #10:

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

input:

13 99999

output:

100011
7 49999
7 50000
7 50001
4 49999
10 49999
4 50000
10 50000
4 50001
10 50001
1 49999
13 49999
1 50000
13 50000
1 50001
13 50001
1 49986
1 50014
2 49986
2 50014
3 49986
3 50014
4 49986
4 50014
5 49986
5 50014
6 49986
6 50014
7 49986
7 50014
8 49986
8 50014
9 49986
9 50014
10 49986
10 50014
11 49...

result:

ok n: 13, m: 99999, bishops: 100011

Test #11:

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

input:

21 99999

output:

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

result:

ok n: 21, m: 99999, bishops: 100019

Test #12:

score: 0
Accepted
time: 17ms
memory: 6832kb

input:

49999 100000

output:

149998
24999 50000
25001 50000
24999 50001
25001 50001
24997 50000
25003 50000
24997 50001
25003 50001
24995 50000
25005 50000
24995 50001
25005 50001
24993 50000
25007 50000
24993 50001
25007 50001
24991 50000
25009 50000
24991 50001
25009 50001
24989 50000
25011 50000
24989 50001
25011 50001
24987...

result:

ok n: 49999, m: 100000, bishops: 149998

Test #13:

score: -100
Wrong Answer
time: 10ms
memory: 5260kb

input:

33333 99999

output:

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

result:

wrong answer Participant's answer is not optimal (133330 < 133331)