# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
674277 | Farhan_HY | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 300 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 IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define T int t;cin >> t;while(t--)
#define int long long
#define F first
#define S second
using namespace std;
const int mod = 1e9 + 7;
const int N = 5e4 + 6;
int n, lst[9];
main() {
cin >> n;
int ans1 = 0, ans2 = 0;
while(n--) {
int t, a, b;
cin >> t >> a >> b;
if (lst[a] != 0 && t - lst[a] <= 10) {
if (a <= 4) ans1 += 50;
else ans2 += 50;
}
if (a <= 4) ans1 += 100;
else ans2 += 100;
lst[a] = t;
}
cout << ans1 << ' ' << ans2;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |