QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#623424#9428. Be Positivepmh_WA 0ms3648kbC++14488b2024-10-09 11:54:012024-10-09 11:54:02

Judging History

你现在查看的是最新测评结果

  • [2024-10-09 11:54:02]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3648kb
  • [2024-10-09 11:54:01]
  • 提交

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)