#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n ; cin >> n; for (int i = 0, j = 1; i < 20; i++, j++) { string s; cin >> s; int x; cin >> x; if (s == "NIE") { i --; continue; } if (x >= 2 && i >= 10) { i --; continue; } cout << j << ' '; } }
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 | #include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n ; cin >> n; for (int i = 0, j = 1; i < 20; i++, j++) { string s; cin >> s; int x; cin >> x; if (s == "NIE") { i --; continue; } if (x >= 2 && i >= 10) { i --; continue; } cout << j << ' '; } } |