제출 #1274619

#제출 시각아이디문제언어결과실행 시간메모리
1274619DanielPr8Genetics (BOI18_genetics)C++20
27 / 100
2095 ms10732 KiB
#include <bits/stdc++.h> // #pragma GCC optimize("O3") // #pragma GCC optimize("unroll_loops") // #pragma GCC target("avx2") using namespace std; using ll = int; using vll = vector<ll>; using pll = pair<ll,ll>; using vpl = vector<pll>; using vvl =vector<vll>; #define f first #define s second #define pb push_back #define all(v) v.begin(),v.end() ll calc(vll a, vll b){ ll ans = 0; for(ll i = 0; i < a.size(); ++i)if(a[i]!=b[i])ans++; return ans; } int main(){ ios_base::sync_with_stdio(0);cin.tie(NULL); ll n, m, k; cin >> n >> m >> k; vvl lw(n, vll(m)); for(ll i = 0; i < n; ++i){ for(ll j = 0; j < m; ++j){ char c; cin >> c; if(c=='A')lw[i][j]=0; if(c=='C')lw[i][j]=1; if(c=='T')lw[i][j]=2; if(c=='G')lw[i][j]=3; } } vll ord(n); iota(all(ord),0); random_device g; shuffle(all(ord), g); for(ll i: ord){ ll o=0; for(ll j: ord){ if(j==i)continue; if(calc(lw[i], lw[j])!=k){ o=1; break; } } if(!o){cout << i+1;break;} } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...