QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#172310 | #7178. Bishops | ucup-team407# | AC ✓ | 17ms | 7720kb | C++14 | 1.4kb | 2023-09-09 18:45:02 | 2023-09-09 18:45:04 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3808kb
input:
2 5
output:
6 2 1 1 1 2 3 1 3 2 5 1 5
result:
ok n: 2, m: 5, bishops: 6
Test #2:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
5 5
output:
8 1 2 1 3 1 4 5 1 5 2 5 3 5 4 5 5
result:
ok n: 5, m: 5, bishops: 8
Test #3:
score: 0
Accepted
time: 13ms
memory: 5344kb
input:
100000 100000
output:
199998 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 61 1...
result:
ok n: 100000, m: 100000, bishops: 199998
Test #4:
score: 0
Accepted
time: 14ms
memory: 6096kb
input:
100000 99999
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: 99999, bishops: 199998
Test #5:
score: 0
Accepted
time: 9ms
memory: 5452kb
input:
100000 50000
output:
149998 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: 50000, bishops: 149998
Test #6:
score: 0
Accepted
time: 3ms
memory: 5572kb
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: 17ms
memory: 7404kb
input:
34535 99889
output:
134423 34535 1 34534 1 34533 1 34532 1 34531 1 34530 1 34529 1 34528 1 34527 1 34526 1 34525 1 34524 1 34523 1 34522 1 34521 1 34520 1 34519 1 34518 1 34517 1 34516 1 34515 1 34514 1 34513 1 34512 1 34511 1 34510 1 34509 1 34508 1 34507 1 34506 1 34505 1 34504 1 34503 1 34502 1 34501 1 34500 1 34499...
result:
ok n: 34535, m: 99889, bishops: 134423
Test #8:
score: 0
Accepted
time: 14ms
memory: 5728kb
input:
12231 97889
output:
110119 12231 1 12230 1 12229 1 12228 1 12227 1 12226 1 12225 1 12224 1 12223 1 12222 1 12221 1 12220 1 12219 1 12218 1 12217 1 12216 1 12215 1 12214 1 12213 1 12212 1 12211 1 12210 1 12209 1 12208 1 12207 1 12206 1 12205 1 12204 1 12203 1 12202 1 12201 1 12200 1 12199 1 12198 1 12197 1 12196 1 12195...
result:
ok n: 12231, m: 97889, bishops: 110119
Test #9:
score: 0
Accepted
time: 13ms
memory: 5668kb
input:
10000 100000
output:
109998 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 ...
result:
ok n: 10000, m: 100000, bishops: 109998
Test #10:
score: 0
Accepted
time: 11ms
memory: 5600kb
input:
13 99999
output:
100011 13 1 12 1 11 1 10 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 13 14 12 14 11 14 10 14 9 14 8 14 7 14 6 14 5 14 4 14 3 14 2 14 1 14 13 27 12 27 11 27 10 27 9 27 8 27 7 27 6 27 5 27 4 27 3 27 2 27 1 27 13 40 12 40 11 40 10 40 9 40 8 40 7 40 6 40 5 40 4 40 3 40 2 40 1 40 13 53 12 53 11 53 10 53 9 53 8...
result:
ok n: 13, m: 99999, bishops: 100011
Test #11:
score: 0
Accepted
time: 11ms
memory: 5492kb
input:
21 99999
output:
100019 21 1 20 1 19 1 18 1 17 1 16 1 15 1 14 1 13 1 12 1 11 1 10 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 21 22 20 22 19 22 18 22 17 22 16 22 15 22 14 22 13 22 12 22 11 22 10 22 9 22 8 22 7 22 6 22 5 22 4 22 3 22 2 22 1 22 21 43 20 43 19 43 18 43 17 43 16 43 15 43 14 43 13 43 12 43 11 43 10 43 9 43 8 4...
result:
ok n: 21, m: 99999, bishops: 100019
Test #12:
score: 0
Accepted
time: 12ms
memory: 7552kb
input:
49999 100000
output:
149998 49999 1 49998 1 49997 1 49996 1 49995 1 49994 1 49993 1 49992 1 49991 1 49990 1 49989 1 49988 1 49987 1 49986 1 49985 1 49984 1 49983 1 49982 1 49981 1 49980 1 49979 1 49978 1 49977 1 49976 1 49975 1 49974 1 49973 1 49972 1 49971 1 49970 1 49969 1 49968 1 49967 1 49966 1 49965 1 49964 1 49963...
result:
ok n: 49999, m: 100000, bishops: 149998
Test #13:
score: 0
Accepted
time: 5ms
memory: 7324kb
input:
33333 99999
output:
133331 33333 1 33332 1 33331 1 33330 1 33329 1 33328 1 33327 1 33326 1 33325 1 33324 1 33323 1 33322 1 33321 1 33320 1 33319 1 33318 1 33317 1 33316 1 33315 1 33314 1 33313 1 33312 1 33311 1 33310 1 33309 1 33308 1 33307 1 33306 1 33305 1 33304 1 33303 1 33302 1 33301 1 33300 1 33299 1 33298 1 33297...
result:
ok n: 33333, m: 99999, bishops: 133331
Test #14:
score: 0
Accepted
time: 16ms
memory: 5740kb
input:
23342 98876
output:
122216 23342 1 23341 1 23340 1 23339 1 23338 1 23337 1 23336 1 23335 1 23334 1 23333 1 23332 1 23331 1 23330 1 23329 1 23328 1 23327 1 23326 1 23325 1 23324 1 23323 1 23322 1 23321 1 23320 1 23319 1 23318 1 23317 1 23316 1 23315 1 23314 1 23313 1 23312 1 23311 1 23310 1 23309 1 23308 1 23307 1 23306...
result:
ok n: 23342, m: 98876, bishops: 122216
Test #15:
score: 0
Accepted
time: 9ms
memory: 7692kb
input:
56713 91234
output:
147946 56713 1 56712 1 56711 1 56710 1 56709 1 56708 1 56707 1 56706 1 56705 1 56704 1 56703 1 56702 1 56701 1 56700 1 56699 1 56698 1 56697 1 56696 1 56695 1 56694 1 56693 1 56692 1 56691 1 56690 1 56689 1 56688 1 56687 1 56686 1 56685 1 56684 1 56683 1 56682 1 56681 1 56680 1 56679 1 56678 1 56677...
result:
ok n: 56713, m: 91234, bishops: 147946
Test #16:
score: 0
Accepted
time: 11ms
memory: 5336kb
input:
99995 99995
output:
199988 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 61 1...
result:
ok n: 99995, m: 99995, bishops: 199988
Test #17:
score: 0
Accepted
time: 4ms
memory: 5212kb
input:
12345 54321
output:
66665 12345 1 12344 1 12343 1 12342 1 12341 1 12340 1 12339 1 12338 1 12337 1 12336 1 12335 1 12334 1 12333 1 12332 1 12331 1 12330 1 12329 1 12328 1 12327 1 12326 1 12325 1 12324 1 12323 1 12322 1 12321 1 12320 1 12319 1 12318 1 12317 1 12316 1 12315 1 12314 1 12313 1 12312 1 12311 1 12310 1 12309 ...
result:
ok n: 12345, m: 54321, bishops: 66665
Test #18:
score: 0
Accepted
time: 16ms
memory: 7720kb
input:
90000 92000
output:
181998 90000 1 89999 1 89998 1 89997 1 89996 1 89995 1 89994 1 89993 1 89992 1 89991 1 89990 1 89989 1 89988 1 89987 1 89986 1 89985 1 89984 1 89983 1 89982 1 89981 1 89980 1 89979 1 89978 1 89977 1 89976 1 89975 1 89974 1 89973 1 89972 1 89971 1 89970 1 89969 1 89968 1 89967 1 89966 1 89965 1 89964...
result:
ok n: 90000, m: 92000, bishops: 181998
Test #19:
score: 0
Accepted
time: 3ms
memory: 5344kb
input:
10000 70000
output:
79998 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 1...
result:
ok n: 10000, m: 70000, bishops: 79998
Test #20:
score: 0
Accepted
time: 8ms
memory: 5556kb
input:
10000 70001
output:
80000 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 1...
result:
ok n: 10000, m: 70001, bishops: 80000
Test #21:
score: 0
Accepted
time: 11ms
memory: 5672kb
input:
10000 80000
output:
89998 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 1...
result:
ok n: 10000, m: 80000, bishops: 89998
Test #22:
score: 0
Accepted
time: 8ms
memory: 5796kb
input:
10000 80001
output:
90000 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 1...
result:
ok n: 10000, m: 80001, bishops: 90000
Test #23:
score: 0
Accepted
time: 6ms
memory: 5596kb
input:
10000 80002
output:
90000 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 1...
result:
ok n: 10000, m: 80002, bishops: 90000
Test #24:
score: 0
Accepted
time: 10ms
memory: 5492kb
input:
10000 79999
output:
89998 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 1...
result:
ok n: 10000, m: 79999, bishops: 89998
Test #25:
score: 0
Accepted
time: 6ms
memory: 5504kb
input:
10000 79998
output:
89996 10000 1 9999 1 9998 1 9997 1 9996 1 9995 1 9994 1 9993 1 9992 1 9991 1 9990 1 9989 1 9988 1 9987 1 9986 1 9985 1 9984 1 9983 1 9982 1 9981 1 9980 1 9979 1 9978 1 9977 1 9976 1 9975 1 9974 1 9973 1 9972 1 9971 1 9970 1 9969 1 9968 1 9967 1 9966 1 9965 1 9964 1 9963 1 9962 1 9961 1 9960 1 9959 1...
result:
ok n: 10000, m: 79998, bishops: 89996
Test #26:
score: 0
Accepted
time: 13ms
memory: 5480kb
input:
11111 100000
output:
111110 11111 1 11110 1 11109 1 11108 1 11107 1 11106 1 11105 1 11104 1 11103 1 11102 1 11101 1 11100 1 11099 1 11098 1 11097 1 11096 1 11095 1 11094 1 11093 1 11092 1 11091 1 11090 1 11089 1 11088 1 11087 1 11086 1 11085 1 11084 1 11083 1 11082 1 11081 1 11080 1 11079 1 11078 1 11077 1 11076 1 11075...
result:
ok n: 11111, m: 100000, bishops: 111110
Test #27:
score: 0
Accepted
time: 1ms
memory: 3776kb
input:
1 1
output:
1 1 1
result:
ok n: 1, m: 1, bishops: 1
Extra Test:
score: 0
Extra Test Passed