QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#293927 | #5255. Greedy Drawers | LaStataleBlue# | WA | 1ms | 3724kb | C++17 | 758b | 2023-12-29 23:20:14 | 2023-12-29 23:20:15 |
Judging History
answer
#include <cstdio>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
constexpr int MAXN = 100'005;
int main()
{
int n;
scanf("%d", &n);
vector<pii> bo, dr;
constexpr int S = 1001;
int w = 1;
for (int i = 0; i < n / 3; i++)
{
bo.push_back({w, S - w - 1});
bo.push_back({w, S - w - 2});
bo.push_back({w + 1, S - w - 2});
dr.push_back({w, S - w});
dr.push_back({w + 1, S - w - 1});
dr.push_back({w + 2, S - w - 2});
w += 3;
}
for (int i = 0; i < n % 3; i++)
{
bo.push_back({w, S - w});
dr.push_back({w, S - w});
}
for (const pii &b : bo)
printf("%d %d\n", b.first, b.second);
printf("\n");
for (const pii &d : dr)
printf("%d %d\n", d.first, d.second);
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3724kb
input:
150
output:
1 999 1 998 2 998 4 996 4 995 5 995 7 993 7 992 8 992 10 990 10 989 11 989 13 987 13 986 14 986 16 984 16 983 17 983 19 981 19 980 20 980 22 978 22 977 23 977 25 975 25 974 26 974 28 972 28 971 29 971 31 969 31 968 32 968 34 966 34 965 35 965 37 963 37 962 38 962 40 960 40 959 41 959 43 957 43 956 4...
result:
wrong answer Janko passed your test!