Submission #135231

#TimeUsernameProblemLanguageResultExecution timeMemory
135231zoooma13Parrots (IOI11_parrots)C++14
81 / 100
7 ms1576 KiB
#include "bits/stdc++.h" #include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int N, int M[]) { vector <bool> bin(8*N ,0); for(int i=0; i<N; i++) for(int j=0; j<8; j++) bin[8*i+j] = M[i]&(1<<j); for(int i=0; i<bin.size(); i++) if(bin[i]) send(i); }
#include "bits/stdc++.h" #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int N, int L, int X[]) { vector <bool> bin(8*N ,0); for(int i=0; i<L; i++) bin[X[i]] = 1; for(int i=0; i<N; i++){ int num = 0; for(int j=0; j<8; j++) num |= (1<<j)*bin[8*i+j]; output(num); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:13:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0; i<bin.size(); i++)
                  ~^~~~~~~~~~~
#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...