Submission #1124625

#TimeUsernameProblemLanguageResultExecution timeMemory
1124625ElayV13Genetics (BOI18_genetics)C++20
27 / 100
2094 ms3140 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define ld double #define FOR(L , R) for(int i = L;i <= R;i++) const int INF = 1e18; const int sz = 2e5 + 5; const int usz = 1e6 + 5; const int mod = 998244353; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); int n , m , k; cin >> n >> m >> k; vector < string > a(n); for(int i = 0;i < n;i++) cin >> a[i]; for(int i = 0;i < n;i++) { int cn = 0; for(int j = 0;j < n;j++) { if(i == j) continue; int cnt = 0; for(int p = 0;p < m;p++) { if(a[i][p] != a[j][p]) cnt++; } if(cnt == k) cn++; } if(cn == n - 1) { cout << i + 1 << endl; return 0; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...