# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
357732 | KoD | Cats or Dogs (JOI18_catdog) | C++17 | 627 ms | 27392 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "catdog.h"
#include <vector>
#include <algorithm>
#include <utility>
#include <array>
namespace Solver {
template <class T>
using Vec = std::vector<T>;
constexpr int MAX = 100000;
struct Monoid {
static constexpr Monoid ID() { return Monoid { { 0, MAX, MAX, 0 } }; }
std::array<std::array<long long, 2>, 2> value;
Monoid operator + (const Monoid &other) const {
Monoid ret{ { MAX, MAX, MAX, MAX }};
for (int i: { 0, 1 }) {
for (int j: { 0, 1 }) {
for (int k: { 0, 1 }) {
for (int l: { 0, 1 }) {
ret.value[i][l] = std::min(ret.value[i][l], value[i][j] + other.value[k][l] + (j ^ k));
}
}
}
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |