Created
August 20, 2017 05:13
-
-
Save sifue/f0ed2834081540034bf4ae678f1bc56e to your computer and use it in GitHub Desktop.
書き直したらこんな感じ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
#include <set> | |
using namespace std; | |
int main(){ | |
int N; | |
cin >> N; | |
int p[N][3]; | |
int i, j; | |
for(i = 0; i < N; i++){ | |
for(j = 0; j < 3; j++){ | |
cin >> p[i][j]; | |
} | |
} | |
set< set<int> > Q; | |
for(int k = 0; k < N; k++){ | |
set<int> S; | |
for(int l = 0; l < 3; l++){ | |
S.insert(p[k][l]); | |
} | |
Q.insert(S); | |
} | |
cout << (N - Q.size()) << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment