| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1330095 | gkos5678 | 질문 (CEOI14_question_grader) | C++20 | 475 ms | 39756 KiB |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 930;
int br[maxn];
bool b = 0;
void build(){
if (b) return;
b = 1;
int tr = 1;
for (int i = 1; i < (1 << 12); i++){
if (__builtin_popcount(i) != 6) continue;
br[tr] = i;
tr++;
}
}
int encode(int n, int x, int y){
build();
for (int i = 0; i < 12; i++){
if (((br[x] >> i) & 1) == 1 && ((br[y] >> i) & 1) == 0)
return i + 1;
}
}#include <bits/stdc++.h>
using namespace std;
const int maxn = 930;
int br[maxn];
bool b = 0;
void build(){
if (b) return;
b = 1;
int tr = 1;
for (int i = 1; i < (1 << 12); i++){
if (__builtin_popcount(i) != 6) continue;
br[tr] = i;
tr++;
}
}
int decode(int n, int q, int h){
build();
h--;
return (q >> h) & 1;
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
