Submission #24163

#TimeUsernameProblemLanguageResultExecution timeMemory
24163ms990606cmp (balkan11_cmp)C11
0 / 100
928 ms82568 KiB
#include "cmp.h" void remember(int n) { int N=n; int a=N/(10*8*6); N%=(10*8*6); int b=N/(8*6); N%=(8*6); int c=N/8; N%=8; int d=N; a+=1; b+=1+12; c+=1+12+10; d+=1+12+10+8; 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); N%=(10*8*6); int b=N/(8*6); N%=(8*6); int c=N/8; N%=8; int d=N; int A=bit_get(a+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; } }

Compilation message (stderr)

cmp.c: In function 'compare':
cmp.c:118:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...