# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
238461 | DodgeBallMan | Cats or Dogs (JOI18_catdog) | C++14 | 1843 ms | 40172 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
const int INF = 1e9;
const int N = 1e5 + 10;
int n, par[N], rot[N], lev[N], col[N], sz[N], pos[N], dep[N];
pii pv[N];
vector<int> g[N];
struct node {
vector<int> v;
node() {
v = vector<int>( 4, INF );
v[0] = v[3] = 0;
}
friend node operator+( const node &a, const node &b ) {
node ret;
ret.v = vector<int>( 4, INF );
for( int i = 0 ; i < 4 ; i++ ) for( int j = 0 ; j < 4 ; j++ ) {
int bit = ( i&2 ) + ( j&1 );
int dif = ( i&1 ) != ( (j>>1)&1 );
ret.v[bit] = min( ret.v[bit], a.v[i] + b.v[j] + dif );
}
return ret;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |