이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//Ye Rooz Khoob Miad ???
#include<bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()
#define sz(x) (int) (x).size()
using namespace std;
typedef long long ll;
const int N = 1e5 + 10;
const int Inf = 1061109567;
struct Data {
int t, a, b;
};
int main(){
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int n;
cin >> n;
vector<Data> game;
for(int i = 0; i < n; i++) {
int t, a, b;
cin >> t >> a >> b;
game.pb({t, a, b});
}
ll teamA = 0, teamB = 0;
vector<int> last(10, -Inf);
for(auto [t, a, b] : game) {
int bones = 0;
if(t - last[a] <= 10) bones = 50;
if(a <= 4) teamA += 100 + bones;
else teamB += 100 + bones;
last[a] = t;
}
cout << teamA << ' ' << teamB << '\n';
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... |