# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
43924 |
2018-03-28T08:32:17 Z |
hi0577 |
cmp (balkan11_cmp) |
C++14 |
|
939 ms |
104952 KB |
#include "cmp.h"
#include <vector>
using namespace std;
void remember(int a) {
a += 4096;
while(a){
bit_set(a);
a >>= 1;
}
}
int compare(int b) {
b += 4096;
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 |
1 |
Incorrect |
939 ms |
104952 KB |
ZERO POINTS: For a=3040 and b=3318, correct answer is 1, got -1 |