Submission #57620

#TimeUsernameProblemLanguageResultExecution timeMemory
57620kimjg1119Parrots (IOI11_parrots)C++17
52 / 100
8 ms2440 KiB
#include <stdio.h> #include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { int i; int a[64]; int b, c, d, e; for(i=0; i<N; i++) { b=M[i]/64; c=(M[i]%64)/16; d=(M[i]%16)/4; e=M[i]%4; a[i*4]=b+16*i; a[i*4+1]=c+4+16*i; a[i*4+2]=d+8+16*i; a[i*4+3]=e+12+16*i; } for(i=0; i<N*4; i++) send(a[i]); return; }
#include <stdio.h> #include "decoder.h" #include "decoderlib.h" int power(int n, int m) { int ans=1; for(int i=0; i<m; i++) ans=ans*n; return ans; } void decode(int N, int L, int X[]) { int i, b, temp1, temp2, temp3; int temp[16]={}; for(i=0; i<L; i++) { temp1=X[i]%4; temp2=(X[i]%16)/4; temp3=X[i]/16; temp[temp3]+=temp1*power(4, 3-temp2); } for(i=0; i<L/4; i++) { b = temp[i]; output(b); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:22:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   for(i=0; i<N*4; i++)
   ^~~
encoder.cpp:24:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
     return;
     ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...