#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
const int MAX = 3e5 + 6;
const int LOG = 25;
const int inf = 1e18;
const int mod = 1e9 + 7;
const int block = 333;
// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void _(){
int n;
cin >> n;
vector < int > t(n);
vector < int > a(n);
vector < int > b(n);
for(int i = 0; i < n; i++)
cin >> t[i] >> a[i] >> b[i];
int team1 = 0, team2 = 0;
if(a[0] >= 5) team2 += 100;
else team1 += 100;
for(int i = 1; i < n; i++){
int val = 100;
bool combo = 0;
for(int j = i - 1; j >= 0; j--){
if(t[i] - t[j] > 10) break;
if(a[j] == a[i]){
combo = 1;
break;
}
}
val += (combo == 1 ? 50 : 0);
if(a[i] >= 5) team2 += val;
else team1 += val;
}
cout << team1 << ' ' << team2 << endl;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t = 1;
// cin >> t;
while(t--) _();
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |