#include <iostream>
#include <string>
#include <map>
using namespace std;
int main() {
ios::sync_with_stdio(false);
map<string, int> m;
int n;
cin >> n;
while (n--) {
string s;
cin >> s;
m[s]++;
}
cout << ((m.size()==15 && m["5A"]>1 && m["5B"]>1 && m["5C"]>1) ?"TAK\n":"NIE\n");
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include <iostream> #include <string> #include <map> using namespace std; int main() { ios::sync_with_stdio(false); map<string, int> m; int n; cin >> n; while (n--) { string s; cin >> s; m[s]++; } cout << ((m.size()==15 && m["5A"]>1 && m["5B"]>1 && m["5C"]>1) ?"TAK\n":"NIE\n"); return 0; } |
English