이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
typedef long long ll;
const ll INF = 1e9;
const ll MOD = 1e9 + 7;
const ll MAXN = 1e6 + 5;
const ll LOG = 61;
#define vll vector <ll>
#define pll pair <ll, ll>
#define fi first
#define se second
#define endl '\n'
ll n, m;
ll a [20];
ll ans [5];
void solve(){
cin >> n;
for(ll i = 1; i <= n; i++){
ll b, x, y; cin >> b >> x >> y;
bool ya = 0;
if(x >= 5) ya = 1;
ans[ya] += 100;
if(a[x] && b-a[x] <= 10) ans[ya] += 50;
a[x] = b;
}
cout << ans[0] << " " << ans[1] << endl;
}
int main(){
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// ll t; cin >> t;
// while(t--){
solve();
// }
}
// 3
// 10 1 6
// 20 1 7
// 21 8 1
// 3
// 10 2 5
// 15 2 6
// 25 2 5
// 2
// 10 5 2
// 11 6 3
// 3 3 5
// 7 6 2
// 15 1 8
// 16 5 4
// 18 2 7
// 23 4 6
// 26 8 3
// 30 7 1
// 34 1 5
// 36 3 6
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |