제출 #640977

#제출 시각아이디문제언어결과실행 시간메모리
640977SheikhPhGenetics (BOI18_genetics)C++17
0 / 100
77 ms5848 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, m, k; cin >> n >> m >> k; vector<vector<int>> miss(m, vector<int>(4, 0)); auto trans = [](char c){ string str = "ACTG"; for(int j =0; j < 4; j++) { if(str[j] == c) return j; } assert(false); }; vector<string> lin(n); for(int i =0; i < n; i++) { cin >> lin[i]; } for(int i = 0; i < m; i++) { for(int j= 0; j < n; j++) { miss[i][trans(lin[j][i])] ++; } } for(int i =0; i < n; i ++) { int ans = 0; for(int j= 0; j < m; j++) { for(int ii =0; ii < 4; ii ++) { if("ACTG"[ii] != lin[i][j]) ans += miss[j][ii]; } } if(ans == n * k - k) { cout<< i +1; return 0; } } assert(false); 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...