#include <bits/stdc++.h>
#define int long long
using namespace std;
const long long N = 2e5 + 5;
int a[N];
void solve()
{
int n;
cin >> n;
int t, a, b;
int red, blue;
red = blue = 0;
map<int, int> last;
for (int i = 0; i < n; i++)
{
cin >> t >> a >> b;
t++;
if (last[a] != 0)
{
if (t - last[a] <= 11)
{
if (a < 4)
{
blue += 150;
}
else
red += 150;
}
}
else
{
if (a <= 4)
{
blue += 100;
}
else
red += 100;
last[a] = t;
}
}
cout << blue << " " << red << endl;
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
int t = 1;
// cin >> t;
for (int i = 1; i <= t; i++)
{
// cout << "Case #" << i << ':' << ' ';
solve();
cout << endl;
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |