QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#99944 | #5255. Greedy Drawers | cardinal_city# | WA | 2ms | 3304kb | C++20 | 1.1kb | 2023-04-24 05:55:40 | 2023-04-24 05:55:42 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
// cin.tie(0)->sync_with_stdio(0);
int n; cin >> n;
int m = n / 3;
int prints1 = 0;
for (int i = 0; i < m; i++) {
int left = 2 * i + 1;
int right = 1000 - 2 * i;
cout << left + 1 << " " << right - 1 << "\n";
cout << left << " " << right << "\n";
cout << left << " " << right - 1 << "\n";
prints1 += 3;
}
for (int i = 0; i < n % 3; i++) {
cout << 300 + i << " " << 700 + i << "\n";
prints1++;
}
assert(prints1 == n);
cout << "\n";
int prints2 = 0;
for (int i = 0; i < m; i++) {
int left = 2 * i + 1;
int right = 1000 - 2 * i;
cout << left + 1 << " " << right << "\n";
cout << left + 1 << " " << right - 1 << "\n";
cout << left << " " << right << "\n";
prints2 += 3;
}
for (int i = 0; i < n % 3; i++) {
cout << 300 + i << " " << 700 + i << "\n";
prints2++;
}
assert(prints2 == n);
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3304kb
input:
150
output:
2 999 1 1000 1 999 4 997 3 998 3 997 6 995 5 996 5 995 8 993 7 994 7 993 10 991 9 992 9 991 12 989 11 990 11 989 14 987 13 988 13 987 16 985 15 986 15 985 18 983 17 984 17 983 20 981 19 982 19 981 22 979 21 980 21 979 24 977 23 978 23 977 26 975 25 976 25 975 28 973 27 974 27 973 30 971 29 972 29 97...
result:
wrong answer Janko passed your test!