제출 #772860

#제출 시각아이디문제언어결과실행 시간메모리
772860tana저장 (Saveit) (IOI10_saveit)C++14
25 / 100
468 ms22180 KiB
#include "grader.h" #include "encoder.h" #include<cstdio> int xz[1001][1001]; void encode(int nv, int nh, int ne, int *v1, int *v2){ for(int i = 0; i < ne; i++) { xz[v1[i]][v2[i]] = 1; xz[v2[i]][v1[i]] = 1; } for(int i = 0; i < nv; i++) { for(int j = 0; j < nv; j++) { encode_bit(xz[i][j]); } } return; }
#include "grader.h" #include "decoder.h" #include<queue> using namespace std; int x[1001][1001]; int dist[1001]; bool v[1001]; int _nv; void bfs(int s) { queue<int> q; q.push(s); dist[s] = 0; v[s] = true; while (!q.empty()) { int p = q.front(); q.pop(); v[p] = true; for(int j = 0; j < _nv; j++) { if(x[p][j] && !v[j]) { v[j] = true; dist[j] = dist[p]+1; q.push(j); } } } } void decode(int nv, int nh) { _nv = nv; for(int i = 0; i < nv; i++) { for(int j = 0; j < nv; j++) { x[i][j] = decode_bit(); } } for(int i = 0; i < nh; i++) { for(int j = 0; j < nv; j++) { dist[j] = 100000; v[j] = false; } bfs(i); for(int j = 0; j < nv; j++) { hops(i,j,dist[j]); } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...