QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#629188 | #9428. Be Positive | KIRITO1211# | WA | 1ms | 3656kb | C++23 | 780b | 2024-10-11 08:31:44 | 2024-10-11 08:31:44 |
Judging History
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)