| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 26713 | grands | 질문 (CEOI14_question_grader) | C++14 | 1882 ms | 25672 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#define B(x,h) (x&(1 << h))
int encode(int n, int x, int y) {
int h = 0, cntx = 0, cnty = 0;
while (h != 10){
bool X = B(x, h);
bool Y = B(y, h);
h++;
cntx += X;
cnty += Y;
if (X > Y){
return h;
}
}
h = 0;
while (h != 5){
bool X = B(cntx, h);
bool Y = B(cnty, h);
h++;
if (X < Y){
return 10 + h;
}
}
}
int decode(int n, int q, int h) {
if (h <= 10){
h -= 1;
bool Q = (q&(1 << h));
return Q;
}
else{
int i = h - 11, cntq = 0;
h = 0;
while (h != 10){
bool Q = (q&(1 << h));
h++;
cntq += Q;
}
bool Q = (cntq&(1 << i));
return !Q;
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
