#include <iostream>
#include <climits>
#define maxn 8000
using namespace std;
char tasks[maxn];
//1-spotkanie w biurze
//2-spotkanie zdalne
//3-brak zadan
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long long n,pot;
int ile=0;
cin>>n;
string pom;
int tab[21];
for(int i=1;i<=n;i++){
cin>>pom>>pot;
if(ile<=20){
if(pom=="TAK"){
if(ile<10){
tab[ile]=i;
ile++;
}
else if(pot<2){
tab[ile]=i;
ile++;
}
}
}
}
for(int i=0;i<20;i++){
cout<<tab[i]<<' ';
}
}
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 33 34 35 36 37 38 39 40 | #include <iostream> #include <climits> #define maxn 8000 using namespace std; char tasks[maxn]; //1-spotkanie w biurze //2-spotkanie zdalne //3-brak zadan int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long n,pot; int ile=0; cin>>n; string pom; int tab[21]; for(int i=1;i<=n;i++){ cin>>pom>>pot; if(ile<=20){ if(pom=="TAK"){ if(ile<10){ tab[ile]=i; ile++; } else if(pot<2){ tab[ile]=i; ile++; } } } } for(int i=0;i<20;i++){ cout<<tab[i]<<' '; } } |
English