prestige

timus_1494

Jun 11th, 2012
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n;
  6. cin>>n;
  7. int maxx=0;
  8. int f=0;
  9. for(int i=0;i<n;i++)
  10. {
  11. int t;
  12. cin>>t;
  13. if(t>maxx&&f<2)
  14. {
  15. f=1;
  16. maxx=t;
  17. }
  18. if(t<maxx&&f<2)
  19. {
  20. f=2;
  21. maxx=t;
  22. }
  23. if(t>maxx&&f==2)
  24. {
  25. cout<<"Cheater";
  26. return 0;
  27. }
  28. }
  29. cout<<"Not a proof";
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment