QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#629188#9428. Be PositiveKIRITO1211#WA 1ms3656kbC++23780b2024-10-11 08:31:442024-10-11 08:31:44

Judging History

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

  • [2024-10-11 08:31:44]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3656kb
  • [2024-10-11 08:31:44]
  • 提交

answer

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define int long long
using ll = long long;
using i64 = long long;
const int mod = 998244353;
// #define DEBUG

// 线段树合并信息

void solve() {
    int n;std::cin>>n;
    if(n % 4 == 0 || n == 1){
        std::cout<<"impossible\n";
        return;
    }
    int tp = n / 4 + 1;
    std::cout<<tp<<' ';
    for(int i = 0;i < n;i++){
        if(i == tp) continue;
        std::cout<<i<<' ';
    }
    std::cout<<'\n';
}

signed main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    int t = 1;
    // int res = 0;
    // for(int i = 1;i <= 1145;i++) res |= i;
    // std::cerr<<res<<'\n';
    std::cin>>t;
    while (t--) {
        solve();
    }
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3588kb

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: 3656kb

input:

10
1
2
3
4
5
6
7
8
9
10

output:

impossible
1 0 
1 0 2 
impossible
2 0 1 3 4 
2 0 1 3 4 5 
2 0 1 3 4 5 6 
impossible
3 0 1 2 4 5 6 7 8 
3 0 1 2 4 5 6 7 8 9 

result:

wrong answer xor equals zero (test case 5)