# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
492133 | LAMPALPHA | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 292 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 ll long long
#define endl "\n";
using namespace std;
vector<pair<ll,ll>>lis[10];
void fast(){ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);}
signed main()
{
ll x;
ll ans1=0,ans2=0;
cin>>x;
for(int i=0;i<x;i++)
{
ll r;
ll a,b;
cin>>a>>r>>b;
lis[r].push_back(make_pair(a,b));
}
for(int i=0;i<9;i++)
{
if(lis[i].size()!=0){
for(int j=0;j<lis[i].size()-1;j++)
{
if(abs(lis[i][j].first-lis[i][j+1].first)<=10)
{
if(i<=4)ans1+=150;
else ans2+=150;}
else
{
if(i<=4)ans1+=100;
else ans2+=100;
}
}}
if(lis[i].size()>=1)
{
if(i<=4)ans1+=100;
else ans2+=100;
}
}
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... |