이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <cctype>
using namespace std;
#define fi first
#define se second
#define int long long
#define all(v) v.begin(), v.end()
#define pb push_back
#define rep(i, a, b) for (int i = a; i <= b; i++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> ii;
typedef pair<string, ii> sii;
typedef pair<int, ii> iii;
const int INF = 3e18;
const long double EPS = 10e-9;
const ll MOD = 1e9+7;
signed main() {
ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
int n; cin >> n;
vector<int> last(8 + 2, - INF);
int scorea = 0, scoreb = 0;
for (int i=1; i<=n; i++) {
int t, a, b; cin >> t >> a >> b;
if (a > 4) {
scoreb += 100;
if (t - last[a] <= 10) scoreb += 50;
last[a] = t;
} else {
scorea += 100;
if (t - last[a] <= 10) scorea += 50;
last[a] = t;
}
} cout << scorea << " " << scoreb << '\n';
return 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... |