# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1176953 | maryamr | Ljeto (COCI21_ljeto) | C++20 | 0 ms | 0 KiB |
using namespace std;
#define int long long
signed main()
{
int n;
cin>>n;
int t[n], a[n], c[n];
int p=0, b=0;
for(int i=0; i<n; i++)
{
cin>>t[i]>>a[i]>>c[i];
if(a[i]<=4)
{
p+=100;
if(i>0)
{
if( a[i]==a[i-1] and t[i]-t[i-1]<=10)
{
p+=50;
}
}
}
else
{
b+=100;
if(i>0)
{
if( a[i]==a[i-1] and t[i]-t[i-1]<=10)
{
b+=50;
}
}
}
}
cout<<p<<" "<<b<<endl;
}