# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
23349 | youngyojun | 저장 (Saveit) (IOI10_saveit) | C++11 | 400 ms | 11256 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "encoder.h"
#include "grader.h"
#include <vector>
#include <algorithm>
#include <queue>
#define pb push_back
#define sz(V) ((int)(V).size())
#define allv(V) ((V).begin()),((V).end())
using namespace std;
static const int huffswtd[3][3] = { {0, 1, 2}, {1, 0, 2}, {1, 2, 0} }; // [huffno][data]
static inline void fg(vector<int> G[], const int& A, const int& B) { G[A].pb(B); G[B].pb(A); }
static inline void callbit(const int& n, const int& k) {
for(int i = k-1; ~i; i--) encode_bit((n & (1<<i)) ? 1 : 0);
}
static inline void callhuffbit(const int& huffcode) {
if(0 == huffcode) encode_bit(1);
else if(1 == huffcode) { encode_bit(0); encode_bit(1); }
else { encode_bit(0); encode_bit(0); }
}
static vector<int> G[1005];
static int prt[1005], d[1005], sddt[1005];
static int cnt[3]; // -1, 0, 1
static int N, H;
static void dfs(const int& idx) {
for(int i = 0; i < sz(G[idx]); i++) {
if(~prt[G[idx][i]]) continue;
prt[G[idx][i]] = idx; dfs(G[idx][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... |