正文
增加 4 行删除 4 行
28 行未改动293031323334353637383940414243444546474828 行未改动signed main() {ios::sync_with_stdio(0);cin.tie(0), cout.tie(0);int n, m, k, x;cin >> n >> m >> k;cout << n * m << endl;for (int i = 1; i <= n; i++) {x = (k - i + 1 + n) % n;for (int j = 1; j <= m; j++)cout << i << " " << j << " " << (x++) % k + 1 << endl;}return 0;}```完结了,拜拜。28 行未改动293031323334353637383940414243444546474828 行未改动signed main() {ios::sync_with_stdio(0);cin.tie(0), cout.tie(0);int n, m, k, x;cin >> n >> m >> k;cout << n * m << endl;for (int i = 1; i <= n; i++) {x = (k - i + 1 + n) % n;for (int j = 1; j <= m; j++)cout << i << " " << j << " " << (x++) % k + 1 << endl;}return 0;}```完结了,拜拜。