// Homura Akemi a.k.a. Starrykiller (/user/235125)
// I love Madoka Kaname forever!
#include <bits/stdc++.h>
using namespace std;
auto range(auto l, auto r) { return views::iota(l,r); }
auto rev=views::reverse;
_GLIBCXX_ALWAYS_INLINE void chmax(auto &a, auto b) { a=max(a,b); }
_GLIBCXX_ALWAYS_INLINE void chmin(auto &a, auto b) { a=min(a,b); }
// #define int long long
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
// int T; cin>>T;
int T=1;
while (T--) []{
int n; cin>>n;
vector<int> a(n), b;
for (int i=0; i<n; ++i) {
string s; cin>>s>>a[i];
if (s=="NIE") continue;
if (s=="TAK") {
if (a[i]<2 || size(b)<10u)
b.emplace_back(i);
}
}
for (int i=0; i<20; ++i) cout<<b[i]+1<<' ';
}();
}
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 28 29 30 31 32 | // Homura Akemi a.k.a. Starrykiller (/user/235125) // I love Madoka Kaname forever! #include <bits/stdc++.h> using namespace std; auto range(auto l, auto r) { return views::iota(l,r); } auto rev=views::reverse; _GLIBCXX_ALWAYS_INLINE void chmax(auto &a, auto b) { a=max(a,b); } _GLIBCXX_ALWAYS_INLINE void chmin(auto &a, auto b) { a=min(a,b); } // #define int long long signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); // int T; cin>>T; int T=1; while (T--) []{ int n; cin>>n; vector<int> a(n), b; for (int i=0; i<n; ++i) { string s; cin>>s>>a[i]; if (s=="NIE") continue; if (s=="TAK") { if (a[i]<2 || size(b)<10u) b.emplace_back(i); } } for (int i=0; i<20; ++i) cout<<b[i]+1<<' '; }(); } |
English