QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#253117 | #6319. Parallel Processing (Easy) | std_abs | AC ✓ | 0ms | 3708kb | C++20 | 3.0kb | 2023-11-16 18:13:56 | 2023-11-16 18:13:58 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define pb push_back
#define all(a) a.begin(), a.end()
#define sz(a) ((int)a.size())
const int mod = 998244353, N = 200005;
int main() {
ios::sync_with_stdio(false), cin.tie(0);
int n;
cin >> n;
if (n <= 2) {
cout << "1\n";
cout << "2 1 2\n";
cout << "2000 2000 2000\n";
cout << "2000 2000 2000\n";
cout << "2000 2000 2000\n";
} else if (n <= 4) {
cout << "2\n";
cout << "2 1 2\n";
cout << "4 3 4\n";
cout << "2000 2000 2000\n";
cout << "2000 2000 2000\n";
cout << "3 2 3\n";
cout << "4 2 4\n";
cout << "2000 2000 2000\n";
cout << "2000 2000 2000\n";
} else if (n <= 8) {
cout << "3\n";
cout << "2 1 2\n";
cout << "4 3 4\n";
cout << "6 5 6\n";
cout << "8 7 8\n";
cout << "3 2 3\n";
cout << "4 2 4\n";
cout << "7 6 7\n";
cout << "8 6 8\n";
cout << "5 4 5\n";
cout << "6 4 6\n";
cout << "7 4 7\n";
cout << "8 4 8\n";
} else if (n <= 11) {
cout << "4\n";
cout << "2 1 2\n";
cout << "4 3 4\n";
cout << "6 5 6\n";
cout << "9 8 9\n";
cout << "3 2 3\n";
cout << "4 2 4\n";
cout << "7 6 7\n";
cout << "10 9 10\n";
cout << "5 4 5\n";
cout << "6 4 6\n";
cout << "7 4 7\n";
cout << "11 10 11\n";
cout << "8 7 8\n";
cout << "9 7 9\n";
cout << "10 7 10\n";
cout << "11 7 11\n";
} else if (n <= 13) {
cout << "5\n";
cout << "2 1 2\n";
cout << "5 4 5\n";
cout << "7 6 7\n";
cout << "11 10 11\n";
cout << "3 2 3\n";
cout << "8 7 8\n";
cout << "12 11 12\n";
cout << "2000 2000 2000\n";
cout << "4 3 4\n";
cout << "5 3 5\n";
cout << "9 8 9\n";
cout << "13 12 13\n";
cout << "6 5 6\n";
cout << "7 5 7\n";
cout << "8 5 8\n";
cout << "9 5 9\n";
cout << "10 9 10\n";
cout << "11 9 11\n";
cout << "12 9 12\n";
cout << "13 9 13\n";
} else if (n <= 16) {
cout << "6\n";
cout << "2 1 2\n";
cout << "6 5 6\n";
cout << "10 9 10\n";
cout << "14 13 14\n";
cout << "3 2 3\n";
cout << "7 6 7\n";
cout << "11 10 11\n";
cout << "15 14 15\n";
cout << "4 3 4\n";
cout << "8 7 8\n";
cout << "12 11 12\n";
cout << "16 15 16\n";
cout << "5 4 5\n";
cout << "6 4 6\n";
cout << "7 4 7\n";
cout << "8 4 8\n";
cout << "9 8 9\n";
cout << "10 8 10\n";
cout << "11 8 11\n";
cout << "12 8 12\n";
cout << "13 12 13\n";
cout << "14 12 14\n";
cout << "15 12 15\n";
cout << "16 12 16\n";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3620kb
input:
2
output:
1 2 1 2 2000 2000 2000 2000 2000 2000 2000 2000 2000
result:
ok AC
Test #2:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
4
output:
2 2 1 2 4 3 4 2000 2000 2000 2000 2000 2000 3 2 3 4 2 4 2000 2000 2000 2000 2000 2000
result:
ok AC
Test #3:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
3
output:
2 2 1 2 4 3 4 2000 2000 2000 2000 2000 2000 3 2 3 4 2 4 2000 2000 2000 2000 2000 2000
result:
ok AC
Test #4:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
5
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #5:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
6
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #6:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
7
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #7:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
8
output:
3 2 1 2 4 3 4 6 5 6 8 7 8 3 2 3 4 2 4 7 6 7 8 6 8 5 4 5 6 4 6 7 4 7 8 4 8
result:
ok AC
Test #8:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
9
output:
4 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11
result:
ok AC
Test #9:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
10
output:
4 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11
result:
ok AC
Test #10:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
11
output:
4 2 1 2 4 3 4 6 5 6 9 8 9 3 2 3 4 2 4 7 6 7 10 9 10 5 4 5 6 4 6 7 4 7 11 10 11 8 7 8 9 7 9 10 7 10 11 7 11
result:
ok AC
Test #11:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
12
output:
5 2 1 2 5 4 5 7 6 7 11 10 11 3 2 3 8 7 8 12 11 12 2000 2000 2000 4 3 4 5 3 5 9 8 9 13 12 13 6 5 6 7 5 7 8 5 8 9 5 9 10 9 10 11 9 11 12 9 12 13 9 13
result:
ok AC
Test #12:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
13
output:
5 2 1 2 5 4 5 7 6 7 11 10 11 3 2 3 8 7 8 12 11 12 2000 2000 2000 4 3 4 5 3 5 9 8 9 13 12 13 6 5 6 7 5 7 8 5 8 9 5 9 10 9 10 11 9 11 12 9 12 13 9 13
result:
ok AC
Test #13:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
14
output:
6 2 1 2 6 5 6 10 9 10 14 13 14 3 2 3 7 6 7 11 10 11 15 14 15 4 3 4 8 7 8 12 11 12 16 15 16 5 4 5 6 4 6 7 4 7 8 4 8 9 8 9 10 8 10 11 8 11 12 8 12 13 12 13 14 12 14 15 12 15 16 12 16
result:
ok AC
Test #14:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
15
output:
6 2 1 2 6 5 6 10 9 10 14 13 14 3 2 3 7 6 7 11 10 11 15 14 15 4 3 4 8 7 8 12 11 12 16 15 16 5 4 5 6 4 6 7 4 7 8 4 8 9 8 9 10 8 10 11 8 11 12 8 12 13 12 13 14 12 14 15 12 15 16 12 16
result:
ok AC
Test #15:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
16
output:
6 2 1 2 6 5 6 10 9 10 14 13 14 3 2 3 7 6 7 11 10 11 15 14 15 4 3 4 8 7 8 12 11 12 16 15 16 5 4 5 6 4 6 7 4 7 8 4 8 9 8 9 10 8 10 11 8 11 12 8 12 13 12 13 14 12 14 15 12 15 16 12 16
result:
ok AC