Varianta 39 / Subiectul 3 / Problema 3 |
#include<fstream.h> fstream f("sir.in", ios::in); void main() { int x,n,m; f>>n; do{ f>>x; } while(x%2==1); m=x; int p=1; while(!f.eof()) { do{f>>x; }while(x%2==1); if(x>=m) m=x; else p=0; } if(p==1) cout<<"da"; else cout<<"nu"; } |