QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#200372#7178. Bishopsucup-team1281#AC ✓215ms80584kbC++202.4kb2023-10-04 16:43:342023-10-04 16:43:34

详细

Test #1:

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

input:

2 5

output:

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

result:

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

Test #2:

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

input:

5 5

output:

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

result:

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

Test #3:

score: 0
Accepted
time: 167ms
memory: 80584kb

input:

100000 100000

output:

199998
1 1
100000 1
1 2
100000 99999
1 3
100000 99998
1 4
100000 99997
1 5
100000 99996
1 6
100000 99995
1 7
100000 99994
1 8
100000 99993
1 9
100000 99992
1 10
100000 99991
1 11
100000 99990
1 12
100000 99989
1 13
100000 99988
1 14
100000 99987
1 15
100000 99986
1 16
100000 99985
1 17
100000 99984
...

result:

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

Test #4:

score: 0
Accepted
time: 162ms
memory: 80528kb

input:

100000 99999

output:

199998
1 1
100000 1
100000 99999
100000 99998
1 99998
1 2
1 3
100000 3
100000 99997
100000 99996
1 99996
1 4
1 5
100000 5
100000 99995
100000 99994
1 99994
1 6
1 7
100000 7
100000 99993
100000 99992
1 99992
1 8
1 9
100000 9
100000 99991
100000 99990
1 99990
1 10
1 11
100000 11
100000 99989
100000 99...

result:

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

Test #5:

score: 0
Accepted
time: 141ms
memory: 65488kb

input:

100000 50000

output:

149998
1 1
100000 1
100000 50000
99999 1
2 1
2 50000
50002 50000
49999 50000
49999 1
1 3
100000 3
100000 49998
99997 1
4 1
4 50000
50004 50000
49997 50000
49997 1
1 5
100000 5
100000 49996
99995 1
6 1
6 50000
50006 50000
49995 50000
49995 1
1 7
100000 7
100000 49994
99993 1
8 1
8 50000
50008 50000
4...

result:

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

Test #6:

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

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

input:

34535 99889

output:

134423
1 1
34535 1
34535 99889
1 69069
34535 69069
34535 30821
34535 96175
1 96175
1 3715
34535 27107
1 27107
1 72783
1 7429
34535 7429
34535 92461
1 76497
34535 76497
34535 23393
34535 88747
1 88747
1 11143
34535 19679
1 19679
1 80211
1 14857
34535 14857
34535 85033
1 83925
34535 83925
34535 15965
...

result:

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

Test #8:

score: 0
Accepted
time: 150ms
memory: 54056kb

input:

12231 97889

output:

110119
1 1
12231 1
12231 97889
1 24461
12231 24461
12231 73429
1 48921
12231 48921
12231 48969
1 73381
12231 73381
12231 24509
1 97841
12231 97841
12231 49
12231 85707
1 85707
1 12183
12231 61247
1 61247
1 36643
12231 36787
1 36787
1 61103
12231 12327
1 12327
1 85563
97 1
12135 1
12135 97889
1 24365...

result:

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

Test #9:

score: 0
Accepted
time: 126ms
memory: 54020kb

input:

10000 100000

output:

109998
1 1
10000 1
10000 100000
1 19999
10000 19999
10000 80002
1 39997
10000 39997
10000 60004
1 59995
10000 59995
10000 40006
1 79993
10000 79993
10000 20008
1 99991
10000 99991
10000 10
10000 90010
1 90010
1 9991
10000 70012
1 70012
1 29989
10000 50014
1 50014
1 49987
10000 30016
1 30016
1 69985
...

result:

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

Test #10:

score: 0
Accepted
time: 103ms
memory: 51352kb

input:

13 99999

output:

100011
1 1
13 1
13 99999
1 25
13 25
13 99975
1 49
13 49
13 99951
1 73
13 73
13 99927
1 97
13 97
13 99903
1 121
13 121
13 99879
1 145
13 145
13 99855
1 169
13 169
13 99831
1 193
13 193
13 99807
1 217
13 217
13 99783
1 241
13 241
13 99759
1 265
13 265
13 99735
1 289
13 289
13 99711
1 313
13 313
13 996...

result:

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

Test #11:

score: 0
Accepted
time: 117ms
memory: 51208kb

input:

21 99999

output:

100019
1 1
21 1
21 99999
1 41
21 41
21 99959
1 81
21 81
21 99919
1 121
21 121
21 99879
1 161
21 161
21 99839
1 201
21 201
21 99799
1 241
21 241
21 99759
1 281
21 281
21 99719
1 321
21 321
21 99679
1 361
21 361
21 99639
1 401
21 401
21 99599
1 441
21 441
21 99559
1 481
21 481
21 99519
1 521
21 521
21...

result:

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

Test #12:

score: 0
Accepted
time: 135ms
memory: 66396kb

input:

49999 100000

output:

149998
1 1
49999 1
49999 100000
1 99997
49999 99997
49999 4
49999 50005
1 50005
1 49996
7 1
49993 1
49993 100000
1 99991
49999 99991
49999 10
49999 50011
1 50011
1 49990
13 1
49987 1
49987 100000
1 99985
49999 99985
49999 16
49999 50017
1 50017
1 49984
19 1
49981 1
49981 100000
1 99979
49999 99979
4...

result:

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

Test #13:

score: 0
Accepted
time: 131ms
memory: 60908kb

input:

33333 99999

output:

133331
1 1
33333 1
33333 99999
1 66665
33333 66665
33333 33335
33331 99999
3 99999
3 1
33333 33337
1 33337
1 66663
5 1
33329 1
33329 99999
1 66661
33333 66661
33333 33339
33327 99999
7 99999
7 1
33333 33341
1 33341
1 66659
9 1
33325 1
33325 99999
1 66657
33333 66657
33333 33343
33323 99999
11 99999
...

result:

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

Test #14:

score: 0
Accepted
time: 174ms
memory: 57636kb

input:

23342 98876

output:

122216
1 1
23342 1
23342 98876
1 46683
23342 46683
23342 52194
1 93365
23342 93365
23342 5512
23342 81046
1 81046
1 17831
23342 34364
1 34364
1 64513
11023 1
12320 1
12320 98876
1 35661
23342 35661
23342 63216
1 82343
23342 82343
23342 16534
23342 92068
1 92068
1 6809
23342 45386
1 45386
1 53491
220...

result:

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

Test #15:

score: 0
Accepted
time: 208ms
memory: 66068kb

input:

56713 91234

output:

147946
1 1
56713 1
56713 91234
22192 91234
34522 91234
34522 1
56713 12331
1 12331
1 78904
1 44383
56713 44383
56713 46852
56713 81373
1 81373
1 9862
24661 1
32053 1
32053 91234
1 88765
56713 88765
56713 2470
56713 36991
1 36991
1 54244
1 19723
56713 19723
56713 71512
41914 91234
14800 91234
14800 1...

result:

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

Test #16:

score: 0
Accepted
time: 176ms
memory: 80532kb

input:

99995 99995

output:

199988
1 1
99995 1
1 2
99995 99994
1 3
99995 99993
1 4
99995 99992
1 5
99995 99991
1 6
99995 99990
1 7
99995 99989
1 8
99995 99988
1 9
99995 99987
1 10
99995 99986
1 11
99995 99985
1 12
99995 99984
1 13
99995 99983
1 14
99995 99982
1 15
99995 99981
1 16
99995 99980
1 17
99995 99979
1 18
99995 99978
...

result:

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

Test #17:

score: 0
Accepted
time: 78ms
memory: 41928kb

input:

12345 54321

output:

66665
1 1
12345 1
12345 54321
1 24689
12345 24689
12345 29633
1 49377
12345 49377
12345 4945
12345 46921
1 46921
1 7401
12345 22233
1 22233
1 32089
9889 1
2457 1
2457 54321
1 14801
12345 14801
12345 39521
1 39489
12345 39489
12345 14833
9857 54321
2489 54321
2489 1
12345 32121
1 32121
1 22201
12345 ...

result:

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

Test #18:

score: 0
Accepted
time: 215ms
memory: 75680kb

input:

90000 92000

output:

181998
1 1
90000 1
90000 92000
88000 92000
2001 92000
2001 1
4001 1
86000 1
86000 92000
84000 92000
6001 92000
6001 1
8001 1
82000 1
82000 92000
80000 92000
10001 92000
10001 1
12001 1
78000 1
78000 92000
76000 92000
14001 92000
14001 1
16001 1
74000 1
74000 92000
72000 92000
18001 92000
18001 1
200...

result:

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

Test #19:

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

input:

10000 70000

output:

79998
1 1
10000 1
10000 70000
1 19999
10000 19999
10000 50002
1 39997
10000 39997
10000 30004
1 59995
10000 59995
10000 10006
9994 70000
7 70000
7 1
10000 50008
1 50008
1 19993
10000 30010
1 30010
1 39991
10000 10012
1 10012
1 59989
13 1
9988 1
9988 70000
1 19987
10000 19987
10000 50014
1 39985
1000...

result:

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

Test #20:

score: 0
Accepted
time: 84ms
memory: 45524kb

input:

10000 70001

output:

80000
1 1
10000 1
10000 70001
1 19999
10000 19999
10000 50003
1 39997
10000 39997
10000 30005
1 59995
10000 59995
10000 10007
9993 70001
8 70001
8 1
10000 50010
1 50010
1 19992
10000 30012
1 30012
1 39990
10000 10014
1 10014
1 59988
15 1
9986 1
9986 70001
1 19985
10000 19985
10000 50017
1 39983
1000...

result:

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

Test #21:

score: 0
Accepted
time: 104ms
memory: 48460kb

input:

10000 80000

output:

89998
1 1
10000 1
10000 80000
1 19999
10000 19999
10000 60002
1 39997
10000 39997
10000 40004
1 59995
10000 59995
10000 20006
1 79993
10000 79993
10000 8
10000 70008
1 70008
1 9993
10000 50010
1 50010
1 29991
10000 30012
1 30012
1 49989
10000 10014
1 10014
1 69987
15 1
9986 1
9986 80000
1 19985
1000...

result:

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

Test #22:

score: 0
Accepted
time: 95ms
memory: 48384kb

input:

10000 80001

output:

90000
1 1
10000 1
10000 80001
1 19999
10000 19999
10000 60003
1 39997
10000 39997
10000 40005
1 59995
10000 59995
10000 20007
1 79993
10000 79993
10000 9
10000 70010
1 70010
1 9992
10000 50012
1 50012
1 29990
10000 30014
1 30014
1 49988
10000 10016
1 10016
1 69986
17 1
9984 1
9984 80001
1 19983
1000...

result:

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

Test #23:

score: 0
Accepted
time: 102ms
memory: 48556kb

input:

10000 80002

output:

90000
1 1
10000 1
10000 80002
1 19999
10000 19999
10000 60004
1 39997
10000 39997
10000 40006
1 59995
10000 59995
10000 20008
1 79993
10000 79993
10000 10
10000 70012
1 70012
1 9991
10000 50014
1 50014
1 29989
10000 30016
1 30016
1 49987
10000 10018
1 10018
1 69985
19 1
9982 1
9982 80002
1 19981
100...

result:

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

Test #24:

score: 0
Accepted
time: 96ms
memory: 48472kb

input:

10000 79999

output:

89998
1 1
10000 1
10000 79999
1 19999
10000 19999
10000 60001
1 39997
10000 39997
10000 40003
1 59995
10000 59995
10000 20005
1 79993
10000 79993
10000 7
10000 70006
1 70006
1 9994
10000 50008
1 50008
1 29992
10000 30010
1 30010
1 49990
10000 10012
1 10012
1 69988
13 1
9988 1
9988 79999
1 19987
1000...

result:

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

Test #25:

score: 0
Accepted
time: 97ms
memory: 48436kb

input:

10000 79998

output:

89996
1 1
10000 1
10000 79998
1 19999
10000 19999
10000 60000
1 39997
10000 39997
10000 40002
1 59995
10000 59995
10000 20004
1 79993
10000 79993
10000 6
10000 70004
1 70004
1 9995
10000 50006
1 50006
1 29993
10000 30008
1 30008
1 49991
10000 10010
1 10010
1 69989
11 1
9990 1
9990 79998
1 19989
1000...

result:

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

Test #26:

score: 0
Accepted
time: 140ms
memory: 54488kb

input:

11111 100000

output:

111110
1 1
11111 1
11111 100000
1 22221
11111 22221
11111 77780
1 44441
11111 44441
11111 55560
1 66661
11111 66661
11111 33340
1 88881
11111 88881
11111 11120
11102 100000
10 100000
10 1
11111 77789
1 77789
1 22212
11111 55569
1 55569
1 44432
11111 33349
1 33349
1 66652
11111 11129
1 11129
1 88872
...

result:

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

Test #27:

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

input:

1 1

output:

1
1 1

result:

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

Extra Test:

score: 0
Extra Test Passed