| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 159635 | Dima_Borchuk | Red-blue table (IZhO19_stones) | C++17 | 2025 ms | 16288 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int main()
{
int q , n , m;
cin >> q;
while(q--){
cin >> n >> m;
int v[n + 1] = {0}, ans = m , k;
char a[n + 5][m + 5];
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
a[i][j] = '-';
}
}
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
if(v[j] < n / 2){
a[i][j] = '+';
v[j]++;
}
}
}
for(int i = 1; i <= n; i++){
k = 0;
for(int j = 1; j <= n; j++){
if(a[i][j] == '+') k++;
}
if(k > m / 2) ans++;
}
cout << ans << endl;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= m; j++){
cout << a[i][j];
}
cout << endl;
}
}
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... | ||||
