Submission #963684

#TimeUsernameProblemLanguageResultExecution timeMemory
963684AmrParrots (IOI11_parrots)C++17
34 / 100
1 ms1552 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; #define sz size() void encode(int N, int M[]) { vector<pair<ll,ll> > v; for(int i = 0; i < N; i++) v.push_back({M[i],i}); sort(v.begin(),v.end()); for(int i = 0; i < N; i++) { send(M[i]); } for(int i = 0; i < N; i++) { send(v[i].second+256+i*16); } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; #define sz size() ll ans[100]; void decode(int N, int L, int X[]) { //for(int i = 0; i < L; i++) cout << X[i] << " "; cout << endl; sort(X,X+L); vector<ll> v; for(int i = 0; i < N; i++) { v.push_back(X[i]); } sort(v.begin(),v.end()); for(int i = 0; i < N; i++) { ans[X[i+N]%16] = v[i]; } for(int i=0; i< N; i++) { output(ans[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...