QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#769894 | #9428. Be Positive | syhhh1 | WA | 0ms | 3692kb | C++17 | 363b | 2024-11-21 19:47:54 | 2024-11-21 19:47:55 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
int ans=0;
for(int i=0;i<n;i++)
{
ans=ans^i;
}
if(ans==0)cout<<"impossible"<<endl;
else{
cout<<1<<" "<<0<<" ";
for(int i=2;i<n;i++)cout<<i<<" ";
cout<<endl;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3544kb
input:
4 1 2 3 4
output:
impossible 1 0 1 0 2 impossible
result:
ok 4 test cases (4 test cases)
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3692kb
input:
10 1 2 3 4 5 6 7 8 9 10
output:
impossible 1 0 1 0 2 impossible 1 0 2 3 4 1 0 2 3 4 5 1 0 2 3 4 5 6 impossible 1 0 2 3 4 5 6 7 8 1 0 2 3 4 5 6 7 8 9
result:
wrong answer xor equals zero (test case 5)