Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int a[2000];
  6.  
  7. int main(){
  8. ifstream cin ("INPUT.TXT");
  9. ofstream cout ("OUTPUT.TXT");
  10. int n;
  11. cin >>n;
  12. for (int i=0; i<n; i++){
  13. cin>>a[i];
  14. }
  15. int x=437;
  16. int ans=0;
  17. for (int i=0; i<n; i++){
  18. if((a[i]>x){
  19. cout<<"Crash "<<i+1;
  20. return 0;
  21. }
  22. }
  23. cout<<"No crash";
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement