Submission #499392

#TimeUsernameProblemLanguageResultExecution timeMemory
499392Haboosh915Ljeto (COCI21_ljeto)C++17
50 / 50
1 ms292 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...