# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
26704 | 2017-07-05T04:52:00 Z | grands | 질문 (CEOI14_question_grader) | C++14 | 7000 ms | 24552 KB |
//#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++; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 7000 ms | 24552 KB | Execution timed out |
2 | Execution timed out | 7000 ms | 24552 KB | Execution timed out |