fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int ww[]={0,0,1,0,1};
  5. int pp[]={0,0,1,2,3};
  6. int path(int x){
  7. if(x<4)
  8. return pp[x];
  9. return x/2 + (x%4!=2);
  10. }
  11.  
  12. bool win(int x){
  13. if(x<4)
  14. return ww[x];
  15. return x%4!=3;
  16. }
  17. int n,a[200005],w;
  18. int main() {
  19. // for(int i=1; i<15; ++i){
  20. // cout<<i<<":\t"<<(win(i)?"W":"L")<<"\t"<<path(i)<<endl;
  21. // }
  22. cin>>n;
  23. for(int i=0; i<n; ++i){
  24. cin>>a[i];
  25. if(win(a[i]))
  26. w = max(w,a[i]);
  27. }
  28. if(w==0){
  29. cout<<"Mike\n";
  30. return 0;
  31. }
  32. for(int i=0; i<n; ++i){
  33. if(path((a[i]+1)/2) >= path(w)){
  34. cout<<"Mike\n";
  35. return 0;
  36. }
  37. }
  38. cout<<"Constantine\n";
  39. return 0;
  40. }
Success #stdin #stdout 0s 4240KB
stdin
4
8 6 4 2
stdout
Constantine