#include<bits/stdc++.h>
#define LL long long
#define LLL __int128
#define uint unsigned
#define ldb long double
#define uLL unsigned long long
using namespace std;
const int N=15,Mod=998244353;
int n,m;
int a[N];
signed main(){
cin.tie(0)->sync_with_stdio(0);
cin>>n;
vector<int>ans;
for(int i=1;i<=n;++i){
string o;int x;cin>>o>>x;
if(o=="TAK"){
if(ans.size()<10||x<2)ans.emplace_back(i);
}
}
if(ans.size()>20)ans.resize(20);
for(int i:ans)cout<<i<<" ";
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 | #include<bits/stdc++.h> #define LL long long #define LLL __int128 #define uint unsigned #define ldb long double #define uLL unsigned long long using namespace std; const int N=15,Mod=998244353; int n,m; int a[N]; signed main(){ cin.tie(0)->sync_with_stdio(0); cin>>n; vector<int>ans; for(int i=1;i<=n;++i){ string o;int x;cin>>o>>x; if(o=="TAK"){ if(ans.size()<10||x<2)ans.emplace_back(i); } } if(ans.size()>20)ans.resize(20); for(int i:ans)cout<<i<<" "; return 0; } /* */ |
English