Submission #1176889

#TimeUsernameProblemLanguageResultExecution timeMemory
1176889artogruljLjeto (COCI21_ljeto)C++20
25 / 50
0 ms328 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define ll long long #define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); const ll inf = 1e9 + 7; const ll mod = 1e9 + 7; const ll start = 1e6 + 7; const ll maxi = 1e5; ll a, b, m, n, t, l, r, say=0, say1=0, say2=0, ans; const int N = 2500 + 5; ll dp[N]; bool comperator(pair<ll,ll> a, pair<ll,ll> b) { return a.second < b.second; } vector<ll>arr; void solve() { ll t; cin>>n; ll anans=0; ll blueberry=0; ll alast=-100; ll blast=-100; ll ac=-1, bc=-1; while(n--) { cin>>t>>a>>b; if(a<5) { anans+=100; if(t-alast<=10 and ac==a) { anans+=50; } alast=t; ac=a; } else { blueberry+=100; if(t-blast<=10 and bc==a) { blueberry+=50; } blast=t; bc=a; } } cout<<anans<<" "<<blueberry; cout<<'\n'; } int main() { fast; ll T = 1; //cin >> T; while(T--) { solve(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...