SHARE
TWEET

codeforce - little elephant and rozdil

jakaria_hossain Apr 10th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int n,x=1000000009,ans,y;
  6.     bool f= false;
  7.     scanf("%d",&n);
  8.     for(int i=0;i<n;i++)
  9.     {
  10.         scanf("%d",&y);
  11.         if(y<x)
  12.         {
  13.             x=y;
  14.             ans=i;
  15.             f=false;
  16.         }
  17.         else if(y==x)
  18.         {
  19.             f=true;
  20.         }
  21.         //cout<<x<<" "<<f<<endl;
  22.     }
  23.     if(f)printf("Still Rozdil\n");
  24.     else printf("%d\n",ans+1);
  25.     return 0;
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top