# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1101641 | vjudge1 | Bridž (COCI17_bridz) | C++17 | 2 ms | 476 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define task "TEST"
#define task2 "A"
#define pl pair<int, int>
#define pf push_front
#define pb push_back
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b, c) for (int i=a; i<=b; i+=c)
#define FORE(i, a, b, c) for (int i=a; i>=b; i+=c)
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int Mod = 1e9+7;
const int maxn = 1e7;
const ll Inf = 1e18;
string str; ll res, t;
void Read()
{
cin >> t;
while (t--){
cin >> str;
FOR(i, 0, str.length()-1, 1) {
if (str[i] == 'A') res += 4;
else if (str[i] == 'K') res += 3;
else if (str[i] == 'Q') res += 2;
else if (str[i] == 'J') res++;
}
}
cout << res;
}
void Solve()
{
}
int main()
{
if (fopen (task".inp", "r")) {
freopen (task".inp", "r", stdin);
freopen (task".out", "w", stdout);
}
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t;
for (t=1; t--;)
{
Read(); Solve();
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |