61672023-11-04 17:34:37zsomborKönyvkupaccpp17Partially correct 82.34/1003ms2600 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";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1684 KiB
2Accepted3ms1924 KiB
subtask282.34/100
3Partially correct3ms2140 KiB
4Partially correct3ms2140 KiB
5Partially correct3ms2144 KiB
6Partially correct3ms2396 KiB
7Partially correct3ms2600 KiB
8Partially correct3ms2564 KiB