| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1171670 | coolboy19521 | Red-blue table (IZhO19_stones) | C++20 | 36 ms | 1352 KiB |
#include "bits/stdc++.h"
#define mxN 1003
using namespace std;
char gr[mxN][mxN];
int main(){
int T;
cin >> T;
while (T --){
int N, M;
cin >> N >> M;
for (int i = 1; i <= N; i ++)
for (int j = 1; j <= M; j ++)
gr[i][j] = "-+"[N >= M];
if (N >= M){
for (int i = 1; i <= N / 2 + 1; i ++)
for (int j = 1; j <= M / 2; j ++)
gr[i][j] = '-';
cout << N + M / 2 << endl;
} else {
for (int i = 1; i <= N / 2; i ++)
for (int j = 1; j <= M / 2 + 1; j ++)
gr[i][j] = '+';
cout << M + N / 2 << endl;
}
for (int i = 1; i <= N; i ++){
for (int j = 1; j <= M; j ++)
cout << gr[i][j];
cout << endl;
}
}
}| # | 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... | ||||
