Submission #432713

#TimeUsernameProblemLanguageResultExecution timeMemory
432713Bill_00Parrots (IOI11_parrots)C++14
0 / 100
2 ms844 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; int i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,timer; vector<int>lol[1070]; void encode(int N, int M[]) { for(i0=1;i0<=4;i0++) for(i1=i0;i1<=4;i1++) for(i2=i1;i2<=4;i2++) for(i3=i2;i3<=4;i3++) for(i4=i3;i4<=4;i4++) for(i5=i4;i5<=4;i5++) for(i6=i5;i6<=4;i6++) for(i7=i6;i7<=4;i7++) for(i8=i7;i8<=4;i8++) for(i9=i8;i9<=4;i9++){ lol[timer].push_back(i0); lol[timer].push_back(i1); lol[timer].push_back(i2); lol[timer].push_back(i3); lol[timer].push_back(i4); lol[timer].push_back(i5); lol[timer].push_back(i6); lol[timer].push_back(i7); lol[timer].push_back(i8); lol[timer].push_back(i9); timer++; } for(int i=0;i<N;i++){ for(int j:lol[M[i]]) send(j+i*4-1); } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; int i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,timer; vector<int>lol[1070]; void decode(int N, int L, int X[]) { for(i0=1;i0<=4;i0++) for(i1=i0;i1<=4;i1++) for(i2=i1;i2<=4;i2++) for(i3=i2;i3<=4;i3++) for(i4=i3;i4<=4;i4++) for(i5=i4;i5<=4;i5++) for(i6=i5;i6<=4;i6++) for(i7=i6;i7<=4;i7++) for(i8=i7;i8<=4;i8++) for(i9=i8;i9<=4;i9++){ lol[timer].push_back(i0); lol[timer].push_back(i1); lol[timer].push_back(i2); lol[timer].push_back(i3); lol[timer].push_back(i4); lol[timer].push_back(i5); lol[timer].push_back(i6); lol[timer].push_back(i7); lol[timer].push_back(i8); lol[timer].push_back(i9); timer++; } sort(X,X+L); for(int i=0;i<L;i+=10){ vector<int>temp; for(int j=i;j<i+10;j++){ temp.push_back(X[j]%4+1); } for(int j=0;j<256;j++){ if(temp==lol[j]){ output(j); break; } } } }
#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...