Submission #351462

#TimeUsernameProblemLanguageResultExecution timeMemory
351462kylych03Parrots (IOI11_parrots)C++14
0 / 100
4 ms1344 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> #define DEBUG(x) cout<<#x<<"="<<x<<endl; 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); //cout<<"ITH INDEX AT:"<<i<<" BIT IS ON:"<<j<<endl; //cout<<"SENDED PACKET:"<<packet<<endl; } } } }
#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<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:10:7: warning: unused variable 'sum' [-Wunused-variable]
   10 |   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...