# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
579344 | KoD | Red-blue table (IZhO19_stones) | C++17 | 34 ms | 2288 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using std::vector;
using std::array;
using std::pair;
using std::tuple;
using ll = long long;
template <class T>
constexpr T infty = std::numeric_limits<T>::max() / 2;
void solve(const int N, const int M) {
const int Nh = N / 2 + 1;
const int Mh = M / 2 + 1;
int best_r = N, best_c = 0;
for (int r = 0; r <= N; ++r) {
for (int c = 1; c <= M; ++c) {
const int a = std::max(Mh - (M - c), 0);
if (N - (a * r + c - 1) / c >= Nh) {
if (best_r + best_c < r + c) {
best_r = r;
best_c = c;
}
}
}
}
vector ans(N, vector(M, '-'));
const int a = std::max(Mh - (M - best_c), 0);
for (int i = 0; i < best_r; ++i) {
# | 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... |