QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#172289#7178. Bishopsucup-team216#AC ✓26ms13544kbC++141.9kb2023-09-09 18:36:122023-09-09 18:36:12

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3512kb

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: 0ms
memory: 3564kb

input:

5 5

output:

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

result:

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

Test #3:

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

input:

100000 100000

output:

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

Test #4:

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

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: 13ms
memory: 5180kb

input:

100000 50000

output:

149998
50001 1
50002 1
50003 1
50004 1
50005 1
50006 1
50007 1
50008 1
50009 1
50010 1
50011 1
50012 1
50013 1
50014 1
50015 1
50016 1
50017 1
50018 1
50019 1
50020 1
50021 1
50022 1
50023 1
50024 1
50025 1
50026 1
50027 1
50028 1
50029 1
50030 1
50031 1
50032 1
50033 1
50034 1
50035 1
50036 1
50037...

result:

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

Test #6:

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

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: 15ms
memory: 5172kb

input:

34535 99889

output:

134423
34535 99888
34535 99889
34533 99888
34533 99889
34531 99888
34531 99889
34531 99883
34532 99883
34533 99883
34534 99883
34535 99883
34524 99883
34524 99884
34524 99885
34524 99886
34524 99887
34524 99888
34524 99889
34517 99883
34517 99884
34517 99885
34517 99886
34517 99887
34517 99888
34517...

result:

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

Test #8:

score: 0
Accepted
time: 9ms
memory: 4236kb

input:

12231 97889

output:

110119
12231 97888
12231 97889
12229 97888
12229 97889
12227 97888
12227 97889
12225 97888
12225 97889
12223 97888
12223 97889
12221 97888
12221 97889
12219 97888
12219 97889
12219 97875
12220 97875
12221 97875
12222 97875
12223 97875
12224 97875
12225 97875
12226 97875
12227 97875
12228 97875
12229...

result:

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

Test #9:

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

input:

10000 100000

output:

109998
1 90001
1 90002
1 90003
1 90004
1 90005
1 90006
1 90007
1 90008
1 90009
1 90010
1 90011
1 90012
1 90013
1 90014
1 90015
1 90016
1 90017
1 90018
1 90019
1 90020
1 90021
1 90022
1 90023
1 90024
1 90025
1 90026
1 90027
1 90028
1 90029
1 90030
1 90031
1 90032
1 90033
1 90034
1 90035
1 90036
1 900...

result:

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

Test #10:

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

input:

13 99999

output:

100011
13 99997
13 99998
13 99999
10 99997
10 99998
10 99999
7 99997
7 99998
7 99999
4 99997
4 99998
4 99999
1 99997
1 99998
1 99999
1 99984
2 99984
3 99984
4 99984
5 99984
6 99984
7 99984
8 99984
9 99984
10 99984
11 99984
12 99984
13 99984
1 99971
2 99971
3 99971
4 99971
5 99971
6 99971
7 99971
8 9...

result:

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

Test #11:

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

input:

21 99999

output:

100019
19 99994
19 99999
19 99995
19 99998
21 99994
21 99999
21 99995
21 99998
19 99991
20 99991
21 99991
19 99988
20 99988
21 99988
19 99985
20 99985
21 99985
19 99982
20 99982
21 99982
1 99982
1 99983
1 99984
1 99985
1 99986
1 99987
1 99988
1 99989
1 99990
1 99991
1 99992
1 99993
1 99994
1 99995
1...

result:

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

Test #12:

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

input:

49999 100000

output:

149998
49999 99999
49999 100000
49997 99999
49997 100000
49995 99999
49995 100000
49993 99999
49993 100000
49991 99999
49991 100000
49989 99999
49989 100000
49987 99999
49987 100000
49985 99999
49985 100000
49983 99999
49983 100000
49981 99999
49981 100000
49979 99999
49979 100000
49977 99999
49977 ...

result:

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

Test #13:

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

input:

33333 99999

output:

133331
1 33334
1 99999
1 33335
1 99998
1 33336
1 99997
1 33337
1 99996
1 33338
1 99995
1 33339
1 99994
1 33340
1 99993
1 33341
1 99992
1 33342
1 99991
1 33343
1 99990
1 33344
1 99989
1 33345
1 99988
1 33346
1 99987
1 33347
1 99986
1 33348
1 99985
1 33349
1 99984
1 33350
1 99983
1 33351
1 99982
1 333...

result:

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

Test #14:

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

input:

23342 98876

output:

122216
23341 98875
23342 98875
23339 98875
23339 98876
23337 98875
23337 98876
23335 98875
23335 98876
23333 98875
23333 98876
23331 98875
23331 98876
23329 98875
23329 98876
23327 98875
23327 98876
23325 98875
23325 98876
23323 98875
23323 98876
23321 98875
23321 98876
23319 98875
23319 98876
23317...

result:

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

Test #15:

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

input:

56713 91234

output:

147946
54249 91234
54250 91234
54251 91234
54252 91234
54253 91234
54254 91234
54255 91234
54256 91234
54257 91234
54258 91234
54259 91234
54260 91234
54261 91234
54262 91234
54263 91234
54264 91234
54265 91234
54266 91234
54267 91234
54268 91234
54269 91234
54270 91234
54271 91234
54272 91234
54273...

result:

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

Test #16:

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

input:

99995 99995

output:

199988
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: 99995, m: 99995, bishops: 199988

Test #17:

score: 0
Accepted
time: 9ms
memory: 4192kb

input:

12345 54321

output:

66665
12343 54316
12343 54321
12343 54317
12343 54320
12345 54316
12345 54321
12345 54317
12345 54320
12343 54313
12344 54313
12345 54313
12343 54310
12344 54310
12345 54310
12343 54307
12344 54307
12345 54307
12328 54307
12328 54308
12328 54309
12328 54310
12328 54311
12328 54312
12328 54313
12328 ...

result:

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

Test #18:

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

input:

90000 92000

output:

181998
88001 90001
88002 90001
88003 90001
88004 90001
88005 90001
88006 90001
88007 90001
88008 90001
88009 90001
88010 90001
88011 90001
88012 90001
88013 90001
88014 90001
88015 90001
88016 90001
88017 90001
88018 90001
88019 90001
88020 90001
88021 90001
88022 90001
88023 90001
88024 90001
88025...

result:

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

Test #19:

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

input:

10000 70000

output:

79998
1 60001
1 60002
1 60003
1 60004
1 60005
1 60006
1 60007
1 60008
1 60009
1 60010
1 60011
1 60012
1 60013
1 60014
1 60015
1 60016
1 60017
1 60018
1 60019
1 60020
1 60021
1 60022
1 60023
1 60024
1 60025
1 60026
1 60027
1 60028
1 60029
1 60030
1 60031
1 60032
1 60033
1 60034
1 60035
1 60036
1 6003...

result:

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

Test #20:

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

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

input:

10000 80000

output:

89998
1 70001
1 70002
1 70003
1 70004
1 70005
1 70006
1 70007
1 70008
1 70009
1 70010
1 70011
1 70012
1 70013
1 70014
1 70015
1 70016
1 70017
1 70018
1 70019
1 70020
1 70021
1 70022
1 70023
1 70024
1 70025
1 70026
1 70027
1 70028
1 70029
1 70030
1 70031
1 70032
1 70033
1 70034
1 70035
1 70036
1 7003...

result:

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

Test #22:

score: 0
Accepted
time: 7ms
memory: 4220kb

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

input:

10000 80002

output:

90000
9999 80001
10000 80001
9997 80001
9997 80002
9995 80001
9995 80002
9993 80001
9993 80002
9991 80001
9991 80002
9989 80001
9989 80002
9987 80001
9987 80002
9985 80001
9985 80002
9983 80001
9983 80002
9981 80001
9981 80002
9979 80001
9979 80002
9977 80001
9977 80002
9975 80001
9975 80002
9973 80...

result:

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

Test #24:

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

input:

10000 79999

output:

89998
10000 70001
10000 70002
10000 70003
10000 70004
10000 70005
10000 70006
10000 70007
10000 70008
10000 70009
10000 70010
10000 70011
10000 70012
10000 70013
10000 70014
10000 70015
10000 70016
10000 70017
10000 70018
10000 70019
10000 70020
10000 70021
10000 70022
10000 70023
10000 70024
10000 ...

result:

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

Test #25:

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

input:

10000 79998

output:

89996
9999 79997
9999 79998
9999 79995
10000 79995
9999 79993
10000 79993
9999 79991
10000 79991
9999 79989
10000 79989
9999 79987
10000 79987
9999 79985
10000 79985
9999 79983
10000 79983
9999 79981
10000 79981
9999 79979
10000 79979
9999 79977
10000 79977
9999 79975
10000 79975
9999 79973
10000 79...

result:

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

Test #26:

score: 0
Accepted
time: 15ms
memory: 4188kb

input:

11111 100000

output:

111110
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 100000
31...

result:

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

Test #27:

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

input:

1 1

output:

1
1 1

result:

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

Extra Test:

score: 0
Extra Test Passed