# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
43923 | hi0577 | 비교 (balkan11_cmp) | C++14 | 920 ms | 105980 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "cmp.h"
#include <vector>
using namespace std;
void remember(int a) {
a += 6144;
while(a){
bit_set(a);
a >>= 1;
}
}
int compare(int b) {
b += 6144;
if(bit_get(b)) //같을때
return 0;
vector<int> vt;
while(b){
vt.push_back(b);
b >>= 1;
}
int x = 0;
int y = vt.size() - 1;
while(x != y){
int m = (x + y)/2;
if(!bit_get(vt[m]))
y = m;
else x = m+1;
}
if(vt[x] % 2) return 1;
return -1;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |