Submission #29069

#TimeUsernameProblemLanguageResultExecution timeMemory
29069aybalaParrots (IOI11_parrots)C++11
17 / 100
6 ms2248 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> #define fori(a,b,c) for(a=b; a<c; a++) #define ford(a,b,c) for(a=b; a>=c; a--) #define mp make_pair #define pb push_back #define ll long long #define pii pair<int,int> using namespace std; void encode(int N, int M[]) { int i; int x = 1; for(i=1; i<=N; i++){ if(M[i-1]){ send(i*2-1); } else{ send(i*2); } x*=2; } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> #define fori(a,b,c) for(a=b; a<c; a++) #define ford(a,b,c) for(a=b; a>=c; a--) #define mp make_pair #define pb push_back #define ll long long #define pii pair<int,int> using namespace std; void decode(int N, int L, int X[]) { int i, b; sort(X,X+L); for(i=0; i<L; i++) { if(X[i]%2) output(1); else{ output(0); } } }

Compilation message (stderr)

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:14:9: warning: unused variable 'b' [-Wunused-variable]
  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...