QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#99943#5255. Greedy Drawerscardinal_city#WA 2ms3476kbC++201.1kb2023-04-24 05:54:012023-04-24 05:54:02

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:54:02]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3476kb
  • [2023-04-24 05:54:01]
  • 提交

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);

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3476kb

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!