이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define ss second
#define ff first
int main() {
int n ; cin >> n ; int fi = 0 , se = 0 ;
pair <int , int> a[n+4] ;
for (int i = 1;i <= n;i ++ ) {
cin >> a[i].ss >> a[i].ff ;
int x ; cin >> x ;
}
sort ( a + 1 , a + n + 1 ) ;
if ( a[1].ff > 4 ) se += 100 ;
else fi += 100 ;
for (int i = 2 ; i <= n; i++ ) {
if ( a[i].ff <= 4 ) {
if ( a[i].ff == a[i-1].ff ) {
if ( a[i].ss - a[i-1].ss <= 10 ) fi += 150 ;
else fi += 100 ;
}
else fi += 100 ;
}
else {
if ( a[i].ff == a[i-1].ff ) {
if ( a[i].ss - a[i-1].ss <= 10 ) se += 150 ;
else se += 100 ;
}
else se += 100 ;
}
}
cout << fi << ' ' << se ;
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... |