# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
24166 |
2017-06-01T04:05:01 Z |
ms990606 |
cmp (balkan11_cmp) |
C |
|
1903 ms |
82560 KB |
#include "cmp.h"
void remember(int n) {//2926
int N=n;
int a=N/(10*8*6);//6
N%=(10*8*6);
int b=N/(8*6);//0
N%=(8*6);
int c=N/6;//5
N%=6;
int d=N;//6
a+=1;//7
b+=1+12;//13
c+=1+12+10;//28
d+=1+12+10+8;//37
bit_set(a);
bit_set(b);
bit_set(c);
bit_set(d);
}
int compare(int e)
{
int N=e;
int a=N/(10*8*6);//6
N%=(10*8*6);
int b=N/(8*6);//0
N%=(8*6);
int c=N/6;//5
N%=6;
int d=N;//5
int A=bit_get(a+1);//7->1
if(A==1)
{
int B=bit_get(b+1+12);
if(B==1)
{
int C=bit_get(c+1+12+10);
if(C==1)
{
int D=bit_get(d+1+12+10+8);
if(D==1) return 0;
else if(d<=2)
{
for(int i=0;i<d;i++)
{
int bi=bit_get(i+1+12+10+8);
if(bi==1) return 1;
}
return -1;
}
else if(d>=3)
{
for(int i=d+1;i<6;i++)
{
int bi=bit_get(i+1+12+10+8);
if(bi==1) return -1;
}
return 1;
}
}
else if(c<=3)
{
for(int i=0;i<c;i++)
{
int bi=bit_get(i+1+12+10);
if(bi==1) return 1;
}
return -1;
}
else if(c>=4)
{
for(int i=c+1;i<8;i++)
{
int bi=bit_get(i+1+12+10);
if(bi==1) return -1;
}
return 1;
}
}
else if(b<=4)
{
for(int i=0;i<b;i++)
{
int bi=bit_get(i+1+12);
if(bi==1) return 1;
}
return -1;
}
else if(b>=5)
{
for(int i=b+1;i<10;i++)
{
int bi=bit_get(i+1+12);
if(bi==1) return -1;
}
return 1;
}
}
else if(a<=5)
{
for(int i=0;i<a;i++)
{
int bi=bit_get(i+1);
if(bi==1) return 1;
}
return -1;
}
else if(a>=6)
{
for(int i=a+1;i<12;i++)
{
int bi=bit_get(i+1);
if(bi==1) return -1;
}
return 1;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1903 ms |
82560 KB |
Output is correct - maxAccess = 10, score = 100 |