제출 #1129076

#제출 시각아이디문제언어결과실행 시간메모리
1129076LudisseyGenetics (BOI18_genetics)C++20
27 / 100
2097 ms38724 KiB
#include <bits/stdc++.h> #define int long long #define sz(a) (int)a.size() #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() using namespace std; int popcount_u128(__uint128_t value) { // Cast and split into two 64-bit halves uint64_t lower = (uint64_t)value; // Lower 64 bits uint64_t upper = (uint64_t)(value >> 64); // Upper 64 bits // Use __builtin_popcountll for each half and sum the results return __builtin_popcountll(lower) + __builtin_popcountll(upper); } signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n,m,k; cin >> n >> m >> k; vector<vector<int>> a(n,vector<int>(m)); for (int i = 0; i < n; i++) { int j=0; while(j<m){ char c; cin >> c; if(c=='A') a[i][j]=0; if(c=='C') a[i][j]=1; if(c=='G') a[i][j]=2; if(c=='T') a[i][j]=3; j++; } } vector<vector<int>> dist(n,vector<int>(n,0)); for (int i = 0; i < n; i++) { } for (int i = 0; i < n; i++) { bool b=true; for (int j = 0; j < n; j++) { if(i==j) continue; int s=0; for (int _k = 0; _k < m; _k++) { if(a[i][_k]!=a[j][_k]) s++; } if(s!=k) { b=false; break; } } if(b==true){ cout << i+1 << "\n"; break; } } 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...