# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
643262 | kkkkkkkk | 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>
using namespace std;
int main()
{
int n;
cin >> n;
int t[n],a[n],b[n];
vector<int> v[9];
for (int i=0;i<n;i++)
{
cin >> t[i] >> a[i] >> b[i];
v[a[i]].push_back(t[i]);
}
for (int i=1;i<=8;i++)
sort(v[i].begin(),v[i].end());
int tim_a=0,tim_b=0;
for (int i=1;i<=8;i++)
{
int posl=-100,vk=0;
for (int j=0;j<v[i].size();j++)
{
vk+=100;
if (v[i][j]<=posl+10)
vk+=50;
posl=v[i][j];
}
if (i<=4) tim_a+=vk;
else tim_b+=vk;
}
cout << tim_a << " " << tim_b;
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... |