QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#89336 | #5255. Greedy Drawers | sky3142 | WA | 2ms | 3508kb | C++20 | 1021b | 2023-03-19 20:13:46 | 2023-03-19 20:13:48 |
Judging History
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';
}
}
Details
Tip: Click on the bar to expand more detailed information
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