제출 #1317485

#제출 시각아이디문제언어결과실행 시간메모리
1317485batigolLjeto (COCI21_ljeto)C++20
50 / 50
1 ms332 KiB
/* */ //#pragma GCC optimize("O3,unroll-loops") //#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #include <bits/stdc++.h> #define ll long long #define vll vector<ll> #define pll pair<ll,ll> #define iter vector<ll>::iterator #define fir first #define sec second #define pushf push_front #define pushb push_back #define popf pop_front #define popb pop_back #define mp make_pair #define all(a) a.begin(), a.end() #define f(a) for(ll _ = 0; _ < a; _++) #define fa(i,a) for(ll i = 0; i < a; i++) #define fab(i,a,b) for(ll i = a; i < b; i++) #define rf(a) for (ll _ = (a)-1; _ >= 0; --_) #define rfa(i,a) for (ll i = (a)-1; i >= 0; --i) #define rfab(i,a,b) for (ll i = (b)-1; i >= a; --i) #define inf LLONG_MAX/2 #define ninf LLONG_MIN/2 #define input(a,b) a b; cin >> b using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll n; cin>>n; vector<vll> arr(9); fa(i,n){ ll t, a, b; cin>>t>>a>>b; arr[a].pushb(t); } ll suma = 0, sumb = 0; fab(i,1,9){ if(arr[i].empty()) continue; ll temp = 100; fab(j,1,(ll)arr[i].size()){ if(arr[i][j]-arr[i][j-1]<=10){ temp += 50; } temp += 100; } if(i<=4) suma += temp; else sumb += temp; } cout<<suma<<" "<<sumb<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...