제출 #441384

#제출 시각아이디문제언어결과실행 시간메모리
441384sam571128Genetics (BOI18_genetics)C++17
27 / 100
2056 ms5420 KiB
#include <bits/stdc++.h> #define int long long #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; signed main(){ fastio int n,m,k; cin >> n >> m >> k; vector<string> v; for(int i = 0;i < n;i++){ string s; cin >> s; v.push_back(s); } for(int i = 0;i < n;i++){ bool ok = true; for(int j = 0;j < n;j++){ if(i==j) continue; int cnt = 0; for(int k = 0;k < m;k++){ if(v[i][k]!=v[j][k]) cnt++; } if(cnt!=k) ok = false; } if(ok){ cout << i+1 << "\n"; 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...