QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#522228 | #4325. Kraljice | Physics212303 | 100 ✓ | 80ms | 13556kb | C++17 | 1.1kb | 2024-08-16 19:56:30 | 2024-08-16 19:56:31 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
int n; cin>>n;
vector<bool> a(n),b(n),c(n<<1),d(n<<1);
vector v(n,vector<bool>(n));
vector<pair<int,int> > r;
auto op=[&](int x,int y){
if(!v[x][y]&&!(a[x]^b[y]^c[x+y]^d[x-y+n])){
r.emplace_back(x,y),v[x][y]=true;
a[x]=!a[x],b[y]=!b[y],c[x+y]=!c[x+y],d[x-y+n]=!d[x-y+n];
}
};
function<void(int)> solve=[&](int n){
if(n<=2)return op(0,0);
if(n&1){
solve(n-2);
for(int i=0;i<n-3;i++)
op(i,n-2),op(i,n-1),op(i,n-2),op(n-2,i),op(n-1,i),op(n-2,i);
op(n-2,n-1),op(n-2,n-2),op(n-1,n-3),op(n-3,n-1);
op(n-3,n-2),op(n-1,n-2),op(n-2,n-3),op(n-1,n-1);
}
else{
solve(n-3),op(n-2,n-1);
for(int r=0;r<3;r++)
for(int i=0;i<n-3;i++)
for(int j=n-3;j<n;j++)
op(i,j),op(j,i),op(i,j);
op(n-3,n-1),op(n-3,n-3),op(n-1,n-2);
op(n-2,n-3),op(n-2,n-2),op(n-1,n-1);
}
};
solve(n),cout<<r.size()<<endl;
for(auto [x,y]:r)cout<<x+1<<' '<<y+1<<'\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 0ms
memory: 3552kb
input:
1
output:
1 1 1
result:
ok 1 queen(s)
Test #2:
score: 6
Accepted
time: 0ms
memory: 3800kb
input:
2
output:
1 1 1
result:
ok 1 queen(s)
Test #3:
score: 6
Accepted
time: 0ms
memory: 3840kb
input:
3
output:
9 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3
result:
ok 9 queen(s)
Test #4:
score: 6
Accepted
time: 0ms
memory: 3804kb
input:
4
output:
14 1 1 3 4 1 2 2 1 1 3 3 1 1 4 4 1 2 4 2 2 4 3 3 2 3 3 4 4
result:
ok 14 queen(s)
Test #5:
score: 6
Accepted
time: 0ms
memory: 3608kb
input:
5
output:
25 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5
result:
ok 25 queen(s)
Test #6:
score: 6
Accepted
time: 0ms
memory: 3544kb
input:
6
output:
34 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 5 6 1 5 5 1 6 1 1 6 2 5 5 2 6 2 2 6 3 4 4 3 5 3 3 5 6 3 3 6 1 4 2 4 4 2 4 1 4 6 4 4 6 5 5 4 5 5 6 6
result:
ok 34 queen(s)
Test #7:
score: 6
Accepted
time: 0ms
memory: 3768kb
input:
7
output:
49 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7
result:
ok 49 queen(s)
Test #8:
score: 6
Accepted
time: 0ms
memory: 3488kb
input:
8
output:
62 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 7 8 1 7 7 1 8 1 1 8 2 7 7 2 2 8 8 2 7 3 3 7 3 8 8 3 4 7 7 4 4 8 8 4 5 6 6 5 7 5 5 7 8 5 5 8 1 6 6 2 2 6 3 6 6 3 4 6 6 4 6 1 6 8 6 6 8 7 7 6 7 7 8 8
result:
ok 62 queen(s)
Test #9:
score: 6
Accepted
time: 0ms
memory: 3804kb
input:
9
output:
81 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 8...
result:
ok 81 queen(s)
Test #10:
score: 6
Accepted
time: 0ms
memory: 3648kb
input:
10
output:
98 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 9 10 1 9 9 1 10 1 1 10 2 9 9 2 2 10 10 2 9 3 3 9 3 10 10 3 4 9 9 4 10 4 4 10 9 5 5 9 5 10 10 5 6 9 9 ...
result:
ok 98 queen(s)
Test #11:
score: 6
Accepted
time: 0ms
memory: 3544kb
input:
11
output:
121 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 121 queen(s)
Test #12:
score: 6
Accepted
time: 0ms
memory: 3608kb
input:
12
output:
142 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 142 queen(s)
Test #13:
score: 6
Accepted
time: 0ms
memory: 3840kb
input:
13
output:
169 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 169 queen(s)
Test #14:
score: 6
Accepted
time: 0ms
memory: 3768kb
input:
14
output:
194 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 194 queen(s)
Test #15:
score: 6
Accepted
time: 0ms
memory: 3604kb
input:
15
output:
225 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 225 queen(s)
Test #16:
score: 6
Accepted
time: 0ms
memory: 3652kb
input:
16
output:
254 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 254 queen(s)
Subtask #2:
score: 11
Accepted
Dependency #1:
100%
Accepted
Test #17:
score: 11
Accepted
time: 0ms
memory: 3552kb
input:
5
output:
25 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5
result:
ok 25 queen(s)
Test #18:
score: 11
Accepted
time: 1ms
memory: 3552kb
input:
54
output:
2914 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 2914 queen(s)
Test #19:
score: 11
Accepted
time: 0ms
memory: 3612kb
input:
19
output:
361 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 361 queen(s)
Test #20:
score: 11
Accepted
time: 1ms
memory: 3640kb
input:
44
output:
1934 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 1934 queen(s)
Test #21:
score: 11
Accepted
time: 0ms
memory: 3664kb
input:
27
output:
729 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 729 queen(s)
Test #22:
score: 11
Accepted
time: 1ms
memory: 3620kb
input:
58
output:
3362 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 3362 queen(s)
Test #23:
score: 11
Accepted
time: 0ms
memory: 3676kb
input:
51
output:
2601 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 2601 queen(s)
Test #24:
score: 11
Accepted
time: 0ms
memory: 3548kb
input:
8
output:
62 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 7 8 1 7 7 1 8 1 1 8 2 7 7 2 2 8 8 2 7 3 3 7 3 8 8 3 4 7 7 4 4 8 8 4 5 6 6 5 7 5 5 7 8 5 5 8 1 6 6 2 2 6 3 6 6 3 4 6 6 4 6 1 6 8 6 6 8 7 7 6 7 7 8 8
result:
ok 62 queen(s)
Test #25:
score: 11
Accepted
time: 0ms
memory: 3808kb
input:
15
output:
225 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 225 queen(s)
Test #26:
score: 11
Accepted
time: 0ms
memory: 3548kb
input:
4
output:
14 1 1 3 4 1 2 2 1 1 3 3 1 1 4 4 1 2 4 2 2 4 3 3 2 3 3 4 4
result:
ok 14 queen(s)
Test #27:
score: 11
Accepted
time: 1ms
memory: 3616kb
input:
57
output:
3249 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 3249 queen(s)
Test #28:
score: 11
Accepted
time: 1ms
memory: 3872kb
input:
58
output:
3362 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 3362 queen(s)
Test #29:
score: 11
Accepted
time: 1ms
memory: 3664kb
input:
61
output:
3721 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 3721 queen(s)
Test #30:
score: 11
Accepted
time: 1ms
memory: 3688kb
input:
62
output:
3842 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 3842 queen(s)
Test #31:
score: 11
Accepted
time: 1ms
memory: 3924kb
input:
63
output:
3969 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 3969 queen(s)
Test #32:
score: 11
Accepted
time: 1ms
memory: 3616kb
input:
64
output:
4094 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 4094 queen(s)
Subtask #3:
score: 28
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #33:
score: 28
Accepted
time: 1ms
memory: 3560kb
input:
61
output:
3721 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 3721 queen(s)
Test #34:
score: 28
Accepted
time: 0ms
memory: 3828kb
input:
10
output:
98 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 9 10 1 9 9 1 10 1 1 10 2 9 9 2 2 10 10 2 9 3 3 9 3 10 10 3 4 9 9 4 10 4 4 10 9 5 5 9 5 10 10 5 6 9 9 ...
result:
ok 98 queen(s)
Test #35:
score: 28
Accepted
time: 2ms
memory: 3696kb
input:
157
output:
24649 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 24649 queen(s)
Test #36:
score: 28
Accepted
time: 0ms
memory: 3556kb
input:
12
output:
142 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 142 queen(s)
Test #37:
score: 28
Accepted
time: 1ms
memory: 3984kb
input:
91
output:
8281 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 8281 queen(s)
Test #38:
score: 28
Accepted
time: 1ms
memory: 3944kb
input:
84
output:
7054 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 7054 queen(s)
Test #39:
score: 28
Accepted
time: 0ms
memory: 3636kb
input:
33
output:
1089 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 1089 queen(s)
Test #40:
score: 28
Accepted
time: 1ms
memory: 3980kb
input:
94
output:
8834 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9...
result:
ok 8834 queen(s)
Test #41:
score: 28
Accepted
time: 4ms
memory: 3820kb
input:
205
output:
42025 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 42025 queen(s)
Test #42:
score: 28
Accepted
time: 0ms
memory: 3768kb
input:
4
output:
14 1 1 3 4 1 2 2 1 1 3 3 1 1 4 4 1 2 4 2 2 4 3 3 2 3 3 4 4
result:
ok 14 queen(s)
Test #43:
score: 28
Accepted
time: 5ms
memory: 3768kb
input:
237
output:
56169 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 56169 queen(s)
Test #44:
score: 28
Accepted
time: 5ms
memory: 3792kb
input:
228
output:
51982 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 51982 queen(s)
Test #45:
score: 28
Accepted
time: 5ms
memory: 3916kb
input:
245
output:
60025 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 60025 queen(s)
Test #46:
score: 28
Accepted
time: 6ms
memory: 3772kb
input:
252
output:
63502 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 63502 queen(s)
Test #47:
score: 28
Accepted
time: 6ms
memory: 3912kb
input:
255
output:
65025 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 65025 queen(s)
Test #48:
score: 28
Accepted
time: 3ms
memory: 3916kb
input:
256
output:
65534 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 65534 queen(s)
Subtask #4:
score: 55
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Test #49:
score: 55
Accepted
time: 0ms
memory: 3568kb
input:
27
output:
729 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 9 ...
result:
ok 729 queen(s)
Test #50:
score: 55
Accepted
time: 15ms
memory: 5388kb
input:
408
output:
166462 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8...
result:
ok 166462 queen(s)
Test #51:
score: 55
Accepted
time: 40ms
memory: 13204kb
input:
747
output:
558009 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8...
result:
ok 558009 queen(s)
Test #52:
score: 55
Accepted
time: 0ms
memory: 3992kb
input:
208
output:
43262 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 43262 queen(s)
Test #53:
score: 55
Accepted
time: 14ms
memory: 5260kb
input:
457
output:
208849 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8...
result:
ok 208849 queen(s)
Test #54:
score: 55
Accepted
time: 38ms
memory: 13136kb
input:
730
output:
532898 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8...
result:
ok 532898 queen(s)
Test #55:
score: 55
Accepted
time: 22ms
memory: 5344kb
input:
509
output:
259081 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8...
result:
ok 259081 queen(s)
Test #56:
score: 55
Accepted
time: 1ms
memory: 3740kb
input:
112
output:
12542 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 12542 queen(s)
Test #57:
score: 55
Accepted
time: 2ms
memory: 3672kb
input:
119
output:
14161 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8 ...
result:
ok 14161 queen(s)
Test #58:
score: 55
Accepted
time: 0ms
memory: 3804kb
input:
4
output:
14 1 1 3 4 1 2 2 1 1 3 3 1 1 4 4 1 2 4 2 2 4 3 3 2 3 3 4 4
result:
ok 14 queen(s)
Test #59:
score: 55
Accepted
time: 68ms
memory: 12400kb
input:
953
output:
908209 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8...
result:
ok 908209 queen(s)
Test #60:
score: 55
Accepted
time: 68ms
memory: 13180kb
input:
1004
output:
1008014 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 ...
result:
ok 1008014 queen(s)
Test #61:
score: 55
Accepted
time: 75ms
memory: 12528kb
input:
1021
output:
1042441 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 ...
result:
ok 1042441 queen(s)
Test #62:
score: 55
Accepted
time: 74ms
memory: 13556kb
input:
948
output:
898702 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 8...
result:
ok 898702 queen(s)
Test #63:
score: 55
Accepted
time: 67ms
memory: 13500kb
input:
1023
output:
1046529 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 ...
result:
ok 1046529 queen(s)
Test #64:
score: 55
Accepted
time: 80ms
memory: 13352kb
input:
1024
output:
1048574 1 1 2 3 2 2 3 1 1 3 1 2 3 2 2 1 3 3 1 5 1 4 4 1 5 1 2 4 2 5 5 2 4 2 4 5 4 4 5 3 3 5 3 4 5 4 4 3 5 5 1 7 1 6 6 1 7 1 2 6 2 7 7 2 6 2 3 7 3 6 6 3 7 3 4 6 4 7 7 4 6 4 6 7 6 6 7 5 5 7 5 6 7 6 6 5 7 7 1 9 1 8 8 1 9 1 2 8 2 9 9 2 8 2 3 9 3 8 8 3 9 3 4 8 4 9 9 4 8 4 5 9 5 8 8 5 9 5 6 8 6 9 9 6 8 6 ...
result:
ok 1048574 queen(s)
Extra Test:
score: 0
Extra Test Passed