제출 #715093

#제출 시각아이디문제언어결과실행 시간메모리
715093Gabriel1219Set (COCI21_set)C++11
0 / 110
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, k; cin >> n >> k; int ans = 0; string arr[300]; for (int i = 0; i < n; i++) cin >> arr[i]; for (int i = 0; i < n; i++) { for (int j = i+1; j < n; j++) { for (int x = j+1; x < n; x++) { string a, b, c; a = arr[i]; b = arr[j]; c = arr[x]; bool set = true; int count = 0; while (set == true) { if (a[count] == b[count] && b[count] == c[count]) set = true; else if (a[count] != b[count] && b[count] != c[count] && a[count] != c[count]) set = true; else set = false; count++; } if (set == true) ans++; } } } cout << ans << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...