# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125692 | faustaadp | cmp (balkan11_cmp) | C++17 | 1618 ms | 82548 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-=2)
{
ll X=(n&(1<<ii));
ll Y=(n&(1<<(ii-1)));
if(X)X=1;
else X=0;
if(Y)Y=1;
else Y=0;
ll Z=X*2+Y;
//if(n==3652)
// cout<<n<<" "<<ii<<" "<<X<<" "<<Y<<" "<<Z<<"\n";
bit_set(Z+tom);
tom+=4;
}
}
int compare(int b) {
//edit this
ll ii,tom=1;
for(ii=11;ii>=0;ii-=2)
{
ll X=(b&(1<<ii));
ll Y=(b&(1<<(ii-1)));
if(X)X=1;
else X=0;
if(Y)Y=1;
else Y=0;
ll Z=X*2+Y;
if(bit_get(Z+tom))
{
}
else
{
if(Z==0)
{
// cout<<ii<<"\n";
return -1;
}
else
if(Z==3)
return 1;
else
if(Z==1)
{
if(bit_get(tom+0))return 1;
else return -1;
}
else
{
if(bit_get(tom+3))return -1;
else return 1;
}
}
tom+=4;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |