제출 #1176991

#제출 시각아이디문제언어결과실행 시간메모리
1176991maryamrLjeto (COCI21_ljeto)C++20
25 / 50
0 ms328 KiB
#include <bits/stdc++.h>
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 and a[i]==a[i-1] and t[i]-t[i-1]<=10)
            {
                    p+=50;
            }
        }
        else
        {
            b+=100;
            if( i>0 and a[i]==a[i-1] and t[i]-t[i-1]<=10)
            {
                    b+=50;
            }
        }
    }
    cout<<p<<" "<<b<<endl;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...