QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#632043 | #9439. Aim High | ucup-team1134 | AC ✓ | 0ms | 3540kb | C++23 | 1.3kb | 2024-10-12 11:37:32 | 2024-10-12 11:37:34 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main(){
int Q;cin>>Q;
while(Q--){
int N;cin>>N;
if(N<=4){
vector<array<int,6>> ans;
auto ad=[&](int a,int b,int c,int d,int e,int f){
ans.push_back({a,b,c,d,e,f});
};
for(int q=0;q<2;q++){
ad(-4,-3,-3,-3,-3,-2);
ad(-4,-2,-3,-2,-3,-1);
ad(-3,-2,-2,-2,-2,-1);
ad(0,-2,-1,-2,-1,-1);
ad(-4,-1,-4,0,-3,0);
ad(-3,-1,-3,0,-2,0);
ad(-3,-1,-2,-1,-2,0);
ad(-2,-1,-1,-1,-1,0);
ad(0,-1,-1,-1,-1,0);
ad(-3,0,-2,0,-2,1);
ad(-2,0,-1,0,-1,1);
ad(-2,0,-1,0,-1,1);
ad(-1,0,0,0,0,1);
ad(-2,1,-1,1,-1,2);
ad(-1,1,0,1,0,2);
ad(-1,2,0,2,0,3);
}
for(int q=16;q<32;q++) for(int i=0;i<6;i+=2) ans[q][i]=1-ans[q][i];
ad(0,3,1,3,1,4);
cout<<33<<"\n";
for(auto s:ans){
for(int x:s) cout<<x<<" ";
cout<<"\n";
}
}else{
cout<<-1<<"\n";
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3540kb
input:
1 1
output:
33 -4 -3 -3 -3 -3 -2 -4 -2 -3 -2 -3 -1 -3 -2 -2 -2 -2 -1 0 -2 -1 -2 -1 -1 -4 -1 -4 0 -3 0 -3 -1 -3 0 -2 0 -3 -1 -2 -1 -2 0 -2 -1 -1 -1 -1 0 0 -1 -1 -1 -1 0 -3 0 -2 0 -2 1 -2 0 -1 0 -1 1 -2 0 -1 0 -1 1 -1 0 0 0 0 1 -2 1 -1 1 -1 2 -1 1 0 1 0 2 -1 2 0 2 0 3 5 -3 4 -3 4 -2 5 -2 4 -2 4 -...
result:
ok Output is valid. OK
Test #2:
score: 0
Accepted
time: 0ms
memory: 3480kb
input:
6 1 2 3 4 5 6
output:
33 -4 -3 -3 -3 -3 -2 -4 -2 -3 -2 -3 -1 -3 -2 -2 -2 -2 -1 0 -2 -1 -2 -1 -1 -4 -1 -4 0 -3 0 -3 -1 -3 0 -2 0 -3 -1 -2 -1 -2 0 -2 -1 -1 -1 -1 0 0 -1 -1 -1 -1 0 -3 0 -2 0 -2 1 -2 0 -1 0 -1 1 -2 0 -1 0 -1 1 -1 0 0 0 0 1 -2 1 -1 1 -1 2 -1 1 0 1 0 2 -1 2 0 2 0 3 5 -3 4 -3 4 -2 5 -2 4 -2 4 -...
result:
ok Output is valid. OK
Extra Test:
score: 0
Extra Test Passed