이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl '\n'
#define int long long int
//#define ll long long
#define pb push_back
#define p push
#define f first
#define s second
signed main(){
lalala;
int n;cin>>n;
int arr[8];
arr[0]=arr[1]=arr[2]=arr[3]=arr[4]=arr[5]=arr[6]=arr[7]=-10000;
vector<tuple<int,int,int>> v;
for(int i=0;i<n;i++){
int a,b,c;cin>>a>>b>>c;
b--;c--;
v.pb({a,b,c});
}
sort(v.begin(),v.end());
int cev=0,ans=0;
for(auto u:v){
int a,b,c;tie(a,b,c)=u;
if(b<4){
cev+=100;
if(arr[b]+10>=a)cev+=50;
}
else{
ans+=100;
if(arr[b]+10>=a)ans+=50;
}
arr[b]=a;
}
cout<<cev<<" "<<ans<<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... |