# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
125698 |
2019-07-06T08:57:48 Z |
faustaadp |
cmp (balkan11_cmp) |
C++17 |
|
1763 ms |
82680 KB |
#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 |
1 |
Partially correct |
1763 ms |
82680 KB |
Output is partially correct - maxAccess = 11, score = 91 |