QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#173652#7178. Bishopsucup-team666#AC ✓83ms13696kbC++202.5kb2023-09-10 00:54:592023-09-10 00:54:59

详细

Test #1:

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

input:

2 5

output:

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

result:

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

Test #2:

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

input:

5 5

output:

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

result:

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

Test #3:

score: 0
Accepted
time: 66ms
memory: 13580kb

input:

100000 100000

output:

199998
1 1
3 1
99998 100000
5 1
99996 100000
7 1
99994 100000
9 1
99992 100000
11 1
99990 100000
13 1
99988 100000
15 1
99986 100000
17 1
99984 100000
19 1
99982 100000
21 1
99980 100000
23 1
99978 100000
25 1
99976 100000
27 1
99974 100000
29 1
99972 100000
31 1
99970 100000
33 1
99968 100000
35 1
...

result:

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

Test #4:

score: 0
Accepted
time: 75ms
memory: 13680kb

input:

100000 99999

output:

199998
1 1
100000 99998
1 3
100000 99996
1 5
100000 99994
1 7
100000 99992
1 9
100000 99990
1 11
100000 99988
1 13
100000 99986
1 15
100000 99984
1 17
100000 99982
1 19
100000 99980
1 21
100000 99978
1 23
100000 99976
1 25
100000 99974
1 27
100000 99972
1 29
100000 99970
1 31
100000 99968
1 33
10000...

result:

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

Test #5:

score: 0
Accepted
time: 65ms
memory: 11892kb

input:

100000 50000

output:

149998
1 1
100000 50000
1 3
99998 50000
1 5
99996 50000
1 7
99994 50000
1 9
99992 50000
1 11
99990 50000
1 13
99988 50000
1 15
99986 50000
1 17
99984 50000
1 19
99982 50000
1 21
99980 50000
1 23
99978 50000
1 25
99976 50000
1 27
99974 50000
1 29
99972 50000
1 31
99970 50000
1 33
99968 50000
1 35
999...

result:

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

Test #6:

score: 0
Accepted
time: 27ms
memory: 8544kb

input:

1 100000

output:

100000
1 1
1 3
1 5
1 7
1 9
1 11
1 13
1 15
1 17
1 19
1 21
1 23
1 25
1 27
1 29
1 31
1 33
1 35
1 37
1 39
1 41
1 43
1 45
1 47
1 49
1 51
1 53
1 55
1 57
1 59
1 61
1 63
1 65
1 67
1 69
1 71
1 73
1 75
1 77
1 79
1 81
1 83
1 85
1 87
1 89
1 91
1 93
1 95
1 97
1 99
1 101
1 103
1 105
1 107
1 109
1 111
1 113
1 115
...

result:

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

Test #7:

score: 0
Accepted
time: 41ms
memory: 11560kb

input:

34535 99889

output:

134423
1 1
34535 99889
3 1
34535 99887
5 1
34535 99885
7 1
34535 99883
9 1
34535 99881
11 1
34535 99879
13 1
34535 99877
15 1
34535 99875
17 1
34535 99873
19 1
34535 99871
21 1
34535 99869
23 1
34535 99867
25 1
34535 99865
27 1
34535 99863
29 1
34535 99861
31 1
34535 99859
33 1
34535 99857
35 1
3453...

result:

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

Test #8:

score: 0
Accepted
time: 46ms
memory: 8864kb

input:

12231 97889

output:

110119
1 1
12231 97889
3 1
12231 97887
5 1
12231 97885
7 1
12231 97883
9 1
12231 97881
11 1
12231 97879
13 1
12231 97877
15 1
12231 97875
17 1
12231 97873
19 1
12231 97871
21 1
12231 97869
23 1
12231 97867
25 1
12231 97865
27 1
12231 97863
29 1
12231 97861
31 1
12231 97859
33 1
12231 97857
35 1
1223...

result:

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

Test #9:

score: 0
Accepted
time: 37ms
memory: 8860kb

input:

10000 100000

output:

109998
1 1
10000 100000
3 1
10000 99998
5 1
10000 99996
7 1
10000 99994
9 1
10000 99992
11 1
10000 99990
13 1
10000 99988
15 1
10000 99986
17 1
10000 99984
19 1
10000 99982
21 1
10000 99980
23 1
10000 99978
25 1
10000 99976
27 1
10000 99974
29 1
10000 99972
31 1
10000 99970
33 1
10000 99968
35 1
100...

result:

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

Test #10:

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

input:

13 99999

output:

100011
1 1
13 99999
3 1
13 99997
5 1
13 99995
7 1
13 99993
9 1
13 99991
11 1
13 99989
13 1
7 9
7 11
7 13
7 15
7 17
7 19
7 21
7 23
7 25
7 27
7 29
7 31
7 33
7 35
7 37
7 39
7 41
7 43
7 45
7 47
7 49
7 51
7 53
7 55
7 57
7 59
7 61
7 63
7 65
7 67
7 69
7 71
7 73
7 75
7 77
7 79
7 81
7 83
7 85
7 87
7 89
7 91
...

result:

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

Test #11:

score: 0
Accepted
time: 30ms
memory: 8580kb

input:

21 99999

output:

100019
1 1
21 99999
3 1
21 99997
5 1
21 99995
7 1
21 99993
9 1
21 99991
11 1
21 99989
13 1
21 99987
15 1
21 99985
17 1
21 99983
19 1
21 99981
21 1
11 13
11 15
11 17
11 19
11 21
11 23
11 25
11 27
11 29
11 31
11 33
11 35
11 37
11 39
11 41
11 43
11 45
11 47
11 49
11 51
11 53
11 55
11 57
11 59
11 61
11 ...

result:

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

Test #12:

score: 0
Accepted
time: 62ms
memory: 11824kb

input:

49999 100000

output:

149998
1 1
49999 99999
3 1
49999 99997
5 1
49999 99995
7 1
49999 99993
9 1
49999 99991
11 1
49999 99989
13 1
49999 99987
15 1
49999 99985
17 1
49999 99983
19 1
49999 99981
21 1
49999 99979
23 1
49999 99977
25 1
49999 99975
27 1
49999 99973
29 1
49999 99971
31 1
49999 99969
33 1
49999 99967
35 1
4999...

result:

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

Test #13:

score: 0
Accepted
time: 46ms
memory: 11608kb

input:

33333 99999

output:

133331
1 1
33333 99999
3 1
33333 99997
5 1
33333 99995
7 1
33333 99993
9 1
33333 99991
11 1
33333 99989
13 1
33333 99987
15 1
33333 99985
17 1
33333 99983
19 1
33333 99981
21 1
33333 99979
23 1
33333 99977
25 1
33333 99975
27 1
33333 99973
29 1
33333 99971
31 1
33333 99969
33 1
33333 99967
35 1
3333...

result:

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

Test #14:

score: 0
Accepted
time: 50ms
memory: 9628kb

input:

23342 98876

output:

122216
1 1
23342 98876
3 1
23342 98874
5 1
23342 98872
7 1
23342 98870
9 1
23342 98868
11 1
23342 98866
13 1
23342 98864
15 1
23342 98862
17 1
23342 98860
19 1
23342 98858
21 1
23342 98856
23 1
23342 98854
25 1
23342 98852
27 1
23342 98850
29 1
23342 98848
31 1
23342 98846
33 1
23342 98844
35 1
2334...

result:

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

Test #15:

score: 0
Accepted
time: 48ms
memory: 11312kb

input:

56713 91234

output:

147946
1 1
56713 91233
3 1
56713 91231
5 1
56713 91229
7 1
56713 91227
9 1
56713 91225
11 1
56713 91223
13 1
56713 91221
15 1
56713 91219
17 1
56713 91217
19 1
56713 91215
21 1
56713 91213
23 1
56713 91211
25 1
56713 91209
27 1
56713 91207
29 1
56713 91205
31 1
56713 91203
33 1
56713 91201
35 1
5671...

result:

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

Test #16:

score: 0
Accepted
time: 75ms
memory: 13696kb

input:

99995 99995

output:

199988
1 1
3 1
99993 99995
5 1
99991 99995
7 1
99989 99995
9 1
99987 99995
11 1
99985 99995
13 1
99983 99995
15 1
99981 99995
17 1
99979 99995
19 1
99977 99995
21 1
99975 99995
23 1
99973 99995
25 1
99971 99995
27 1
99969 99995
29 1
99967 99995
31 1
99965 99995
33 1
99963 99995
35 1
99961 99995
37 1...

result:

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

Test #17:

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

input:

12345 54321

output:

66665
1 1
12345 54321
3 1
12345 54319
5 1
12345 54317
7 1
12345 54315
9 1
12345 54313
11 1
12345 54311
13 1
12345 54309
15 1
12345 54307
17 1
12345 54305
19 1
12345 54303
21 1
12345 54301
23 1
12345 54299
25 1
12345 54297
27 1
12345 54295
29 1
12345 54293
31 1
12345 54291
33 1
12345 54289
35 1
12345...

result:

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

Test #18:

score: 0
Accepted
time: 83ms
memory: 13020kb

input:

90000 92000

output:

181998
1 1
90000 92000
3 1
90000 91998
5 1
90000 91996
7 1
90000 91994
9 1
90000 91992
11 1
90000 91990
13 1
90000 91988
15 1
90000 91986
17 1
90000 91984
19 1
90000 91982
21 1
90000 91980
23 1
90000 91978
25 1
90000 91976
27 1
90000 91974
29 1
90000 91972
31 1
90000 91970
33 1
90000 91968
35 1
9000...

result:

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

Test #19:

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

input:

10000 70000

output:

79998
1 1
10000 70000
3 1
10000 69998
5 1
10000 69996
7 1
10000 69994
9 1
10000 69992
11 1
10000 69990
13 1
10000 69988
15 1
10000 69986
17 1
10000 69984
19 1
10000 69982
21 1
10000 69980
23 1
10000 69978
25 1
10000 69976
27 1
10000 69974
29 1
10000 69972
31 1
10000 69970
33 1
10000 69968
35 1
10000...

result:

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

Test #20:

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

input:

10000 70001

output:

80000
1 1
10000 70000
3 1
10000 69998
5 1
10000 69996
7 1
10000 69994
9 1
10000 69992
11 1
10000 69990
13 1
10000 69988
15 1
10000 69986
17 1
10000 69984
19 1
10000 69982
21 1
10000 69980
23 1
10000 69978
25 1
10000 69976
27 1
10000 69974
29 1
10000 69972
31 1
10000 69970
33 1
10000 69968
35 1
10000...

result:

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

Test #21:

score: 0
Accepted
time: 35ms
memory: 8212kb

input:

10000 80000

output:

89998
1 1
10000 80000
3 1
10000 79998
5 1
10000 79996
7 1
10000 79994
9 1
10000 79992
11 1
10000 79990
13 1
10000 79988
15 1
10000 79986
17 1
10000 79984
19 1
10000 79982
21 1
10000 79980
23 1
10000 79978
25 1
10000 79976
27 1
10000 79974
29 1
10000 79972
31 1
10000 79970
33 1
10000 79968
35 1
10000...

result:

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

Test #22:

score: 0
Accepted
time: 35ms
memory: 8100kb

input:

10000 80001

output:

90000
1 1
10000 80000
3 1
10000 79998
5 1
10000 79996
7 1
10000 79994
9 1
10000 79992
11 1
10000 79990
13 1
10000 79988
15 1
10000 79986
17 1
10000 79984
19 1
10000 79982
21 1
10000 79980
23 1
10000 79978
25 1
10000 79976
27 1
10000 79974
29 1
10000 79972
31 1
10000 79970
33 1
10000 79968
35 1
10000...

result:

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

Test #23:

score: 0
Accepted
time: 36ms
memory: 8076kb

input:

10000 80002

output:

90000
1 1
10000 80002
3 1
10000 80000
5 1
10000 79998
7 1
10000 79996
9 1
10000 79994
11 1
10000 79992
13 1
10000 79990
15 1
10000 79988
17 1
10000 79986
19 1
10000 79984
21 1
10000 79982
23 1
10000 79980
25 1
10000 79978
27 1
10000 79976
29 1
10000 79974
31 1
10000 79972
33 1
10000 79970
35 1
10000...

result:

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

Test #24:

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

input:

10000 79999

output:

89998
1 1
10000 79998
3 1
10000 79996
5 1
10000 79994
7 1
10000 79992
9 1
10000 79990
11 1
10000 79988
13 1
10000 79986
15 1
10000 79984
17 1
10000 79982
19 1
10000 79980
21 1
10000 79978
23 1
10000 79976
25 1
10000 79974
27 1
10000 79972
29 1
10000 79970
31 1
10000 79968
33 1
10000 79966
35 1
10000...

result:

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

Test #25:

score: 0
Accepted
time: 33ms
memory: 8200kb

input:

10000 79998

output:

89996
1 1
10000 79998
3 1
10000 79996
5 1
10000 79994
7 1
10000 79992
9 1
10000 79990
11 1
10000 79988
13 1
10000 79986
15 1
10000 79984
17 1
10000 79982
19 1
10000 79980
21 1
10000 79978
23 1
10000 79976
25 1
10000 79974
27 1
10000 79972
29 1
10000 79970
31 1
10000 79968
33 1
10000 79966
35 1
10000...

result:

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

Test #26:

score: 0
Accepted
time: 47ms
memory: 8980kb

input:

11111 100000

output:

111110
1 1
11111 99999
3 1
11111 99997
5 1
11111 99995
7 1
11111 99993
9 1
11111 99991
11 1
11111 99989
13 1
11111 99987
15 1
11111 99985
17 1
11111 99983
19 1
11111 99981
21 1
11111 99979
23 1
11111 99977
25 1
11111 99975
27 1
11111 99973
29 1
11111 99971
31 1
11111 99969
33 1
11111 99967
35 1
1111...

result:

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

Test #27:

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

input:

1 1

output:

1
1 1

result:

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

Extra Test:

score: 0
Extra Test Passed