Submission #498548

# Submission time Handle Problem Language Result Execution time Memory
498548 2021-12-25T12:39:07 Z The_Samurai Red-blue table (IZhO19_stones) C++
0 / 100
34 ms 1332 KB
#include <bits/stdc++.h>
 
using namespace std;
 
void solve() {
	int n, m;
	
	cin >> n >> m;
	if (n == m) {
		int x = 1 - n % 2;
		cout << n + (n / 2 - x) << '\n';
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m / 2 + m % 2 + x; j++) {
				cout << '+';
			}
			for (int j = m / 2 + m % 2 + x; j < m; j++) {
				cout << '-';
			}
			cout << '\n';
		}
		return;
	}
}
 
int main() {
	int t;
	
	cin >> t;
	while (t--) {
		solve();
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB in the table A+B is not equal to 4
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Wrong answer
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB in the table A+B is not equal to 4
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 34 ms 1332 KB Wrong answer in test 24 24: 35 < 44
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB in the table A+B is not equal to 4
2 Halted 0 ms 0 KB -