Submission #1327208

#TimeUsernameProblemLanguageResultExecution timeMemory
1327208Double_SlashQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++20
0 / 100
459 ms40948 KiB
#include <bits/stdc++.h>
 
using namespace std;
 
struct Precomp : vector<int> {
    Precomp() {
        for (int i = 1 << 12; i--;) {
            if (__builtin_popcount(i) == 6) emplace_back(i);
        }
    }
} create, receive;
 
int encode(int, int X, int Y) {
    for (int i = 12; i--;) {
        if (create[X] & ~create[Y] & (1 << i)) return i + 1;
    }
}
#include <bits/stdc++.h>
 
using namespace std;
 
struct Precomp : vector<int> {
    Precomp() {
        for (int i = 1 << 12; i--;) {
            if (__builtin_popcount(i) == 6) emplace_back(i);
        }
    }
} receive;
 
bool decode(int n, int q, int h) { return (receive[q] >> (h - 1)) & 1; }

Compilation message (stderr)

# 1번째 컴파일 단계

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