Submission #743790

#TimeUsernameProblemLanguageResultExecution timeMemory
743790boyliguanhanSaveit (IOI10_saveit)C++17
0 / 100
1012 ms6548 KiB
#include "grader.h" #include "encoder.h" #include <bits/stdc++.h> void encodeNum(int x) { for(int i = 0; i < 10; i++) encode_bit(x&1<<i); } void encode(int N, int H, int P, int A[], int B[]){ int dis[N][N]; memset(dis, 1, sizeof dis); for(int i = 0; i < P; i++) dis[A[i]][B[i]] = dis[B[i]][A[i]] = 1; for(int i = 0; i < N; i++) dis[i][i] = 0; for(int k = 0; k < N; k++) for(int i = 0; i < N; i++) for(int j = 0; j < N; j++) dis[i][j] = std::min(dis[i][j], dis[i][k]+dis[k][j]); for(int i = 0; i < H; i++) for(int j = 0; j < N; j++) encodeNum(dis[i][j]); }
#include "grader.h" #include "decoder.h" int getNum() { int res = 0; for(int i = 0; i < 10; i++) res+=(1<<i)*decode_bit(); return res; } void decode(int N, int H){ for(int i = 0; i < H; i++) for(int j = 0; j < N; j++) hops(i,j,getNum()); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...