QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#817551 | #8934. Challenge NPC | KKT89 | AC ✓ | 20ms | 5260kb | C++20 | 977b | 2024-12-17 02:26:07 | 2024-12-17 02:26:08 |
Judging History
answer
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) { return (ull)rng() % B; }
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n;
cin >> n;
vector<pair<int, int>> v;
v.emplace_back(3, 2);
v.emplace_back(4, 1);
int cur = 3;
for (int i = 0; i < n; ++i) {
cur += 2;
for (int j = cur - 1; j >= 1; j -= 2) {
v.emplace_back(j, cur);
}
for (int j = cur - 2; j >= 1; j -= 2) {
v.emplace_back(j, cur + 1);
}
}
cout << 4 + 2 * n << " " << v.size() << " " << 2 << '\n';
for (int i = 0; i < 4 + 2 * n; ++i) {
cout << i % 2 + 1 << " ";
}
cout << '\n';
for (auto &i : v) {
cout << i.first << " " << i.second << '\n';
}
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3632kb
input:
1
output:
6 6 2 1 2 1 2 1 2 3 2 4 1 4 5 2 5 3 6 1 6
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
2
output:
8 12 2 1 2 1 2 1 2 1 2 3 2 4 1 4 5 2 5 3 6 1 6 6 7 4 7 2 7 5 8 3 8 1 8
result:
ok ok
Test #3:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
3
output:
10 20 2 1 2 1 2 1 2 1 2 1 2 3 2 4 1 4 5 2 5 3 6 1 6 6 7 4 7 2 7 5 8 3 8 1 8 8 9 6 9 4 9 2 9 7 10 5 10 3 10 1 10
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
4
output:
12 30 2 1 2 1 2 1 2 1 2 1 2 1 2 3 2 4 1 4 5 2 5 3 6 1 6 6 7 4 7 2 7 5 8 3 8 1 8 8 9 6 9 4 9 2 9 7 10 5 10 3 10 1 10 10 11 8 11 6 11 4 11 2 11 9 12 7 12 5 12 3 12 1 12
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
5
output:
14 42 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 3 2 4 1 4 5 2 5 3 6 1 6 6 7 4 7 2 7 5 8 3 8 1 8 8 9 6 9 4 9 2 9 7 10 5 10 3 10 1 10 10 11 8 11 6 11 4 11 2 11 9 12 7 12 5 12 3 12 1 12 12 13 10 13 8 13 6 13 4 13 2 13 11 14 9 14 7 14 5 14 3 14 1 14
result:
ok ok
Test #6:
score: 0
Accepted
time: 16ms
memory: 5240kb
input:
433
output:
870 188790 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2...
result:
ok ok
Test #7:
score: 0
Accepted
time: 20ms
memory: 5244kb
input:
500
output:
1004 251502 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
result:
ok ok
Test #8:
score: 0
Accepted
time: 17ms
memory: 5232kb
input:
499
output:
1002 250500 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
result:
ok ok
Test #9:
score: 0
Accepted
time: 15ms
memory: 5260kb
input:
457
output:
918 210222 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2...
result:
ok ok
Test #10:
score: 0
Accepted
time: 16ms
memory: 5184kb
input:
497
output:
998 248502 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2...
result:
ok ok
Extra Test:
score: 0
Extra Test Passed