Submission #797025

#TimeUsernameProblemLanguageResultExecution timeMemory
797025tlnk07Set (COCI21_set)C++17
0 / 110
1 ms212 KiB
#include<bits/stdc++.h> using namespace std; long long n, m, cnt = 0; bool check = 0; int main() { cin >> n >> m; string s[n + 1]; for(int i = 1; i <= n; ++i) { cin >> s[i]; for(int j = 0; j < m; ++j) s[i][j] -= '0'; } for(int i = 1; i <= n; ++i) { for(int j = i + 1; j <= n; ++j) { for(int k = j + 1; k <= n; ++k) { check = 0; for(int l = 0; l < m; ++l) { if((s[i][l] ^ s[j][l] ^ s[k][l]) == 0 || (s[i][l] ^ s[j][l] ^ s[k][l]) == s[i][l]) continue; else { check = 1; break; } } if(!check) { ++cnt; cout << i << j << k << "\n"; } } } } cout << cnt; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...