Submission #340754

# Submission time Handle Problem Language Result Execution time Memory
340754 2020-12-28T10:37:57 Z NachoLibre Red-blue table (IZhO19_stones) C++14
0 / 100
35 ms 1388 KB
#include <bits/stdc++.h>
using namespace std;

int t, n, m;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin >> t;
	for(int ti = 1; ti <= t; ++ti) {
		cin >> n >> m;
		if(n > m) {
			cout << n + m / 2 << "\n";
			for(int i = 1; i <= n; ++i) {
				for(int j = 1; j <= m; ++j) {
					cout << (j <= m / 2 ? "-" : "+");
				}
				cout << "\n";
			}
		} else {
			cout << m + n / 2 << "\n";
			for(int i = 1; i <= n; ++i) {
				for(int j = 1; j <= m; ++j) {
					cout << (i > n / 2 ? "-" : "+");
				}
				cout << "\n";
			}
		}
	}
	cout << flush;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB in the table A+B is not equal to 5
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB in the table A+B is not equal to 21
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB in the table A+B is not equal to 5
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 1388 KB Wrong answer in test 97 21: 107 < 116
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 1388 KB in the table A+B is not equal to 36
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB in the table A+B is not equal to 5