제출 #1176905

#제출 시각아이디문제언어결과실행 시간메모리
1176905husu1331Ljeto (COCI21_ljeto)C++20
25 / 50
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back int main() { ll n; cin>>n; vector<ll>pa,bb,pa1,bb1; ll p=0; ll s=0; for(ll i=0;i<n;i++){ ll a,b,c; cin>>a>>b>>c; if(b<5){ p+=100; pa.pb(a); pa1.pb(b); } else{ s+=100; bb.pb(a); bb1.pb(b); } } for(ll i=1;i<pa.size();i++){ if(pa[i]-pa[i-1]<=10 and pa1[i]==pa1[i-1]){ p+=50; } } for(ll i=1;i<bb.size();i++){ if(bb[i]-bb[i-1]<=10 and bb1[i]==bb1[i-1]){ s+=50; } } cout<<p<<" "<<s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...