QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#183052#7178. Bishopsucup-team1704#WA 41ms21100kbC++171.3kb2023-09-18 21:32:272023-09-18 21:32:28

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 5

output:

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

result:

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

Test #2:

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

input:

5 5

output:

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

result:

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

Test #3:

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

input:

100000 100000

output:

199998
99999 100000
99999 1
99998 100000
99998 1
99997 100000
99997 1
99996 100000
99996 1
99995 100000
99995 1
99994 100000
99994 1
99993 100000
99993 1
99992 100000
99992 1
99991 100000
99991 1
99990 100000
99990 1
99989 100000
99989 1
99988 100000
99988 1
99987 100000
99987 1
99986 100000
99986 1...

result:

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

Test #4:

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

input:

100000 99999

output:

199998
100000 99999
1 99999
100000 99998
1 99998
100000 99997
1 99997
100000 99996
1 99996
100000 99995
1 99995
100000 99994
1 99994
100000 99993
1 99993
100000 99992
1 99992
100000 99991
1 99991
100000 99990
1 99990
100000 99989
1 99989
100000 99988
1 99988
100000 99987
1 99987
100000 99986
1 99986...

result:

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

Test #5:

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

input:

100000 50000

output:

149998
74999 25001
74999 25000
74997 25001
74997 25000
74995 25001
74995 25000
74993 25001
74993 25000
74991 25001
74991 25000
74989 25001
74989 25000
74987 25001
74987 25000
74985 25001
74985 25000
74983 25001
74983 25000
74981 25001
74981 25000
74979 25001
74979 25000
74977 25001
74977 25000
74975...

result:

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

Test #6:

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

input:

1 100000

output:

100000
1 99999
1 99998
1 99997
1 99996
1 99995
1 99994
1 99993
1 99992
1 99991
1 99990
1 99989
1 99988
1 99987
1 99986
1 99985
1 99984
1 99983
1 99982
1 99981
1 99980
1 99979
1 99978
1 99977
1 99976
1 99975
1 99974
1 99973
1 99972
1 99971
1 99970
1 99969
1 99968
1 99967
1 99966
1 99965
1 99964
1 999...

result:

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

Test #7:

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

input:

34535 99889

output:

134423
17268 82621
17268 82620
17268 82619
17268 82618
17268 82617
17268 82616
17268 82615
17268 82614
17268 82613
17268 82612
17268 82611
17268 82610
17268 82609
17268 82608
17268 82607
17268 82606
17268 82605
17268 82604
17268 82603
17268 82602
17268 82601
17268 82600
17268 82599
17268 82598
17268...

result:

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

Test #8:

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

input:

12231 97889

output:

110119
6116 91773
6116 91772
6116 91771
6116 91770
6116 91769
6116 91768
6116 91767
6116 91766
6116 91765
6116 91764
6116 91763
6116 91762
6116 91761
6116 91760
6116 91759
6116 91758
6116 91757
6116 91756
6116 91755
6116 91754
6116 91753
6116 91752
6116 91751
6116 91750
6116 91749
6116 91748
6116 91...

result:

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

Test #9:

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

input:

10000 100000

output:

109998
5001 94999
5000 94999
5001 94997
5000 94997
5001 94995
5000 94995
5001 94993
5000 94993
5001 94991
5000 94991
5001 94989
5000 94989
5001 94987
5000 94987
5001 94985
5000 94985
5001 94983
5000 94983
5001 94981
5000 94981
5001 94979
5000 94979
5001 94977
5000 94977
5001 94975
5000 94975
5001 94...

result:

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

Test #10:

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

input:

13 99999

output:

100011
7 99992
7 99991
7 99990
7 99989
7 99988
7 99987
7 99986
7 99985
7 99984
7 99983
7 99982
7 99981
7 99980
7 99979
7 99978
7 99977
7 99976
7 99975
7 99974
7 99973
7 99972
7 99971
7 99970
7 99969
7 99968
7 99967
7 99966
7 99965
7 99964
7 99963
7 99962
7 99961
7 99960
7 99959
7 99958
7 99957
7 999...

result:

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

Test #11:

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

input:

21 99999

output:

100019
11 99988
11 99987
11 99986
11 99985
11 99984
11 99983
11 99982
11 99981
11 99980
11 99979
11 99978
11 99977
11 99976
11 99975
11 99974
11 99973
11 99972
11 99971
11 99970
11 99969
11 99968
11 99967
11 99966
11 99965
11 99964
11 99963
11 99962
11 99961
11 99960
11 99959
11 99958
11 99957
11 99...

result:

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

Test #12:

score: 0
Accepted
time: 23ms
memory: 15252kb

input:

49999 100000

output:

149998
25000 75000
25000 74999
25000 74998
25000 74997
25000 74996
25000 74995
25000 74994
25000 74993
25000 74992
25000 74991
25000 74990
25000 74989
25000 74988
25000 74987
25000 74986
25000 74985
25000 74984
25000 74983
25000 74982
25000 74981
25000 74980
25000 74979
25000 74978
25000 74977
25000...

result:

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

Test #13:

score: 0
Accepted
time: 23ms
memory: 14120kb

input:

33333 99999

output:

133331
16667 83332
16667 83331
16667 83330
16667 83329
16667 83328
16667 83327
16667 83326
16667 83325
16667 83324
16667 83323
16667 83322
16667 83321
16667 83320
16667 83319
16667 83318
16667 83317
16667 83316
16667 83315
16667 83314
16667 83313
16667 83312
16667 83311
16667 83310
16667 83309
16667...

result:

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

Test #14:

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

input:

23342 98876

output:

122216
11672 87203
11671 87203
11672 87201
11671 87201
11672 87199
11671 87199
11672 87197
11671 87197
11672 87195
11671 87195
11672 87193
11671 87193
11672 87191
11671 87191
11672 87189
11671 87189
11672 87187
11671 87187
11672 87185
11671 87185
11672 87183
11671 87183
11672 87181
11671 87181
11672...

result:

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

Test #15:

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

input:

56713 91234

output:

147946
28357 62877
28357 62876
28357 62875
28357 62874
28357 62873
28357 62872
28357 62871
28357 62870
28357 62869
28357 62868
28357 62867
28357 62866
28357 62865
28357 62864
28357 62863
28357 62862
28357 62861
28357 62860
28357 62859
28357 62858
28357 62857
28357 62856
28357 62855
28357 62854
28357...

result:

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

Test #16:

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

input:

99995 99995

output:

199988
99994 99995
99994 1
99993 99995
99993 1
99992 99995
99992 1
99991 99995
99991 1
99990 99995
99990 1
99989 99995
99989 1
99988 99995
99988 1
99987 99995
99987 1
99986 99995
99986 1
99985 99995
99985 1
99984 99995
99984 1
99983 99995
99983 1
99982 99995
99982 1
99981 99995
99981 1
99980 99995
9...

result:

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

Test #17:

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

input:

12345 54321

output:

66665
6173 48148
6173 48147
6173 48146
6173 48145
6173 48144
6173 48143
6173 48142
6173 48141
6173 48140
6173 48139
6173 48138
6173 48137
6173 48136
6173 48135
6173 48134
6173 48133
6173 48132
6173 48131
6173 48130
6173 48129
6173 48128
6173 48127
6173 48126
6173 48125
6173 48124
6173 48123
6173 481...

result:

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

Test #18:

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

input:

90000 92000

output:

181998
45001 46999
45000 46999
45001 46997
45000 46997
45001 46995
45000 46995
45001 46993
45000 46993
45001 46991
45000 46991
45001 46989
45000 46989
45001 46987
45000 46987
45001 46985
45000 46985
45001 46983
45000 46983
45001 46981
45000 46981
45001 46979
45000 46979
45001 46977
45000 46977
45001...

result:

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

Test #19:

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

input:

10000 70000

output:

79998
5001 64999
5000 64999
5001 64997
5000 64997
5001 64995
5000 64995
5001 64993
5000 64993
5001 64991
5000 64991
5001 64989
5000 64989
5001 64987
5000 64987
5001 64985
5000 64985
5001 64983
5000 64983
5001 64981
5000 64981
5001 64979
5000 64979
5001 64977
5000 64977
5001 64975
5000 64975
5001 649...

result:

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

Test #20:

score: -100
Wrong Answer
time: 16ms
memory: 9596kb

input:

10000 70001

output:

79998
5001 64999
5000 64999
5001 64997
5000 64997
5001 64995
5000 64995
5001 64993
5000 64993
5001 64991
5000 64991
5001 64989
5000 64989
5001 64987
5000 64987
5001 64985
5000 64985
5001 64983
5000 64983
5001 64981
5000 64981
5001 64979
5000 64979
5001 64977
5000 64977
5001 64975
5000 64975
5001 649...

result:

wrong answer Participant's answer is not optimal (79998 < 80000)