이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
void solve(){
int n, m;
cin >> n >> m;
char table[n][m];
int ans = n + (m - (m / 2 + 1));
for(int i = 0; i < n / 2 + 1; i++){
for(int j = 0; j < m / 2 + 1; j++){
table[i][j] = '+';
}
for(int j = m / 2 + 1; j < m; j++){
table[i][j] = '-';
}
}
for(int i = n / 2 + 1; i < n; i++){
for(int j = 0; j < m; j++){
table[i][j] = '+';
}
}
cout << ans << '\n';
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
cout << table[i][j];
}
cout << '\n';
}
}
int main(){
int t;
cin >> t;
while(t--){
solve();
}
}
| # | 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... |