# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
18821 | 2016-02-15T22:27:43 Z | ggoh | Last supper (IOI12_supper) | C++ | 0 ms | 0 KB |
#include "advisor.h" void ComputeAdvice(int *C, int N, int K, int M) { int L[100002]; for(int i=0;i<N;i++)L[i]=-1; for(int i=0;i<N;i++)L[C[i]]=i+1; for(int i=0;i<K;i++)WriteAdvice((L[i]+1?0:1)); for(int i=0;i<N;i++)WriteAdvice((late[C[i]]-i?0:1)); }