#include int main() { int enemyNum = 0; int dropItem[3] = { 0,0,0 }; int myItem[10] = { 0,0,0,0,0,0,0,0,0,0 }; scanf("%d", &enemyNum); for (int i = 0; i < enemyNum; i++) { scanf("%d %d %d", &dropItem[0], &dropItem[1], &dropItem[2]); for (int j = 0; j < 3; j++) myItem[dropItem[j] - 1]++; } int supItem = 0; int powerUp = 0; for (int i = 0; i < 10; i++) { supItem += myItem[i] % 2; powerUp += myItem[i] / 2; } printf("%d\n", powerUp + supItem / 3); // 終了コードは0 return 0; }