QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#89336#5255. Greedy Drawerssky3142WA 2ms3508kbC++201021b2023-03-19 20:13:462023-03-19 20:13:48

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-19 20:13:48]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3508kb
  • [2023-03-19 20:13:46]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using LL = long long;



int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;
    // int t = n / 6;
    vector<pair<int, int>> book, drawer;
    for (int i = 0; i < n; i += 6)
    {
        for (int j = 0; j < 6; ++j)
        {
            book.push_back({1000 - i - j, i + j + 1});
        }
        drawer.push_back({1000 - i, i + 2});
        drawer.push_back({1000 - i, i + 3});
        drawer.push_back({1000 - i - 2, i + 4});
        drawer.push_back({1000 - i - 3, i + 5});
        drawer.push_back({1000 - i - 4, i + 6});
        drawer.push_back({1000 - i - 4, i + 6});
    }
    for (int i = 0; i < n % 6; ++i)
    {
        book.push_back({500, 500});
        drawer.push_back({500, 500});
    }
    for (auto [x, y] : book)
    {
        cout << x << ' ' << y << '\n';
    }
    cout << '\n';
    for (auto [x, y] : drawer)
    {
        cout << x << ' ' << y << '\n';
    }
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3476kb

input:

150

output:

1000 1
999 2
998 3
997 4
996 5
995 6
994 7
993 8
992 9
991 10
990 11
989 12
988 13
987 14
986 15
985 16
984 17
983 18
982 19
981 20
980 21
979 22
978 23
977 24
976 25
975 26
974 27
973 28
972 29
971 30
970 31
969 32
968 33
967 34
966 35
965 36
964 37
963 38
962 39
961 40
960 41
959 42
958 43
957 44
...

result:

ok you killed Janko's strategy

Test #2:

score: -100
Wrong Answer
time: 2ms
memory: 3508kb

input:

151

output:

1000 1
999 2
998 3
997 4
996 5
995 6
994 7
993 8
992 9
991 10
990 11
989 12
988 13
987 14
986 15
985 16
984 17
983 18
982 19
981 20
980 21
979 22
978 23
977 24
976 25
975 26
974 27
973 28
972 29
971 30
970 31
969 32
968 33
967 34
966 35
965 36
964 37
963 38
962 39
961 40
960 41
959 42
958 43
957 44
...

result:

wrong answer there are no solutions in your plan