Submission #1244667

#TimeUsernameProblemLanguageResultExecution timeMemory
1244667nvujicaQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++20
0 / 100
7090 ms10220 KiB
#include <bits/stdc++.h> using namespace std; const int maxn = 1000; int ozn[maxn]; void pre(){ int cnt = 0; for(int mask = 0; mask < (1 << 12); mask++){ if(__builtin_popcount(mask) == 6){ cnt++; ozn[cnt] = mask; } } } int encode (int n, int x, int y) { pre(); for(int i = 0; i < 12; i++){ if((ozn[x] & (1 << i)) && !(ozn[y] & (1 << i))) return (i + 1); } }
#include <bits/stdc++.h> using namespace std; const int maxn = 1000; int ozn[maxn]; void pre(){ int cnt = 0; for(int mask = 0; mask < (1 << 12); mask++){ if(__builtin_popcount(mask) == 6){ cnt++; ozn[cnt] = mask; } } } int decode (int n, int q, int h) { if(ozn[q] & (1 << (h - 1))) return 1; else return 0; }

Compilation message (stderr)

# 1번째 컴파일 단계

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:26:1: warning: control reaches end of non-void function [-Wreturn-type]
   26 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...