제출 #40041

#제출 시각아이디문제언어결과실행 시간메모리
40041alenam0161저장 (Saveit) (IOI10_saveit)C++14
0 / 100
309 ms10664 KiB
#include "grader.h" #include "encoder.h" #include <vector> #include <queue> #include <iostream> #include <cstring> using namespace std; void go(int x) { encode_bit(x); } bool used[1007]; int ans[1007]; vector<int> g[1007]; void encode(int nv, int nh, int ne, int *v1, int *v2) { for (int i = 0; i < ne; ++i) { g[v1[i]].push_back(v2[i]); g[v2[i]].push_back(v1[i]); } for (int i = 0; i < nh; ++i) { queue<int> q; memset(used, 0, sizeof(used)); memset(ans, 0, sizeof(ans)); used[i] = true; ans[i] = 0; q.push(i); while (!q.empty()) { int v = q.front(); q.pop(); for (int to : g[v]) { if (used[to])continue; used[to] = true; ans[to] = ans[v] + 1; q.push(to); } } for (int j = 0; j < nv; ++j) { go(ans[j]); } } return; }
#include "grader.h" #include "decoder.h" int get() { /*int x = 0; for (int i = 0; i < 10; ++i) { if (decode_bit() == 1)x += (1 << i); } */ return decode_bit(); } void decode(int nv, int nh) { for (int i = 0; i < nh; ++i) { for (int j = 0; j < nv; ++j) { int u = get(); hops(i, j, u); } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...