제출 #864806

#제출 시각아이디문제언어결과실행 시간메모리
864806epicci23Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms600 KiB
#include "bits/stdc++.h" using namespace std; #define int long long #define endl '\n' #define all(x) (x).begin(),(x).end() #define pb push_back #define sz(x) ((int)(x).size()) void solve(){ int n; cin >> n; int c1=0,c2=0; int last[9]; fill(last,last+9,-1000); for(int i=1;i<=n;i++){ int t,a,b; cin >> t >> a >> b; if(a<=4){ c1+=100; if(t-last[a]<=10) c1+=50; last[a]=t; } else{ c2+=100; if(t-last[a]<=10) c2+=50; last[a]=t; } } cout << c1 << " " << c2 << endl; } int32_t main(){ ios::sync_with_stdio(0); cin.tie(0); int t=1;//cin >> t; while(t--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...