#include <bits/stdc++.h> using namespace std; int n,licz; int main() { cin>>n; for(int i=0;i<n;i++){ string a; int b; cin>>a>>b; if(a=="NIE") continue; if(licz<10){ cout<<i+1<<" "; licz++; } else if(b<2 && licz<20){ cout<<i+1<<" "; licz++; } } return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #include <bits/stdc++.h> using namespace std; int n,licz; int main() { cin>>n; for(int i=0;i<n;i++){ string a; int b; cin>>a>>b; if(a=="NIE") continue; if(licz<10){ cout<<i+1<<" "; licz++; } else if(b<2 && licz<20){ cout<<i+1<<" "; licz++; } } return 0; } |