QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#190994 | #5255. Greedy Drawers | ucup-team902# | WA | 1ms | 3552kb | C++17 | 1.1kb | 2023-09-29 16:33:50 | 2023-09-29 16:33:52 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> pos, ans;
int n;
pair<int, int> getans(int x, int y)
{
y--;
return { pos[x].second, pos[y].first };
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 0; i < n; ++i) {
pos.push_back({ i+1,500-i });
}
for (int i = 144; i < n; ++i) {
ans.push_back(getans(i, i + 1));
}
for (int i=15; i >=0; --i) {
ans.push_back(getans(8 * i, 8 * i + 4));
ans.push_back(getans(8 * i, 8 * i + 4));
ans.push_back(getans(8 * i, 8 * i + 4));
ans.push_back(getans(8 * i + 3, 8 * i + 5));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
}
for (auto [x, y] : pos)
cout << x << " " << y << endl;
cout << endl;
for (auto [x, y] : ans)
cout << x << " " << y << endl;
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3552kb
input:
150
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
wrong output format Unexpected end of file - int32 expected