This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |