6167 | 2023-11-04 17:34:37 | zsombor | Könyvkupac | cpp17 | Partially correct 82.34/100 | 3ms | 2600 KiB |
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector <int> v(1);
cin >> v[0];
while (v[0]) {
v.push_back(0);
while (v[0] > v.back()) {
cout << "1 0 " << v.size() - 1 << "\n";
v[0]--;
v.back()++;
}
}
for (int i = 1; i < v.size(); i++) cout << v[i] << " " << i << " 0\n";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1684 KiB | ||||
2 | Accepted | 3ms | 1924 KiB | ||||
subtask2 | 82.34/100 | ||||||
3 | Partially correct | 3ms | 2140 KiB | ||||
4 | Partially correct | 3ms | 2140 KiB | ||||
5 | Partially correct | 3ms | 2144 KiB | ||||
6 | Partially correct | 3ms | 2396 KiB | ||||
7 | Partially correct | 3ms | 2600 KiB | ||||
8 | Partially correct | 3ms | 2564 KiB |