-
Notifications
You must be signed in to change notification settings - Fork 0
/
judge_C.cpp
54 lines (51 loc) · 1.23 KB
/
judge_C.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <bits/stdc++.h>
using ll = long long;
using std::cin;
using std::cout;
using std::endl;
std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int inf = (int)1e9 + 7;
const long long INF = 1LL << 60;
void solve()
{
std::vector<std::string> vs;
std::string s;
while (cin >> s)
{
vs.emplace_back(s);
}
int Call = 0;
std::array<int, 5> cnt;
for (int j = 0; j < (int)vs[0].size(); ++j)
{
std::fill(cnt.begin(), cnt.end(), 0);
for (int i = 0; i < (int)vs.size(); ++i)
{
if(vs[i][j] == 'A')
cnt[0] += 1;
if(vs[i][j] == 'C')
cnt[1] += 1;
if(vs[i][j] == 'G')
cnt[2] += 1;
if(vs[i][j] == 'T')
cnt[3] += 1;
if(vs[i][j] == '-')
cnt[4] += 1;
}
Call += (int)vs.size() - *std::max_element(cnt.begin(), cnt.end());
}
const int score = std::max(((int)vs.size() <= 10) ? (200 - Call * 2 / 10) : (700 - Call / 10), 0);
cout << score << endl;
}
int main()
{
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
int kkt = 1;
// cin >> kkt;
while(kkt--)
solve();
return 0;
}