QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#623424 | #9428. Be Positive | pmh_ | WA | 0ms | 3648kb | C++14 | 488b | 2024-10-09 11:54:01 | 2024-10-09 11:54:02 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t; cin >> t;
while (t--)
{
int n;
cin >> n;
if (n>1 && n%4)
{
cout << 1 << ' ' << 0 << ' ';
for (int i=2; i<n; ++i)
if (i!=3) cout << i << ' ';
if (n>3) cout << 3;
cout << '\n';
}
else cout << "impossible\n";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
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: 3648kb
input:
10 1 2 3 4 5 6 7 8 9 10
output:
impossible 1 0 1 0 2 impossible 1 0 2 4 3 1 0 2 4 5 3 1 0 2 4 5 6 3 impossible 1 0 2 4 5 6 7 8 3 1 0 2 4 5 6 7 8 9 3
result:
wrong answer Jury has better answer (test case 6)