#include<iostream>
#include<unordered_map>
using namespace std;
int n;
unordered_map<string, int> mapa;
int main()
{
cin >> n;
for (int i = 0; i < n; i++)
{
string slowo;
cin >> slowo;
mapa[slowo] += 1;
}
if (mapa.size() == 15 && mapa["5A"] > 1 && mapa["5B"]>1 && mapa["5C"] >1)
cout << "TAK" << endl;
else
cout << "NIE" << endl;
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 | #include<iostream> #include<unordered_map> using namespace std; int n; unordered_map<string, int> mapa; int main() { cin >> n; for (int i = 0; i < n; i++) { string slowo; cin >> slowo; mapa[slowo] += 1; } if (mapa.size() == 15 && mapa["5A"] > 1 && mapa["5B"]>1 && mapa["5C"] >1) cout << "TAK" << endl; else cout << "NIE" << endl; return 0; } |
English