| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 788572 | TheOpChicken | Red-blue table (IZhO19_stones) | C++17 | 65 ms | 1296 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
int n, m;
cin >> n >> m;
int opt = 0, can = -1;
for (int i = 0; i <= n; i++){
int total = (n-i)*m + i*(m - (m/2+1)), need = n/2 + 1;
int new_can = min(total/need, m);
if (new_can+i > opt+can) opt = i, can = new_can;
}
cout << can + opt << endl;
for (int i = 0; i < n; i++){
for (int j = 0; j < m; j++){
if (i >= opt) cout << '-';
else{
if (j < min(can, m - (m/2+1))) cout << '-';
else cout << '+';
}
}
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... | ||||
