# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125698 | faustaadp | cmp (balkan11_cmp) | C++17 | 1763 ms | 82680 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>
typedef long long ll;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
void remember(int n) {
//edit this
ll ii,tom=1;
for(ii=11;ii>=0;ii-=3)
{
ll jj,Z=0;
for(jj=0;jj<3;jj++)
if(n&(1<<(ii-2+jj)))
Z+=(1<<jj);
bit_set(Z+tom);
tom+=8;
}
}
int compare(int b) {
//edit this
ll ii,tom=1;
for(ii=11;ii>=0;ii-=3)
{
ll jj,Z=0;
for(jj=0;jj<3;jj++)
if(b&(1<<(ii-2+jj)))
Z+=(1<<jj);
if(bit_get(Z+tom))
{
}
else
{
if(Z<=3)
{
ll jj;
for(jj=0;jj<Z;jj++)
if(bit_get(jj+tom))return 1;
return -1;
}
else
{
ll jj;
for(jj=Z+1;jj<8;jj++)
if(bit_get(jj+tom))return -1;
return 1;
}
}
tom+=8;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |