# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
284745 | 2020-08-28T01:34:59 Z | dantoh000 | Red-blue table (IZhO19_stones) | C++14 | 45 ms | 1400 KB |
#include <bits/stdc++.h> using namespace std; int main(){ int tc; scanf("%d",&tc); while (tc--){ int n,m; scanf("%d%d",&n,&m); if (n > m){ printf("%d\n",n+(m-1)/2); for (int i = 0; i < n; i++){ for (int j = 0; j < m; j++){ if (j < (m-1)/2){ printf("-"); } else printf("+"); } printf("\n"); } } else{ printf("%d\n",(n-1)/2+m); for (int i = 0; i < n; i++){ for (int j = 0; j < m; j++){ if (i < (n-1)/2){ printf("+"); } else printf("-"); } printf("\n"); } } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Correct | 1 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Correct | 1 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Incorrect | 3 ms | 384 KB | Wrong answer in test 5 29: 31 < 32 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 45 ms | 1400 KB | Wrong answer in test 97 21: 107 < 116 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 44 ms | 1372 KB | Wrong answer in test 24 24: 35 < 44 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 256 KB | Output is correct |
2 | Correct | 1 ms | 256 KB | Output is correct |
3 | Correct | 2 ms | 384 KB | Output is correct |
4 | Incorrect | 3 ms | 384 KB | Wrong answer in test 5 29: 31 < 32 |