Submission #651062

#TimeUsernameProblemLanguageResultExecution timeMemory
651062Jean7Ljeto (COCI21_ljeto)C++14
50 / 50
1 ms320 KiB
#include <bits/stdc++.h> #define int long long #define ff first #define ss second #define pob pop_back #define pub push_back #define lb lower_bound #define ub upper_bound #define low (i&(-i)) #define le (node<<1) #define ri (node<<1|1) #define mid ((l+r)>>1) #define no void(cout<<"NO\n") #define one void(cout<<"-1\n") #define yes void(cout<<"YES\n") #define sz(x) (int)x.size() #define all(x) x.begin(),x.end() #define mm(x,y) memset(x,y,sizeof(x)) using namespace std ; const int L = 23 ; const int T = 3e3+3 ; const int N = 1e6+6 ; const int M = 1e9+7 ; const int D = 998244353 ; const long long I = 0x3f ; const long long O = 1e18+18 ; int n , l[10] ; inline void solve () { cin >> n ; int x = 0 , y = 0 ; while ( n-- ) { int t , a , b ; cin >> t >> a >> b ; if ( a < b ) { x += 100 ; if ( t - l[a] <= 10 && l[a] != 0 ) { x += 50 ; } l[a] = t ; } else { y += 100 ; if ( t - l[a] <= 10 && l[a] != 0 ) { y += 50 ; } l[a] = t ; } } cout << x << " " << y ; } signed main () { //freopen ( ".in" , "r" , stdin ) ; //freopen ( ".out" , "w" , stdout ) ; cin.tie(0) ; cout.tie(0) ; ios_base::sync_with_stdio(0) ; //cout << setprecision(14) << fixed ; int tc = 1 ; //cin >> tc ; while ( tc-- ) { solve() ; } return 0 ; } /// JJJJJJJ EEEEEEE AAAAA NN NN 7777777 /// JJ EE AA AA NNN NN 77 /// JJ EEEEEE AAAAAAA NN N NN 77 /// JJ JJ EE AA AA NN NNN 77 /// JJJJJ EEEEEEE AA AA NN NN 77
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...