QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#401983 | #5528. Least Annoying Constructive Problem | ando# | WA | 0ms | 3628kb | C++14 | 709b | 2024-04-29 18:12:30 | 2024-04-29 18:12:31 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif
typedef long long ll;
typedef unsigned long long ull;
const int N = 2e6 + 10, MOD = 998244353;
const ll INF = 1e18;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int n; cin >> n;
int k = n / 2, tot = n;
if (n % 2 == 0) k--, tot--;
for (int i = 0; i < tot; i++) {
for (int j = 1; j <= k; j++) {
cout << (i - j + 1 + tot) % tot + 1 << ' ' << (i + j) % tot + 1 << '\n';
}
if (n % 2 == 0) cout << (i + (tot + 1) / 2) % tot + 1 << ' ' << n << '\n';
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
input:
3
output:
1 2 2 3 3 1
result:
wrong answer Integer 1 violates the range [4, 3]