QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#172027#7178. Bishopsucup-team026#AC ✓55ms12212kbC++203.7kb2023-09-09 17:57:592023-09-09 17:58:01

詳細信息

Test #1:

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

input:

2 5

output:

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

result:

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

Test #2:

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

input:

5 5

output:

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

result:

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

Test #3:

score: 0
Accepted
time: 39ms
memory: 12212kb

input:

100000 100000

output:

199998
100000 1
99998 1
99996 1
99994 1
99992 1
99990 1
99988 1
99986 1
99984 1
99982 1
99980 1
99978 1
99976 1
99974 1
99972 1
99970 1
99968 1
99966 1
99964 1
99962 1
99960 1
99958 1
99956 1
99954 1
99952 1
99950 1
99948 1
99946 1
99944 1
99942 1
99940 1
99938 1
99936 1
99934 1
99932 1
99930 1
9992...

result:

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

Test #4:

score: 0
Accepted
time: 44ms
memory: 11692kb

input:

100000 99999

output:

199998
100000 1
100000 3
100000 5
100000 7
100000 9
100000 11
100000 13
100000 15
100000 17
100000 19
100000 21
100000 23
100000 25
100000 27
100000 29
100000 31
100000 33
100000 35
100000 37
100000 39
100000 41
100000 43
100000 45
100000 47
100000 49
100000 51
100000 53
100000 55
100000 57
100000 5...

result:

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

Test #5:

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

input:

100000 50000

output:

149998
100000 1
100000 3
100000 5
100000 7
100000 9
100000 11
100000 13
100000 15
100000 17
100000 19
100000 21
100000 23
100000 25
100000 27
100000 29
100000 31
100000 33
100000 35
100000 37
100000 39
100000 41
100000 43
100000 45
100000 47
100000 49
100000 51
100000 53
100000 55
100000 57
100000 5...

result:

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

Test #6:

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

input:

1 100000

output:

100000
1 2
1 4
1 6
1 8
1 10
1 12
1 14
1 16
1 18
1 20
1 22
1 24
1 26
1 28
1 30
1 32
1 34
1 36
1 38
1 40
1 42
1 44
1 46
1 48
1 50
1 52
1 54
1 56
1 58
1 60
1 62
1 64
1 66
1 68
1 70
1 72
1 74
1 76
1 78
1 80
1 82
1 84
1 86
1 88
1 90
1 92
1 94
1 96
1 98
1 100
1 102
1 104
1 106
1 108
1 110
1 112
1 114
1 11...

result:

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

Test #7:

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

input:

34535 99889

output:

134423
34534 1
34532 1
34530 1
34528 1
34526 1
34524 1
34522 1
34520 1
34518 1
34516 1
34514 1
34512 1
34510 1
34508 1
34506 1
34504 1
34502 1
34500 1
34498 1
34496 1
34494 1
34492 1
34490 1
34488 1
34486 1
34484 1
34482 1
34480 1
34478 1
34476 1
34474 1
34472 1
34470 1
34468 1
34466 1
34464 1
34462...

result:

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

Test #8:

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

input:

12231 97889

output:

110119
12230 1
12228 1
12226 1
12224 1
12222 1
12220 1
12218 1
12216 1
12214 1
12212 1
12210 1
12208 1
12206 1
12204 1
12202 1
12200 1
12198 1
12196 1
12194 1
12192 1
12190 1
12188 1
12186 1
12184 1
12182 1
12180 1
12178 1
12176 1
12174 1
12172 1
12170 1
12168 1
12166 1
12164 1
12162 1
12160 1
12158...

result:

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

Test #9:

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

input:

10000 100000

output:

109998
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 ...

result:

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

Test #10:

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

input:

13 99999

output:

100011
12 1
10 1
8 1
6 1
4 1
2 1
7 8
7 10
7 12
7 14
7 16
7 18
7 20
7 22
7 24
7 26
7 28
7 30
7 32
7 34
7 36
7 38
7 40
7 42
7 44
7 46
7 48
7 50
7 52
7 54
7 56
7 58
7 60
7 62
7 64
7 66
7 68
7 70
7 72
7 74
7 76
7 78
7 80
7 82
7 84
7 86
7 88
7 90
7 92
7 94
7 96
7 98
7 100
7 102
7 104
7 106
7 108
7 110
7 ...

result:

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

Test #11:

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

input:

21 99999

output:

100019
20 1
18 1
16 1
14 1
12 1
10 1
8 1
6 1
4 1
2 1
11 12
11 14
11 16
11 18
11 20
11 22
11 24
11 26
11 28
11 30
11 32
11 34
11 36
11 38
11 40
11 42
11 44
11 46
11 48
11 50
11 52
11 54
11 56
11 58
11 60
11 62
11 64
11 66
11 68
11 70
11 72
11 74
11 76
11 78
11 80
11 82
11 84
11 86
11 88
11 90
11 92
1...

result:

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

Test #12:

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

input:

49999 100000

output:

149998
49998 1
49996 1
49994 1
49992 1
49990 1
49988 1
49986 1
49984 1
49982 1
49980 1
49978 1
49976 1
49974 1
49972 1
49970 1
49968 1
49966 1
49964 1
49962 1
49960 1
49958 1
49956 1
49954 1
49952 1
49950 1
49948 1
49946 1
49944 1
49942 1
49940 1
49938 1
49936 1
49934 1
49932 1
49930 1
49928 1
49926...

result:

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

Test #13:

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

input:

33333 99999

output:

133331
33332 1
33330 1
33328 1
33326 1
33324 1
33322 1
33320 1
33318 1
33316 1
33314 1
33312 1
33310 1
33308 1
33306 1
33304 1
33302 1
33300 1
33298 1
33296 1
33294 1
33292 1
33290 1
33288 1
33286 1
33284 1
33282 1
33280 1
33278 1
33276 1
33274 1
33272 1
33270 1
33268 1
33266 1
33264 1
33262 1
33260...

result:

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

Test #14:

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

input:

23342 98876

output:

122216
23342 1
23340 1
23338 1
23336 1
23334 1
23332 1
23330 1
23328 1
23326 1
23324 1
23322 1
23320 1
23318 1
23316 1
23314 1
23312 1
23310 1
23308 1
23306 1
23304 1
23302 1
23300 1
23298 1
23296 1
23294 1
23292 1
23290 1
23288 1
23286 1
23284 1
23282 1
23280 1
23278 1
23276 1
23274 1
23272 1
23270...

result:

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

Test #15:

score: 0
Accepted
time: 29ms
memory: 10824kb

input:

56713 91234

output:

147946
56712 1
56710 1
56708 1
56706 1
56704 1
56702 1
56700 1
56698 1
56696 1
56694 1
56692 1
56690 1
56688 1
56686 1
56684 1
56682 1
56680 1
56678 1
56676 1
56674 1
56672 1
56670 1
56668 1
56666 1
56664 1
56662 1
56660 1
56658 1
56656 1
56654 1
56652 1
56650 1
56648 1
56646 1
56644 1
56642 1
56640...

result:

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

Test #16:

score: 0
Accepted
time: 55ms
memory: 12204kb

input:

99995 99995

output:

199988
99994 1
99992 1
99990 1
99988 1
99986 1
99984 1
99982 1
99980 1
99978 1
99976 1
99974 1
99972 1
99970 1
99968 1
99966 1
99964 1
99962 1
99960 1
99958 1
99956 1
99954 1
99952 1
99950 1
99948 1
99946 1
99944 1
99942 1
99940 1
99938 1
99936 1
99934 1
99932 1
99930 1
99928 1
99926 1
99924 1
99922...

result:

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

Test #17:

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

input:

12345 54321

output:

66665
12344 1
12342 1
12340 1
12338 1
12336 1
12334 1
12332 1
12330 1
12328 1
12326 1
12324 1
12322 1
12320 1
12318 1
12316 1
12314 1
12312 1
12310 1
12308 1
12306 1
12304 1
12302 1
12300 1
12298 1
12296 1
12294 1
12292 1
12290 1
12288 1
12286 1
12284 1
12282 1
12280 1
12278 1
12276 1
12274 1
12272 ...

result:

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

Test #18:

score: 0
Accepted
time: 44ms
memory: 11880kb

input:

90000 92000

output:

181998
90000 1
89998 1
89996 1
89994 1
89992 1
89990 1
89988 1
89986 1
89984 1
89982 1
89980 1
89978 1
89976 1
89974 1
89972 1
89970 1
89968 1
89966 1
89964 1
89962 1
89960 1
89958 1
89956 1
89954 1
89952 1
89950 1
89948 1
89946 1
89944 1
89942 1
89940 1
89938 1
89936 1
89934 1
89932 1
89930 1
89928...

result:

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

Test #19:

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

input:

10000 70000

output:

79998
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 1...

result:

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

Test #20:

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

input:

10000 70001

output:

80000
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 1...

result:

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

Test #21:

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

input:

10000 80000

output:

89998
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 1...

result:

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

Test #22:

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

input:

10000 80001

output:

90000
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 1...

result:

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

Test #23:

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

input:

10000 80002

output:

90000
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 1...

result:

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

Test #24:

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

input:

10000 79999

output:

89998
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 1...

result:

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

Test #25:

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

input:

10000 79998

output:

89996
10000 1
9998 1
9996 1
9994 1
9992 1
9990 1
9988 1
9986 1
9984 1
9982 1
9980 1
9978 1
9976 1
9974 1
9972 1
9970 1
9968 1
9966 1
9964 1
9962 1
9960 1
9958 1
9956 1
9954 1
9952 1
9950 1
9948 1
9946 1
9944 1
9942 1
9940 1
9938 1
9936 1
9934 1
9932 1
9930 1
9928 1
9926 1
9924 1
9922 1
9920 1
9918 1...

result:

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

Test #26:

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

input:

11111 100000

output:

111110
11110 1
11108 1
11106 1
11104 1
11102 1
11100 1
11098 1
11096 1
11094 1
11092 1
11090 1
11088 1
11086 1
11084 1
11082 1
11080 1
11078 1
11076 1
11074 1
11072 1
11070 1
11068 1
11066 1
11064 1
11062 1
11060 1
11058 1
11056 1
11054 1
11052 1
11050 1
11048 1
11046 1
11044 1
11042 1
11040 1
11038...

result:

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

Test #27:

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

input:

1 1

output:

1
1 1

result:

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

Extra Test:

score: 0
Extra Test Passed