# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
742322 | 2023-05-16T06:01:43 Z | salmon | Gardening (RMI21_gardening) | C++14 | 11 ms | 5204 KB |
#include <bits/stdc++.h> using namespace std; int t; int N,M,K; vector<int> lst[200100]; int main(){ scanf(" %d",&t); while(t--){ scanf(" %d",&N); scanf(" %d",&M); scanf(" %d",&K); if(M * (long long int) N > 200000 || N % 2 == 1 || M % 2 == 1 || (N * M - K) % 2 != 0){ printf("NO\n"); continue; } if(N == 2 && M == 2){ if(K == 1){ printf("1 1\n1 1\n"); } else{ printf("NO"); } } else if(N == 2 && M == 4){ if(K == 2){ printf("1 1 2 2\n1 1 2 2\n"); } else{ printf("NO"); } } else if(N == 4 && M == 2){ if(K == 2){ printf("1 1\n1 1\n2 2\n 2 2\n"); } else{ printf("NO"); } } else{ if(K == 4){ printf("1 1 4 4\n1 1 4 4\n2 2 3 3\n 2 2 3 3\n"); } else if(K == 2){ printf("1 1 1 1\n1 2 2 1\n1 2 2 1\n 1 1 1 1\n"); } else{ printf("NO"); } } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 11 ms | 5204 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 11 ms | 5204 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 11 ms | 5204 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 2 ms | 4948 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 4 ms | 4948 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Failed | 11 ms | 5204 KB | Incorrect output |
2 | Halted | 0 ms | 0 KB | - |