Submission #711393

#TimeUsernameProblemLanguageResultExecution timeMemory
711393mseebacherParrots (IOI11_parrots)C++17
52 / 100
4 ms1072 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int x, int m[]){ for(int i = 0;i<x;i++){ int y = m[i]; for(int j = 0;j<8;j++){ if((1 << j) & m[i]) send(128+j+8*i); else send(j+8*i); } } }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int x,int l,int m[]){ vector<int> ans(l,0); for(int i = 0;i<l;i++){ if(m[i] >= 128){ m[i]-= 128; int zahl = m[i]/8; int bit = m[i] % 8; ans[zahl] |= (1 << bit); } } for(int i = 0;i<x;i++){ output(ans[i]); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:9:7: warning: unused variable 'y' [-Wunused-variable]
    9 |   int y = m[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...