# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
104631 | WLZ | Genetics (BOI18_genetics) | C++17 | 675 ms | 36344 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
map<char, int> mp;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
mp['A'] = 0, mp['C'] = 1, mp['G'] = 2, mp['T'] = 3;
int n, m, k;
cin >> n >> m >> k;
vector<string> a(n);
vector<long long> w(n);
iota(w.begin(), w.end(), 1);
random_shuffle(w.begin(), w.end());
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector< vector<long long> > v(4, vector<long long>(m, 0));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
v[mp[a[i][j]]][j] += w[i];
}
}
for (int i = 0; i < n; i++) {
long long tmp = 0;
for (int j = 0; j < m; j++) {
tmp += v[mp[a[i][j]]][j];
}
long long exp = 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... |