6031 | 2023-10-28 00:01:59 | xxx | Könyvkupac | cpp14 | Wrong answer 0/100 | 3ms | 2968 KiB |
// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
int ki[100000];
int main() {
int n; cin >> n;
int k = 1;
while(n > 1) {
int cnt = 0;
for(int i = 1; i <= (n)/2; i++) {
cout << 1 << " " << 0 << " " << k << "\n";
cnt++;
}
ki[k] = cnt;
k++;
n -= n/2;
}
k--;
for(int i = k; k >= 1; k--) {
cout << ki[k] << " " << k << " " << 0 << "\n";
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1880 KiB | ||||
2 | Wrong answer | 3ms | 2076 KiB | ||||
subtask2 | 0/100 | ||||||
3 | Wrong answer | 3ms | 2288 KiB | ||||
4 | Wrong answer | 3ms | 2512 KiB | ||||
5 | Wrong answer | 3ms | 2620 KiB | ||||
6 | Wrong answer | 3ms | 2752 KiB | ||||
7 | Wrong answer | 3ms | 2844 KiB | ||||
8 | Wrong answer | 3ms | 2968 KiB |