# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17080 | 2015-11-04T19:43:11 Z | erdemkiraz | Parrots (IOI11_parrots) | C++ | 0 ms | 0 KB |
#include "encoder.h" #include "encoderlib.h" void swap(int &x, int &y) { int t = x; x = y; y = t; } void encode(int N, int M[]) { sort(M, M + N); int i; for(i= 0; i + 1 < N; i += 2) { swap(M[i], M[i + 1]); } for(i=0; i<N; i++) send(M[i]); }