이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#define fi first
#define se second
const int MOD = 1e9+7;
#define pin pair<int,int>
#define lup(i,x) for(int i=0; i<x; i++)
#define pb push_back
#define pu push
#define vint vector<int>
#define nitro ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define din(x) int x;cin>>x;
#define endl '\n'
#define cout std::cout
vector<pair<int,pair<int,int>>> p;
signed main(){
int n;
cin >> n;
int elang = 0;
int bebek = 0;
while(n--){
int t,a,b;
cin >> t >> a >> b;
for(auto n : p){
if(n.se.fi == a && t-n.fi <= 10 && t-n.fi>=0){
if(a<=4) elang+=50;
else bebek+=50;
}
}
p.pb({t,{a,b}});
if(a<=4) elang+=100;
else bebek+=100;
}
cout << elang << " " << bebek << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |