#include <iostream>
using namespace std;
string x[18] = {"1A", "1B", "1C", "2A", "2B", "2C", "3A", "3B", "3C", "4A", "4B", "4C", "5A", "5A", "5B", "5B", "5C", "5C"};
int main() {
ios_base::sync_with_stdio(false);
cout.tie(0);
cin.tie(0);
int loop;
cin>>loop;
string task;
for(int i=0; i<loop; ++i) {
cin>>task;
for(int j=0; j<18; ++j) {
if(task == x[j]) {
x[j] = "0";
break;
}
}
}
for(int i=0; i<18; ++i) {
if(x[i]!= "0") {
cout<<"NIE\n";
return 0;
}
}
cout<<"TAK\n";
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 30 31 32 33 | #include <iostream> using namespace std; string x[18] = {"1A", "1B", "1C", "2A", "2B", "2C", "3A", "3B", "3C", "4A", "4B", "4C", "5A", "5A", "5B", "5B", "5C", "5C"}; int main() { ios_base::sync_with_stdio(false); cout.tie(0); cin.tie(0); int loop; cin>>loop; string task; for(int i=0; i<loop; ++i) { cin>>task; for(int j=0; j<18; ++j) { if(task == x[j]) { x[j] = "0"; break; } } } for(int i=0; i<18; ++i) { if(x[i]!= "0") { cout<<"NIE\n"; return 0; } } cout<<"TAK\n"; return 0; } |
English