제출 #1305107

#제출 시각아이디문제언어결과실행 시간메모리
1305107ghammazhassanLjeto (COCI21_ljeto)C++20
50 / 50
1 ms580 KiB
// #include <bits/stdc++.h>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <vector>
#include <iomanip>
#include <string>
#include <queue>
#include <set>
#include <deque>
using namespace std;
#define int long long
#define endl "\n"
#define fi first
#define se second
const int M=998244353;
const int inf = 1e14;
const int LOG=18;
const int N=2e5+5;
int n , m , c , w , k , t=1 , q=1 , x , y , z , l , r;

void solve(){
    cin >> n;
    int c1=0,c2=0;
    vector<int>l(10,-11);
    for (int i=0;i<n;i++){
        cin >> w >> x >> y;
        if (x<5){
            c1+=100;
            if (l[x]+10>=w){
                c1+=50;
            }
            l[x]=w;
        }
        else{
            c2+=100;
            if (l[x]+10>=w){
                c2+=50;
            }
            l[x]=w;
        }
    }
    cout << c1 << " " << c2 << endl;
	
}
signed main()    
{   

    ios::sync_with_stdio(0);//DO NOT USE IN INTERACTIVE
    cin.tie(0), cout.tie(0);//DO NOT USE IN INTERACTIVE
    cout << fixed << setprecision(9);
    srand(time(0));
    // int t=1;
    // cin >> t;
    for (int _=1;_<=t;_++){
        solve();
        q++;
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...