Submission #902744

#TimeUsernameProblemLanguageResultExecution timeMemory
902744heavylightdecompParrots (IOI11_parrots)C++14
17 / 100
2 ms1312 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> using namespace std; #define vt vector #define pb push_back #define X first #define Y second using pii = pair<int,int>; #define debug(x) do\ {auto _x=x; cerr<<#x<<" = "<<_x<<'\n';}while(0); #define f0r(i,a,b) for(auto i=(a);i<(b);i++) #define r0f(i,a,b) for(auto i=(a);i>=(b);i--) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) //Just encode the 8 bits in a single 8 bit integer void encode(int N, int M[]) { assert(N == 8); int res = 0; f0r(i,0,8) { debug(M[i]); res |= (M[i] << i); } debug(res); send(res); }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> using namespace std; #define vt vector #define pb push_back #define X first #define Y second using pii = pair<int,int>; #define debug(x) do\ {auto _x=x; cerr<<#x<<" = "<<_x<<'\n';}while(0); #define f0r(i,a,b) for(auto i=(a);i<(b);i++) #define r0f(i,a,b) for(auto i=(a);i>=(b);i--) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) //Just decode the 8 bits //potential bug: confusion between N and L void decode(int msg_sz, int N, int xs[]) { int cur = xs[0]; f0r(i,0,8) { //BUG: cast to boolean output(!!(cur & (1 << 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...