# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
404339 | 2021-05-14T08:28:42 Z | Ruxandra985 | Red-blue table (IZhO19_stones) | C++14 | 9 ms | 1356 KB |
#include <bits/stdc++.h> using namespace std; char a[1010][1010]; int main() { FILE *fin = stdin; FILE *fout = stdout; int t , n , m , i , j , opt; fscanf (fin,"%d",&t); for (;t;t--){ fscanf (fin,"%d%d",&n,&m); if (n >= m){ for (i = 1 ; i <= n ; i++){ for (j = 1 ; j <= m ; j++){ a[i][j] = '+'; } } opt = m - (m / 2 + 1); for (i = 1 ; i <= n ; i++){ for (j = 1 ; j <= opt ; j++){ a[i][j] = '-'; } } fprintf (fout,"%d\n" , n + opt); for (i = 1 ; i <= n ; i++){ for (j = 1 ; j <= m ; j++){ fputc(a[i][j] , fout); } fprintf (fout,"\n"); } } else { for (i = 1 ; i <= n ; i++){ for (j = 1 ; j <= m ; j++){ a[i][j] = '-'; } } opt = n - (n / 2 + 1); for (i = 1 ; i <= opt ; i++){ for (j = 1 ; j <= m ; j++){ a[i][j] = '+'; } } fprintf (fout,"%d\n" , m + opt); for (i = 1 ; i <= n ; i++){ for (j = 1 ; j <= m ; j++){ fputc(a[i][j] , fout); } fprintf (fout,"\n"); } } } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 332 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 332 KB | Output is correct |
4 | Incorrect | 2 ms | 332 KB | Wrong answer in test 5 29: 31 < 32 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 9 ms | 1308 KB | Wrong answer in test 97 21: 107 < 116 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 8 ms | 1356 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 | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 332 KB | Output is correct |
4 | Incorrect | 2 ms | 332 KB | Wrong answer in test 5 29: 31 < 32 |