Покер
#include <algorithm>
#include <vector>
#include <iostream>
using namespace std;
int main()
{
int i;
vector<int> a(5);
for(i=0;i<5;++i)
cin>>a[i];
sort(a.begin(),a.end());
vector<int> b;
unique_copy(a.begin(),a.end(),back_inserter(b));
vector<int> c(b.size());
for(i=0;i<b.size();++i)
c[i]=count(a.begin(),a.end(),b[i]);
sort(c.begin(),c.end());
if(c[0]==5) cout<<"Impossible\n";
else if(c.back()==4) cout<<"Four of a Kind\n";
else if(c.back()==3 && c.front()==2) cout<<"Full House\n";
else if(b.size()==5 && b.front()+4==b.back()) cout<<"Straight\n";
else if(c.back()==3) cout<<"Three of a Kind\n";
else if(b.size()==3) cout<<"Two Pairs\n";
else if(b.size()==4) cout<<"One Pair\n";
else cout<<"Nothing\n";
return 0;
}