# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
794643 | 2023-07-26T18:01:19 Z | rainboy | Gardening (RMI21_gardening) | C | 14 ms | 812 KB |
#include <stdio.h> int main() { int t; scanf("%d", &t); while (t--) { int n, m, k, i, j; scanf("%d%d%d", &n, &m, &k); if (n % 2 != 0 || m % 2 != 0) { printf("NO\n"); continue; } if (k > n * m / 4) { printf("NO\n"); continue; } if (k == n * m / 4) { printf("YES\n"); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) printf("%d ", (i / 2) * (m / 2) + (j / 2) + 1); printf("\n"); } continue; } if (n == 4 && m == 4 && k == 2) { printf("YES\n"); printf("1 1 1 1\n"); printf("1 2 2 1\n"); printf("1 2 2 1\n"); printf("1 1 1 1\n"); continue; } printf("NO\n"); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 812 KB | Correct! Azusa and Laika like the garden :) |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 812 KB | Correct! Azusa and Laika like the garden :) |
2 | Failed | 5 ms | 468 KB | Incorrect output |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 812 KB | Correct! Azusa and Laika like the garden :) |
2 | Failed | 5 ms | 468 KB | Incorrect output |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 1 ms | 212 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 1 ms | 212 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 14 ms | 812 KB | Correct! Azusa and Laika like the garden :) |
2 | Failed | 5 ms | 468 KB | Incorrect output |
3 | Halted | 0 ms | 0 KB | - |