#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 ;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
0 ms |
292 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
292 KB |
Output is correct |
9 |
Correct |
0 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |
11 |
Correct |
0 ms |
204 KB |
Output is correct |
12 |
Correct |
0 ms |
204 KB |
Output is correct |
13 |
Correct |
0 ms |
204 KB |
Output is correct |