# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
474098 | ShahdMohamed | Genetics (BOI18_genetics) | C++17 | 2097 ms | 5576 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
///LW M4 ACC HAZ3L GAMED
///YARAB WALA...I MEAN YARAB ACC
#include<bits/stdc++.h>
#define ll long long
#define endl "\n"
const ll mod = (ll) 1e9 + 7;
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll n,m,k;
cin>>n>>m>>k;
vector<string>v(n);
for (ll i=0; i<n; i++)
cin>>v[i];
ll ans=1;
for (ll i=0; i<n; i++)
{
bool ok=1;
for (ll j=0; j<n; j++)
{
if (j==i)
continue;
ll cnt=0;
for (ll l=0; l<m; l++)
{
if (v[i][l]!=v[j][l])
cnt++;
if (cnt>k)
break;
}
if (cnt!=k)
{
ok=0;
break;
}
}
if (ok)
{
cout<<i+1<<endl;
break;
}
}
return 0;
}
Compilation message (stderr)
# | 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... |