Submission #351561

#TimeUsernameProblemLanguageResultExecution timeMemory
351561kylych03Parrots (IOI11_parrots)C++14
81 / 100
4 ms1464 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; //#include "grader.cpp" void encode(int N, int M[]) { int i; int sum=0; for(i=0; i<N; i++){ int packet=(i<<3); for(int j= 0 ; j < 8 ;j++){ if(( M[i]>>j )&1){ send(packet+j); } } } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> //#include "grader.cpp" using namespace std; int res[100]; void decode(int N, int L, int X[]) { int i, b; for(i=0; i<N; i++) res[i]=0; for(i=0; i<L; i++){ res[X[i]>>3]|=( 1<<(X[i]&7)); } for(i=0; i<N; i++) { output(res[i]); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:11:7: warning: unused variable 'sum' [-Wunused-variable]
   11 |   int sum=0;
      |       ^~~

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:9:10: warning: unused variable 'b' [-Wunused-variable]
    9 |   int i, b;
      |          ^
#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...