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 <iostream>
using namespace std;
int p[9];
int main()
{
int t,a,b,ps=0,bs=0,n;
cin>>n;
for (int i=0;i<n;i++)
{
cin>>t>>a>>b;
if (a>=1 && a<=4)
{
if (t-p[a]<=10 && p[a]!=0)
{
ps+=150;
p[a]=t;
}
else
{
ps+=100;
p[a]=t;
}
}
else if (a<=8 && a>=5)
{
if (t-p[a]<=10 && p[a]!=0)
{
bs+=150;
p[a]=t;
}
else
{
bs+=100;
p[a]=t;
}
}
}
cout<<ps<<' '<<bs;
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... |