# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1034153 | vjudge1 | cmp (balkan11_cmp) | C++17 | 1 ms | 344 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cmp.h"
#include <bits/stdc++.h>
using namespace std;
string abc = "abcdefghijklmnopqrstuvwxyz";
// #define int long long
void remember(int a){
int cur = 21;
for(int i = 0; i < 11; i+=2){
if((1<<i)&a && (1<<(i+1))&a){
bit_set(cur);
}
else if((1<<i)&a){
bit_set(i);
}
else if((1<<(i+1))&a){
bit_set(i+1);
}
cur++;
}
}
int compare(int a){
int cur = 26;
for(int i = 11; i >= 1; i--){
if(a&(1<<i) && a&(1<<(i-1))){
int f = bit_get(cur);
if(f) continue;
return 1;
}
if(a&(1<<i)){
// int f = bit_set(cur);
int x = bit_get(i);
int y = bit_get(i-1);
if(x&&y) return -1;
if(x) continue;
return 1;
}
if(a&(1<<(i-1))){
int x = bit_get(i);
int y = bit_get(i-1);
if(x&&y) return -1;
if(x) return -1;
if(y) continue;
return 1;
}
int x = bit_get(i);
int y = bit_get(i-1);
if(x||y){
return -1;
}
continue;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |