# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
927696 | MuntherCarrot | cmp (balkan11_cmp) | C++17 | 1383 ms | 106840 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 <bits/stdc++.h>
#include "cmp.h"
using namespace std;
// void bit_set(int add)
// int bit_get(int add);
void remember(int a){
for(int i = 0; i < 6; i++){
bit_set(a % 4 + i * 4 + 1);
a /= 4;
}
}
int compare(int b){
int dig[6];
for(int i = 0; i < 6; i++){
dig[i] = b % 4;
b /= 4;
}
int i = 5;
for(; i >= 0; i--){
int x = bit_get(dig[i] + i * 4 + 1);
if(x == 0) break;
}
if(i == -1){
return 0;
}
else{
if(dig[i] == 3){
return 1;
}
if(dig[i] == 2){
int x = bit_get(3 + i * 4 + 1);
return x == 1 ? -1 : 1;
}
if(dig[i] == 1){
int x = bit_get(0 + i * 4 + 1);
return x == 1 ? 1 : -1;
}
if(dig[i] == 0){
return -1;
}
}
return 0;
}
// by me
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |