QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#84967 | #5528. Least Annoying Constructive Problem | Ignotus | WA | 1ms | 3424kb | C++14 | 403b | 2023-03-06 21:23:55 | 2023-03-06 21:24:31 |
Judging History
answer
#include <bits/stdc++.h>
int n;
bool ev;
void add(int x, int y){
x = (x + n) % n, y = (y + n) % n;
if(x > y) std::swap(x, y);
std::cout << x << " " << y << '\n';
}
int main(){
std::ios::sync_with_stdio(false);
std::cin >> n;
if(n % 2 == 0) ev = 1, --n;
for(int i = 0; i < n; ++i){
if(ev) add(i, n - 1);
for(int j = 1; j <= n / 2; ++j) add(i - j, i + j);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3424kb
input:
3
output:
1 2 0 2 0 1
result:
wrong answer Integer 0 violates the range [1, 3]