# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
201866 | 2020-02-12T11:28:03 Z | guangxuan | Red-blue table (IZhO19_stones) | C++14 | 40 ms | 1436 KB |
#include <bits/stdc++.h> using namespace std; int main(){ int T; scanf("%d",&T); while(T--){ int n,m; scanf("%d%d",&n,&m); int ans1 = n + (m-1)/2, ans2 = m + (n-1)/2; printf("%d\n",max(ans1,ans2)); if(ans1>ans2){ for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(j<(m-1)/2)printf("-"); else printf("+"); } puts(""); } } else{ for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ if(i<(n-1)/2)printf("+"); else printf("-"); } puts(""); } } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 6 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
3 | Correct | 6 ms | 376 KB | Output is correct |
4 | Incorrect | 6 ms | 376 KB | Wrong answer in test 5 29: 31 < 32 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 40 ms | 1436 KB | Wrong answer in test 97 21: 107 < 116 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 38 ms | 1256 KB | Wrong answer in test 24 24: 35 < 44 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 256 KB | Output is correct |
2 | Correct | 5 ms | 256 KB | Output is correct |
3 | Correct | 6 ms | 376 KB | Output is correct |
4 | Incorrect | 6 ms | 376 KB | Wrong answer in test 5 29: 31 < 32 |