// In the name of God, the Most Gracious, the Most Merciful.
// iflbot(); - @yavuzskarahan
#include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define file(x) freopen(x ".in", "r", stdin); freopen(x ".out", "w", stdout);
#define F0R(i, R) for (int i = (0); i < (R); i++)
#define FOR(i, L, R) for (int i = (L); i <= (R); i++)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ll long long
#define int long long
#define pb push_back
#define ub(v, a) upper_bound((v).begin(), (v).end(), (a))
#define lb(v, a) lower_bound((v).begin(), (v).end(), (a))
#define f first
#define s second
#define space << " " <<
#define vi vector<int>
#define pii pair<int,int>
#define vpii vector<pair<int,int>>
#define now chrono::high_resolution_clock::now()
const long long N = 2e6+5;
const long long MOD = 1e9+7;
int n, a[N], b[N], t[N];
int team[2];
inline int solve(){
cin >> n;
a[0] = -INT_MAX;
t[0] = -INT_MAX;
FOR(i,1,n){
cin >> t[i] >> a[i] >> b[i];
int teama = (a[i] > 4 ? 1 : 0);
team[teama] += 100;
if (t[i] - t[i-1] <= 10 && a[i]==a[i-1]){
team[teama] += 50;
}
}
cout << team[0] space team[1] << endl;
// yavuzskarahan adamdır <3 <3 <3 <3 <3 <3
return 0;
}
int32_t main() {
#ifdef LOCAL
auto start = now;
#endif
fast;
//file("wormsort");
int t = 1;
//cin >> t;
while(t--){
solve();
}
#ifdef LOCAL
auto end = now;
chrono::duration<double> elapsed = end - start;
cout << endl << "runtime: " << endl << elapsed.count() << endl;
#endif
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2384 KB |
Output is correct |
2 |
Correct |
1 ms |
2524 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
4432 KB |
Output is correct |
2 |
Correct |
1 ms |
336 KB |
Output is correct |
3 |
Correct |
1 ms |
336 KB |
Output is correct |
4 |
Correct |
1 ms |
468 KB |
Output is correct |
5 |
Correct |
1 ms |
504 KB |
Output is correct |
6 |
Correct |
1 ms |
336 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2384 KB |
Output is correct |
2 |
Correct |
1 ms |
2524 KB |
Output is correct |
3 |
Correct |
1 ms |
4432 KB |
Output is correct |
4 |
Correct |
1 ms |
336 KB |
Output is correct |
5 |
Correct |
1 ms |
336 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
1 ms |
504 KB |
Output is correct |
8 |
Correct |
1 ms |
336 KB |
Output is correct |
9 |
Correct |
1 ms |
336 KB |
Output is correct |
10 |
Correct |
1 ms |
336 KB |
Output is correct |
11 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |