제출 #164477

#제출 시각아이디문제언어결과실행 시간메모리
164477mhy908질문 (CEOI14_question_grader)C++14
100 / 100
1580 ms125232 KiB
int c[930], r; bool first=true; int encode(int N, int x, int y) { if(first) for(int i=1; i<=4096; i++) if(__builtin_popcount(i)==6)c[++r]=i; first=false; return __builtin_ffs(c[x]&(c[x]^c[y])); }
int c[930], r; bool first=true; int decode(int N, int q, int h) { if(first) for(int i=1; i<=4096; i++) if(__builtin_popcount(i)==6)c[++r]=i; first=false; return c[q]&(1<<(h-1))?1:0; }
#Verdict Execution timeMemoryGrader output
Fetching results...