제출 #556468

#제출 시각아이디문제언어결과실행 시간메모리
556468new_accLjeto (COCI21_ljeto)C++14
50 / 50
1 ms332 KiB
#include<bits/stdc++.h> #define fi first #define se second #define pitem item* using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vl; const int N=1e6+10; const int SS=1<<19; const int INFi=2e9; const ll INFl=1e13; const ll mod2=998244353; const ll mod=1e9+7; const ll mod3=1000696969; const ll p=70032301; const ull p2=913; const int L=20; int last[N]; void solve(){ int n; cin>>n; for(int i=1;i<=8;i++) last[i]=-1000; int res1=0,res2=0; for(int i=1;i<=n;i++){ int a,b,c; cin>>a>>b>>c; if(b<=4){ res1+=100; if(a-last[b]<=10) res1+=50; }else{ res2+=100; if(a-last[b]<=10) res2+=50; } last[b]=a; } cout<<res1<<" "<<res2<<"\n"; } int main(){ ios_base::sync_with_stdio(0),cin.tie(0); int tt=1; while(tt--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...