# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
861737 | HossamHero7 | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 504 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;
typedef long long ll;
#define endl '\n'
void solve(){
int n;
cin>>n;
vector<array<ll,3>> v(n);
for(auto &[t,a,b] : v) cin>>t>>a>>b;
vector<int> lst(10,-1e9);
ll ans1 = 0;
ll ans2 = 0;
for(auto [t,a,b] : v){
if(a <= 4) {
ans1 += 100;
if(t-lst[a] <= 10) ans1 += 50;
}
else {
ans2 += 100;
if(t-lst[a] <= 10) ans2 += 50;
}
lst[a] = t;
}
cout<<ans1<<' '<<ans2<<endl;
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int t=1;
//cin>>t;
while(t--){
solve();
}
return 0;
}
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... |