Submission #602231

#TimeUsernameProblemLanguageResultExecution timeMemory
602231ThegeekKnight16Parrots (IOI11_parrots)C++14
81 / 100
3 ms1064 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int N, int M[]) { int R = 0; for (int i = 0; i < N; i++) { for (int k = 0; k < 8; k++) { if (M[i] & (1 << k)) send(8*i + k); } } }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int N, int L, int X[]) { int M[300], Marc[300]; for (int i = 0; i < 266; i++) {M[i] = 0; Marc[i] = 0;} sort(X, X+L); for (int i = 0; i < L; i++) { M[X[i] / 8] += (1 << (X[i] % 8)); } for (int i = 0; i < N; i++) output(M[i]); }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:8:9: warning: unused variable 'R' [-Wunused-variable]
    8 |     int R = 0;
      |         ^

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:8:17: warning: variable 'Marc' set but not used [-Wunused-but-set-variable]
    8 |     int M[300], Marc[300];
      |                 ^~~~
#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...