Advertisement
askarulytarlan

#233 Автобусная экскурсия

Mar 26th, 2016
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <vector>
  5. #include <algorithm>
  6. #include <cstdio>
  7. #include <math.h>
  8. #include <string>
  9. #include <stdio.h>
  10. #include <string.h>
  11. #include <string>
  12. #include <stdlib.h>
  13. #include <cmath>
  14. #include <iomanip>
  15. #include <queue>
  16. #include <utility>
  17. #include <vector>
  18. #include <stack>
  19. #include <list>
  20. #include <iterator>
  21. #include <cctype>
  22. #include <exception>
  23. #include <cstdlib>
  24. #include <stdexcept>
  25. #include <csignal>
  26. #include <pthread.h>
  27.  
  28. using namespace std;
  29.  
  30. int main(int argc, const char * argv[]) {
  31.  
  32. int height;
  33. int bridge[10000];
  34. int countCrash;
  35. countCrash=0;
  36. cin>>height;
  37. for(int i=1; i<=height;i++){
  38. cin>>bridge[i];
  39. }
  40.  
  41. for (int i=1; i<=height; i++) {
  42. if (bridge[i]<=437){
  43. countCrash++;
  44. cout<<"Crash"<<" "<<i<<endl;
  45. return 0;
  46. }
  47. }
  48.  
  49. if(countCrash == 0){
  50. cout<<"No crash"<<endl;
  51. }
  52.  
  53. return 0;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement