이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define Waimai ios::sync_with_stdio(false), cin.tie(0)
#define FOR(x,a,b) for(int x = a, I = b; x <= I; x++)
#define pb emplace_back
#define F first
#define S second
int n;
int ans[2];
vector<int> v[10];
int main() {
Waimai;
cin >> n;
while (n--) {
int t, a, b;
cin >> t >> a >> b;
v[a].pb(t);
}
FOR (i, 1, 8) {
int sum = 0;
sort(v[i].begin(), v[i].end());
FOR (j, 0, (int) v[i].size() - 1) {
if (j == 0 || v[i][j] - v[i][j - 1] > 10) sum += 100;
else sum += 150;
}
ans[(i - 1) / 4] += sum;
}
cout << ans[0] << ' ' << ans[1] << '\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |