#include #include using namespace std; int main() { int a,b; int icnt[10]; int pcnt=0; vector item; cin >> a; item.resize(a * 3); for (int i = 0; i < a * 3; i++) { cin >> b; item[i] = b; } for (int i = 0; i < 10; i++) { for (unsigned int j = 0; j < item.size(); j++) { if (item[j]%10 == i) { icnt[i]++; } } } for (int i = 0; i < 10; i++) { int sum = icnt[i] / 2; pcnt += sum; } for (int i = 0; i < 10; i++) { int ks=0; ks += icnt[i] % 2; if (ks == 4) pcnt++; } cout << pcnt << endl; return 0; }