QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#190986#5255. Greedy Drawersucup-team902#WA 0ms3492kbC++171.1kb2023-09-29 16:30:192023-09-29 16:30:21

Judging History

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

  • [2023-09-29 16:30:21]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3492kb
  • [2023-09-29 16:30:19]
  • 提交

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 = 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;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3492kb

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