#define make_pair mp
#define emplace_back pb
#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rand(time(0));
const int N = 1e5 + 5;
int n, ile, x;
char s[5];
int main()
{
scanf("%d", &n);
for(int i=1;i<=n;i++) {
scanf("%s", s);
scanf("%d", &x);
if(ile < 10) {
if(s[0] == 'T') {
ile++;
printf("%d ", i);
}
}
else if(ile < 20) {
if(s[0] == 'T' && x<2) {
ile++;
printf("%d ", 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 27 28 29 | #define make_pair mp #define emplace_back pb #include <bits/stdc++.h> using namespace std; mt19937 mt_rand(time(0)); const int N = 1e5 + 5; int n, ile, x; char s[5]; int main() { scanf("%d", &n); for(int i=1;i<=n;i++) { scanf("%s", s); scanf("%d", &x); if(ile < 10) { if(s[0] == 'T') { ile++; printf("%d ", i); } } else if(ile < 20) { if(s[0] == 'T' && x<2) { ile++; printf("%d ", i); } } } return 0; } |
English