QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#190979#5255. Greedy Drawersucup-team902#WA 1ms3560kbC++171.1kb2023-09-29 16:26:132023-09-29 16:26:14

Judging History

你现在查看的是最新测评结果

  • [2023-09-29 16:26:14]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3560kb
  • [2023-09-29 16:26:13]
  • 提交

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[y].second, pos[x].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 = 0; i <= 15; ++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 (int i = 144; i < n; ++i) {
        ans.push_back(getans(i, i + 1));
    }
    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: 3560kb

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