Submission #887040

#TimeUsernameProblemLanguageResultExecution timeMemory
887040gustavo_dParrots (IOI11_parrots)C++17
34 / 100
1 ms1328 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; void encode(int N, int M[]) { int i; vector<int> pf(N+1,0); for (int i=1; i<=N;i++) pf[i] = pf[i-1] + M[i-1]; for(i=1; i<=N; i++) send(pf[i]); }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { int i, b; sort(X, X+L); int last = 0; int act = 0; for(i=0; i<L; i++) { act = X[i]; output(act-last); last = act; } }

Compilation message (stderr)

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