QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#180101 | #7178. Bishops | ucup-team1099 | AC ✓ | 19ms | 20728kb | C++20 | 1.1kb | 2023-09-15 15:41:11 | 2023-09-15 15:41:11 |
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: 0ms
memory: 3488kb
input:
2 5
output:
6 1 1 2 1 1 3 2 3 1 5 2 5
result:
ok n: 2, m: 5, bishops: 6
Test #2:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
5 5
output:
8 1 5 2 5 3 5 4 5 5 5 2 1 3 1 4 1
result:
ok n: 5, m: 5, bishops: 8
Test #3:
score: 0
Accepted
time: 15ms
memory: 5184kb
input:
100000 100000
output:
199998 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: 100000, m: 100000, bishops: 199998
Test #4:
score: 0
Accepted
time: 11ms
memory: 20728kb
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: 11ms
memory: 5164kb
input:
100000 50000
output:
149998 50000 1 50000 2 50000 3 50000 4 50000 5 50000 6 50000 7 50000 8 50000 9 50000 10 50000 11 50000 12 50000 13 50000 14 50000 15 50000 16 50000 17 50000 18 50000 19 50000 20 50000 21 50000 22 50000 23 50000 24 50000 25 50000 26 50000 27 50000 28 50000 29 50000 30 50000 31 50000 32 50000 33 50000...
result:
ok n: 100000, m: 50000, bishops: 149998
Test #6:
score: 0
Accepted
time: 13ms
memory: 19752kb
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: 14ms
memory: 5264kb
input:
34535 99889
output:
134423 1 1 1 2 3 1 3 2 5 1 5 2 1 7 2 7 3 7 4 7 5 7 12 1 12 2 12 3 12 4 12 5 12 6 12 7 19 1 19 2 19 3 19 4 19 5 19 6 19 7 26 1 26 2 26 3 26 4 26 5 26 6 26 7 33 1 33 2 33 3 33 4 33 5 33 6 33 7 1 40 2 40 3 40 4 40 5 40 6 40 7 40 8 40 9 40 10 40 11 40 12 40 13 40 14 40 15 40 16 40 17 40 18 40 19 40 20 4...
result:
ok n: 34535, m: 99889, bishops: 134423
Test #8:
score: 0
Accepted
time: 11ms
memory: 4164kb
input:
12231 97889
output:
110119 1 1 1 2 3 1 3 2 5 1 5 2 7 1 7 2 9 1 9 2 11 1 11 2 13 1 13 2 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 10 15 11 15 12 15 13 15 1 28 2 28 3 28 4 28 5 28 6 28 7 28 8 28 9 28 10 28 11 28 12 28 13 28 1 41 2 41 3 41 4 41 5 41 6 41 7 41 8 41 9 41 10 41 11 41 12 41 13 41 54 1 54 2 54 3 54 4 54 5 5...
result:
ok n: 12231, m: 97889, bishops: 110119
Test #9:
score: 0
Accepted
time: 11ms
memory: 4124kb
input:
10000 100000
output:
109998 1 10000 2 10000 3 10000 4 10000 5 10000 6 10000 7 10000 8 10000 9 10000 10 10000 11 10000 12 10000 13 10000 14 10000 15 10000 16 10000 17 10000 18 10000 19 10000 20 10000 21 10000 22 10000 23 10000 24 10000 25 10000 26 10000 27 10000 28 10000 29 10000 30 10000 31 10000 32 10000 33 10000 34 10...
result:
ok n: 10000, m: 100000, bishops: 109998
Test #10:
score: 0
Accepted
time: 7ms
memory: 5396kb
input:
13 99999
output:
100011 1 1 1 2 1 3 4 1 4 2 4 3 7 1 7 2 7 3 10 1 10 2 10 3 13 1 13 2 13 3 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 10 16 11 16 12 16 13 16 1 29 2 29 3 29 4 29 5 29 6 29 7 29 8 29 9 29 10 29 11 29 12 29 13 29 1 42 2 42 3 42 4 42 5 42 6 42 7 42 8 42 9 42 10 42 11 42 12 42 13 42 1 55 2 55 3 55 4 55 ...
result:
ok n: 13, m: 99999, bishops: 100011
Test #11:
score: 0
Accepted
time: 10ms
memory: 4852kb
input:
21 99999
output:
100019 1 1 1 6 2 1 2 6 3 1 3 6 2 3 2 4 1 9 2 9 3 9 1 12 2 12 3 12 1 15 2 15 3 15 1 18 2 18 3 18 21 1 21 2 21 3 21 4 21 5 21 6 21 7 21 8 21 9 21 10 21 11 21 12 21 13 21 14 21 15 21 16 21 17 21 18 1 39 2 39 3 39 4 39 5 39 6 39 7 39 8 39 9 39 10 39 11 39 12 39 13 39 14 39 15 39 16 39 17 39 18 39 19 39 ...
result:
ok n: 21, m: 99999, bishops: 100019
Test #12:
score: 0
Accepted
time: 17ms
memory: 9156kb
input:
49999 100000
output:
149998 1 1 1 2 3 1 3 2 5 1 5 2 7 1 7 2 9 1 9 2 11 1 11 2 13 1 13 2 15 1 15 2 17 1 17 2 19 1 19 2 21 1 21 2 23 1 23 2 25 1 25 2 27 1 27 2 29 1 29 2 31 1 31 2 33 1 33 2 35 1 35 2 37 1 37 2 39 1 39 2 41 1 41 2 43 1 43 2 45 1 45 2 47 1 47 2 49 1 49 2 51 1 51 2 53 1 53 2 55 1 55 2 57 1 57 2 59 1 59 2 61 ...
result:
ok n: 49999, m: 100000, bishops: 149998
Test #13:
score: 0
Accepted
time: 10ms
memory: 5312kb
input:
33333 99999
output:
133331 1 1 1 66666 2 1 2 66666 3 1 3 66666 4 1 4 66666 5 1 5 66666 6 1 6 66666 7 1 7 66666 8 1 8 66666 9 1 9 66666 10 1 10 66666 11 1 11 66666 12 1 12 66666 13 1 13 66666 14 1 14 66666 15 1 15 66666 16 1 16 66666 17 1 17 66666 18 1 18 66666 19 1 19 66666 20 1 20 66666 21 1 21 66666 22 1 22 66666 23 ...
result:
ok n: 33333, m: 99999, bishops: 133331
Test #14:
score: 0
Accepted
time: 6ms
memory: 4196kb
input:
23342 98876
output:
122216 2 1 2 2 4 1 4 2 6 1 6 2 8 1 8 2 10 1 10 2 12 1 12 2 14 1 14 2 16 1 16 2 18 1 18 2 20 1 20 2 22 1 22 2 24 1 24 2 26 1 26 2 28 1 28 2 1 30 2 30 3 30 4 30 5 30 6 30 7 30 8 30 9 30 10 30 11 30 12 30 13 30 14 30 15 30 16 30 17 30 18 30 19 30 20 30 21 30 22 30 23 30 24 30 25 30 26 30 27 30 28 30 58...
result:
ok n: 23342, m: 98876, bishops: 122216
Test #15:
score: 0
Accepted
time: 11ms
memory: 5520kb
input:
56713 91234
output:
147946 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 61...
result:
ok n: 56713, m: 91234, bishops: 147946
Test #16:
score: 0
Accepted
time: 19ms
memory: 5120kb
input:
99995 99995
output:
199988 1 99995 2 99995 3 99995 4 99995 5 99995 6 99995 7 99995 8 99995 9 99995 10 99995 11 99995 12 99995 13 99995 14 99995 15 99995 16 99995 17 99995 18 99995 19 99995 20 99995 21 99995 22 99995 23 99995 24 99995 25 99995 26 99995 27 99995 28 99995 29 99995 30 99995 31 99995 32 99995 33 99995 34 99...
result:
ok n: 99995, m: 99995, bishops: 199988
Test #17:
score: 0
Accepted
time: 3ms
memory: 4224kb
input:
12345 54321
output:
66665 1 1 1 6 2 1 2 6 3 1 3 6 2 3 2 4 1 9 2 9 3 9 1 12 2 12 3 12 1 15 2 15 3 15 18 1 18 2 18 3 18 4 18 5 18 6 18 7 18 8 18 9 18 10 18 11 18 12 18 13 18 14 18 15 33 1 33 2 33 3 33 4 33 5 33 6 33 7 33 8 33 9 33 10 33 11 33 12 33 13 33 14 33 15 48 1 48 2 48 3 48 4 48 5 48 6 48 7 48 8 48 9 48 10 48 11 4...
result:
ok n: 12345, m: 54321, bishops: 66665
Test #18:
score: 0
Accepted
time: 15ms
memory: 5256kb
input:
90000 92000
output:
181998 2000 1 2000 2 2000 3 2000 4 2000 5 2000 6 2000 7 2000 8 2000 9 2000 10 2000 11 2000 12 2000 13 2000 14 2000 15 2000 16 2000 17 2000 18 2000 19 2000 20 2000 21 2000 22 2000 23 2000 24 2000 25 2000 26 2000 27 2000 28 2000 29 2000 30 2000 31 2000 32 2000 33 2000 34 2000 35 2000 36 2000 37 2000 3...
result:
ok n: 90000, m: 92000, bishops: 181998
Test #19:
score: 0
Accepted
time: 8ms
memory: 4092kb
input:
10000 70000
output:
79998 1 10000 2 10000 3 10000 4 10000 5 10000 6 10000 7 10000 8 10000 9 10000 10 10000 11 10000 12 10000 13 10000 14 10000 15 10000 16 10000 17 10000 18 10000 19 10000 20 10000 21 10000 22 10000 23 10000 24 10000 25 10000 26 10000 27 10000 28 10000 29 10000 30 10000 31 10000 32 10000 33 10000 34 100...
result:
ok n: 10000, m: 70000, bishops: 79998
Test #20:
score: 0
Accepted
time: 9ms
memory: 5832kb
input:
10000 70001
output:
80000 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 61 ...
result:
ok n: 10000, m: 70001, bishops: 80000
Test #21:
score: 0
Accepted
time: 6ms
memory: 4136kb
input:
10000 80000
output:
89998 1 10000 2 10000 3 10000 4 10000 5 10000 6 10000 7 10000 8 10000 9 10000 10 10000 11 10000 12 10000 13 10000 14 10000 15 10000 16 10000 17 10000 18 10000 19 10000 20 10000 21 10000 22 10000 23 10000 24 10000 25 10000 26 10000 27 10000 28 10000 29 10000 30 10000 31 10000 32 10000 33 10000 34 100...
result:
ok n: 10000, m: 80000, bishops: 89998
Test #22:
score: 0
Accepted
time: 10ms
memory: 5676kb
input:
10000 80001
output:
90000 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 61 ...
result:
ok n: 10000, m: 80001, bishops: 90000
Test #23:
score: 0
Accepted
time: 6ms
memory: 5048kb
input:
10000 80002
output:
90000 2 1 2 2 4 1 4 2 6 1 6 2 8 1 8 2 10 1 10 2 12 1 12 2 14 1 14 2 16 1 16 2 18 1 18 2 20 1 20 2 22 1 22 2 24 1 24 2 26 1 26 2 28 1 28 2 30 1 30 2 32 1 32 2 34 1 34 2 36 1 36 2 38 1 38 2 40 1 40 2 42 1 42 2 44 1 44 2 46 1 46 2 48 1 48 2 50 1 50 2 52 1 52 2 54 1 54 2 56 1 56 2 58 1 58 2 60 1 60 2 62...
result:
ok n: 10000, m: 80002, bishops: 90000
Test #24:
score: 0
Accepted
time: 10ms
memory: 5752kb
input:
10000 79999
output:
89998 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 6...
result:
ok n: 10000, m: 79999, bishops: 89998
Test #25:
score: 0
Accepted
time: 9ms
memory: 4900kb
input:
10000 79998
output:
89996 1 2 2 2 1 4 2 4 1 6 2 6 1 8 2 8 1 10 2 10 1 12 2 12 1 14 2 14 1 16 2 16 1 18 2 18 1 20 2 20 1 22 2 22 1 24 2 24 1 26 2 26 1 28 2 28 1 30 2 30 1 32 2 32 1 34 2 34 1 36 2 36 1 38 2 38 1 40 2 40 1 42 2 42 1 44 2 44 1 46 2 46 1 48 2 48 1 50 2 50 1 52 2 52 1 54 2 54 1 56 2 56 1 58 2 58 1 60 2 60 1 ...
result:
ok n: 10000, m: 79998, bishops: 89996
Test #26:
score: 0
Accepted
time: 12ms
memory: 5932kb
input:
11111 100000
output:
111110 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 61...
result:
ok n: 11111, m: 100000, bishops: 111110
Test #27:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
1 1
output:
1 1 1
result:
ok n: 1, m: 1, bishops: 1
Extra Test:
score: 0
Extra Test Passed