Submission #1305079

#TimeUsernameProblemLanguageResultExecution timeMemory
1305079hssaan_arifLjeto (COCI21_ljeto)C++20
25 / 50
1 ms580 KiB
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define pb push_back #define int long long #define fi first #define se second const int N = 3e5 + 5, M = 1e9 + 7, LG = 20; int n , A[N] , t , a , b; void solve(){ cin >> n; int ans = 0 , ans1 = 0; map<int,deque<int>> mp; for (int i=1 ; i<=n ; i++){ cin >> t >> a >> b; if (a <= 4){ ans += 100; for (int j : mp[a]){ if (t-j<=10) ans += 50; } }else{ ans1 += 100; for (int j : mp[a]){ if (t-j<=10) ans1 += 50; } } mp[a].push_front(t); } cout << ans << ' ' << ans1 << endl; } signed main(){ // freopen("" , "r" , stdin); // freopen("" , "w" , stdout); // cout << setprecision(30); ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int ts = 1; // cin >> ts; while(ts--){ solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...