| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1294857 | kawhiet | Red-blue table (IZhO19_stones) | C++20 | 9 ms | 4412 KiB |
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n, m;
cin >> n >> m;
int x = m + (n - 1) / 2;
int y = n + (m - 1) / 2;
if (x > y) {
cout << x << '\n';
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cout << (i % 2 == 0 ? '-' : '+');
}
cout << '\n';
}
} else {
cout << y << '\n';
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cout << (j % 2 == 0 ? '+' : '-');
}
cout << '\n';
}
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
solve();
}
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
