제출 #1143585

#제출 시각아이디문제언어결과실행 시간메모리
11435850pt1mus23Ljeto (COCI21_ljeto)C++20
50 / 50
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int #define pii pair<int,int> #define endl '\n' #define all(x) x.begin(),x.end() const int mod = 998244353; const int inf = LLONG_MAX; const int LG = 23; const int sze = 2e5+23; int last[sze]; void fast(){ int n; cin>>n; for(int i=0;i<=10;i++){ last[i]=-INT_MAX; } int a=0; int b=0; vector<pair<int,pii>> lst; for(int i=0;i<n;i++){ int t,x,y; cin>>t>>x>>y; lst.push_back({t,{x,y}}); } sort(all(lst)); for(auto v:lst){ int t = v.first; int x = v.second.first; int y = v.second.second; if(x<=4){ a=a + 100 + 50 * ( (t - last[x]) < 11) ; } else{ b= b + 100 + 50 * ( (t - last[x]) <11 ); } last[x]=t; } cout<<a<<" "<<b<<endl; } signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int tt =1; // cin>>tt; while(tt--){ fast(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...