QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#170716#7178. Bishopsucup-team1089#AC ✓45ms11108kbC++172.2kb2023-09-09 15:49:142023-09-09 15:50:11

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 5

output:

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

result:

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

Test #2:

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

input:

5 5

output:

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

result:

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

Test #3:

score: 0
Accepted
time: 25ms
memory: 5164kb

input:

100000 100000

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: 100000, bishops: 199998

Test #4:

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

input:

100000 99999

output:

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

result:

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

Test #5:

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

input:

100000 50000

output:

149998
100000 1
99999 1
100000 3
99999 3
100000 5
99999 5
100000 7
99999 7
100000 9
99999 9
100000 11
99999 11
100000 13
99999 13
100000 15
99999 15
100000 17
99999 17
100000 19
99999 19
100000 21
99999 21
100000 23
99999 23
100000 25
99999 25
100000 27
99999 27
100000 29
99999 29
100000 31
99999 31...

result:

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

Test #6:

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

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: 20ms
memory: 6048kb

input:

34535 99889

output:

134423
1 99889
1 99888
3 99889
3 99888
5 99889
5 99888
7 99889
7 99888
9 99889
9 99888
11 99889
11 99888
13 99889
13 99888
15 99889
15 99888
17 99889
17 99888
19 99889
19 99888
21 99889
21 99888
23 99889
23 99888
25 99889
25 99888
27 99889
27 99888
29 99889
29 99888
31 99889
31 99888
33 99889
33 998...

result:

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

Test #8:

score: 0
Accepted
time: 42ms
memory: 10740kb

input:

12231 97889

output:

110119
1 97889
1 97888
3 97889
3 97888
5 97889
5 97888
7 97889
7 97888
9 97889
9 97888
11 97889
11 97888
13 97889
13 97888
15 97889
15 97888
17 97889
17 97888
19 97889
19 97888
21 97889
21 97888
23 97889
23 97888
25 97889
25 97888
27 97889
27 97888
29 97889
29 97888
31 97889
31 97888
33 97889
33 978...

result:

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

Test #9:

score: 0
Accepted
time: 31ms
memory: 9560kb

input:

10000 100000

output:

109998
1 100000
1 99999
3 100000
3 99999
5 100000
5 99999
7 100000
7 99999
9 100000
9 99999
11 100000
11 99999
13 100000
13 99999
15 100000
15 99999
17 100000
17 99999
19 100000
19 99999
21 100000
21 99999
23 100000
23 99999
25 100000
25 99999
27 100000
27 99999
29 100000
29 99999
31 100000
31 99999...

result:

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

Test #10:

score: 0
Accepted
time: 24ms
memory: 11108kb

input:

13 99999

output:

100011
1 99999
1 99998
3 99999
3 99998
5 99999
5 99998
7 99999
7 99998
9 99999
9 99998
11 99999
11 99998
13 99999
13 99998
1 99985
1 99984
3 99985
3 99984
5 99985
5 99984
7 99985
7 99984
9 99985
9 99984
11 99985
11 99984
13 99985
13 99984
1 99971
1 99970
3 99971
3 99970
5 99971
5 99970
7 99971
7 999...

result:

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

Test #11:

score: 0
Accepted
time: 28ms
memory: 10920kb

input:

21 99999

output:

100019
1 99999
1 99998
3 99999
3 99998
5 99999
5 99998
7 99999
7 99998
9 99999
9 99998
11 99999
11 99998
13 99999
13 99998
15 99999
15 99998
17 99999
17 99998
19 99999
19 99998
21 99999
21 99998
1 99977
1 99976
3 99977
3 99976
5 99977
5 99976
7 99977
7 99976
9 99977
9 99976
11 99977
11 99976
13 9997...

result:

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

Test #12:

score: 0
Accepted
time: 18ms
memory: 10644kb

input:

49999 100000

output:

149998
1 100000
1 99999
3 100000
3 99999
5 100000
5 99999
7 100000
7 99999
9 100000
9 99999
11 100000
11 99999
13 100000
13 99999
15 100000
15 99999
17 100000
17 99999
19 100000
19 99999
21 100000
21 99999
23 100000
23 99999
25 100000
25 99999
27 100000
27 99999
29 100000
29 99999
31 100000
31 99999...

result:

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

Test #13:

score: 0
Accepted
time: 20ms
memory: 8844kb

input:

33333 99999

output:

133331
1 99999
1 99998
3 99999
3 99998
5 99999
5 99998
7 99999
7 99998
9 99999
9 99998
11 99999
11 99998
13 99999
13 99998
15 99999
15 99998
17 99999
17 99998
19 99999
19 99998
21 99999
21 99998
23 99999
23 99998
25 99999
25 99998
27 99999
27 99998
29 99999
29 99998
31 99999
31 99998
33 99999
33 999...

result:

ok n: 33333, m: 99999, bishops: 133331

Test #14:

score: 0
Accepted
time: 14ms
memory: 4856kb

input:

23342 98876

output:

122216
1 98876
1 98875
3 98876
3 98875
5 98876
5 98875
7 98876
7 98875
9 98876
9 98875
11 98876
11 98875
13 98876
13 98875
15 98876
15 98875
17 98876
17 98875
19 98876
19 98875
21 98876
21 98875
23 98876
23 98875
25 98876
25 98875
27 98876
27 98875
29 98876
29 98875
31 98876
31 98875
33 98876
33 988...

result:

ok n: 23342, m: 98876, bishops: 122216

Test #15:

score: 0
Accepted
time: 34ms
memory: 10144kb

input:

56713 91234

output:

147946
1 91234
1 91233
3 91234
3 91233
5 91234
5 91233
7 91234
7 91233
9 91234
9 91233
11 91234
11 91233
13 91234
13 91233
15 91234
15 91233
17 91234
17 91233
19 91234
19 91233
21 91234
21 91233
23 91234
23 91233
25 91234
25 91233
27 91234
27 91233
29 91234
29 91233
31 91234
31 91233
33 91234
33 912...

result:

ok n: 56713, m: 91234, bishops: 147946

Test #16:

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

input:

99995 99995

output:

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

result:

ok n: 99995, m: 99995, bishops: 199988

Test #17:

score: 0
Accepted
time: 19ms
memory: 6992kb

input:

12345 54321

output:

66665
1 54321
1 54320
3 54321
3 54320
5 54321
5 54320
7 54321
7 54320
9 54321
9 54320
11 54321
11 54320
13 54321
13 54320
15 54321
15 54320
17 54321
17 54320
19 54321
19 54320
21 54321
21 54320
23 54321
23 54320
25 54321
25 54320
27 54321
27 54320
29 54321
29 54320
31 54321
31 54320
33 54321
33 5432...

result:

ok n: 12345, m: 54321, bishops: 66665

Test #18:

score: 0
Accepted
time: 45ms
memory: 9964kb

input:

90000 92000

output:

181998
1 92000
1 91999
3 92000
3 91999
5 92000
5 91999
7 92000
7 91999
9 92000
9 91999
11 92000
11 91999
13 92000
13 91999
15 92000
15 91999
17 92000
17 91999
19 92000
19 91999
21 92000
21 91999
23 92000
23 91999
25 92000
25 91999
27 92000
27 91999
29 92000
29 91999
31 92000
31 91999
33 92000
33 919...

result:

ok n: 90000, m: 92000, bishops: 181998

Test #19:

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

input:

10000 70000

output:

79998
1 70000
1 69999
3 70000
3 69999
5 70000
5 69999
7 70000
7 69999
9 70000
9 69999
11 70000
11 69999
13 70000
13 69999
15 70000
15 69999
17 70000
17 69999
19 70000
19 69999
21 70000
21 69999
23 70000
23 69999
25 70000
25 69999
27 70000
27 69999
29 70000
29 69999
31 70000
31 69999
33 70000
33 6999...

result:

ok n: 10000, m: 70000, bishops: 79998

Test #20:

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

input:

10000 70001

output:

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

result:

ok n: 10000, m: 70001, bishops: 80000

Test #21:

score: 0
Accepted
time: 18ms
memory: 8328kb

input:

10000 80000

output:

89998
1 80000
1 79999
3 80000
3 79999
5 80000
5 79999
7 80000
7 79999
9 80000
9 79999
11 80000
11 79999
13 80000
13 79999
15 80000
15 79999
17 80000
17 79999
19 80000
19 79999
21 80000
21 79999
23 80000
23 79999
25 80000
25 79999
27 80000
27 79999
29 80000
29 79999
31 80000
31 79999
33 80000
33 7999...

result:

ok n: 10000, m: 80000, bishops: 89998

Test #22:

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

input:

10000 80001

output:

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

result:

ok n: 10000, m: 80001, bishops: 90000

Test #23:

score: 0
Accepted
time: 21ms
memory: 7064kb

input:

10000 80002

output:

90000
1 80002
1 80001
3 80002
3 80001
5 80002
5 80001
7 80002
7 80001
9 80002
9 80001
11 80002
11 80001
13 80002
13 80001
15 80002
15 80001
17 80002
17 80001
19 80002
19 80001
21 80002
21 80001
23 80002
23 80001
25 80002
25 80001
27 80002
27 80001
29 80002
29 80001
31 80002
31 80001
33 80002
33 8000...

result:

ok n: 10000, m: 80002, bishops: 90000

Test #24:

score: 0
Accepted
time: 24ms
memory: 9032kb

input:

10000 79999

output:

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

result:

ok n: 10000, m: 79999, bishops: 89998

Test #25:

score: 0
Accepted
time: 32ms
memory: 9564kb

input:

10000 79998

output:

89996
1 79998
1 79997
3 79998
3 79997
5 79998
5 79997
7 79998
7 79997
9 79998
9 79997
11 79998
11 79997
13 79998
13 79997
15 79998
15 79997
17 79998
17 79997
19 79998
19 79997
21 79998
21 79997
23 79998
23 79997
25 79998
25 79997
27 79998
27 79997
29 79998
29 79997
31 79998
31 79997
33 79998
33 7999...

result:

ok n: 10000, m: 79998, bishops: 89996

Test #26:

score: 0
Accepted
time: 26ms
memory: 8912kb

input:

11111 100000

output:

111110
1 100000
1 99999
3 100000
3 99999
5 100000
5 99999
7 100000
7 99999
9 100000
9 99999
11 100000
11 99999
13 100000
13 99999
15 100000
15 99999
17 100000
17 99999
19 100000
19 99999
21 100000
21 99999
23 100000
23 99999
25 100000
25 99999
27 100000
27 99999
29 100000
29 99999
31 100000
31 99999...

result:

ok n: 11111, m: 100000, bishops: 111110

Test #27:

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

input:

1 1

output:

1
1 1

result:

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

Extra Test:

score: 0
Extra Test Passed