POJ 2578
1 #include<iostream> 2 #include<stdio.h> 3 #include<vector> 4 using namespace std; 5 6 int main() 7 { 8 //freopen("acm.acm","r",stdin); 9 vector<int> coll; 10 int num = 168; 11 int a; 12 while(cin>>a) 13 { 14 coll.push_back(a); 15 } 16 vector<int>::iterator pos; 17 for(pos = coll.begin(); pos != coll.end(); ++ pos) 18 { 19 if(*pos < num) 20 { 21 cout<<"CRASH "<<*pos<<endl; 22 break; 23 } 24 } 25 if(pos == coll.end()) 26 cout<<"NO CRASH"<<endl; 27 }