| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 26704 | grands | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 7000 ms | 24552 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//#include <iostream>
//using namespace std;
int encode(int n, int x, int y) {
unsigned int n1 = (unsigned int)n;
unsigned int x1 = (unsigned int)x;
unsigned int y1 = (unsigned int)y;
unsigned int h = 0;
int temp = x;
int cnt = 1;
while (true){
bool N = (n1&((unsigned int)1 << h));
bool X = (x1&((unsigned int)1 << h));
bool Y = (y1&((unsigned int)1 << h));
/* cout << ((unsigned int)1 << ret) << endl;
cout << ret % 2 << N << X << Y << endl;*/
if ((h % 2 == 1) && (N == X) && (X != Y)){
return h+1;
}
if ((h % 2 == 0) && (N == Y) && (X != Y)){
return h+1;
}
h++;
}
}
//#include <iostream>
//using namespace std;
int decode(int n, int q, int h) {
h -= 1;
unsigned int n1 = (unsigned int)n;
unsigned int q1 = (unsigned int)q;
bool N = (n1&((unsigned int)1 << h));
bool Q = (q1&((unsigned int)1 << h));
/* cout << ((unsigned int)1 << ret) << endl;
cout << ret % 2 << N << X << Y << endl;*/
if (h % 2 == 1){
if (N == Q){
//printf("<1>\n");
return true;
}
else{
//printf("<2>\n");
return false;
}
}
else {
if (N == Q){
//printf("<3>\n");
return false;
}
else{
//printf("<4>\n");
return true;
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
