제출 #1128680

#제출 시각아이디문제언어결과실행 시간메모리
1128680jackofall718Ljeto (COCI21_ljeto)C++20
50 / 50
1 ms328 KiB
#include <bits/stdc++.h> #define ll long long int #define endl '\n' #define vn vector <ll> using namespace std; const int MAX_N = 1e9 + 7; #define pii pair <ll,ll> #define pb push_back #define srt(vp) sort(vp.begin(), vp.end()) int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll n; cin>>n; vector <vn> v(9); for (int i=1;i<=8;i++){ v[i].pb(-200); } ll sum1=0; ll sum2=0; while (n--){ ll t,a,b; cin>>t>>a>>b; ll score; if ( v[a].back() + 10 >= t) score=150; else score = 100; v[a].pb(t); if (a<5) sum1 += score; else sum2 += score; } cout<<sum1<<" "<<sum2<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...