This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#define fi first
#define se second
const int MOD = 1e9+7;
#define pin pair<int,int>
#define lup(i,x) for(int i=0; i<x; i++)
#define pb push_back
#define pu push
#define vint vector<int>
#define nitro ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define din(x) int x;cin>>x;
#define endl '\n'
#define cout std::cout
vector<pair<int,pair<int,int>>> p;
signed main(){
int n;
cin >> n;
int elang = 0;
int bebek = 0;
while(n--){
int t,a,b;
cin >> t >> a >> b;
for(auto n : p){
if(n.se.fi == a && t-n.fi <= 10){
if(a<=4) elang+=50;
else bebek+=50;
}
}
p.pb({t,{a,b}});
if(a<=4) elang+=100;
else bebek+=100;
}
cout << elang << " " << bebek << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |