# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1210885 | lucasdmy | Parrots (IOI11_parrots) | C++20 | 0 ms | 0 KiB |
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
void encode(int n, vector<int>m)
{
for(int k=0;k<n;k++){
m[k]*=100;
m[k]+=k;
send(m[k]);
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
bool comp(int x, int y){
return x%100>y%100;
}
void decode(int n, int l, vector<int>x)
{
sort(x.begin(), x.end(), comp);
for(int k=0;k<l;k++){
output(x[k]/100);
}
}