# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1081481 | Wasif_Shahzad | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 344 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>
using namespace std;
#define int int64_t
int32_t main(){
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
int n;
cin >> n;
vector<int> last(9, -1ll);
int sc1 = 0, sc2 = 0;
for(int i = 0; i < n; i++){
int t, a, b;
cin >> t >> a >> b;
if(t - last[a] <= 10 && last[a] != -1){
(a <= 4 ? sc1 += 150 : sc2 += 150);
}
else{
(a <= 4 ? sc1 += 100 : sc2 += 100);
}
last[a] = t;
}
cout << sc1 << " " << sc2 << "\n";
}
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... |