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 a[9];
int main()
{
int t,f,l,p=0,o=0,n;
cin>>n;
for (int i=0;i<n;i++)
{
cin>>t>>f>>l;
if (f>=1 && f<=4)
{
if (t-a[f]<=10 && a[f]!=0)
{
p+=150;
a[f]=t;
}
else
{
p+=100;
a[f]=t;
}
}
else if (f<=8 && f>=5)
{
if (t-a[f]<=10 && a[f]!=0)
{
o+=150;
a[f]=t;
}
else
{
o+=100;
a[f]=t;
}
}
}
cout<<p<<' '<<o;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |