QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#99944#5255. Greedy Drawerscardinal_city#WA 2ms3304kbC++201.1kb2023-04-24 05:55:402023-04-24 05:55:42

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-24 05:55:42]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3304kb
  • [2023-04-24 05:55:40]
  • 提交

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!