제출 #681663

#제출 시각아이디문제언어결과실행 시간메모리
681663IliyaLjeto (COCI21_ljeto)C++17
50 / 50
1 ms212 KiB
//Ye Rooz Khoob Miad ??? #include<bits/stdc++.h> #define F first #define S second #define pb push_back #define all(x) x.begin(), x.end() #define sz(x) (int) (x).size() using namespace std; typedef long long ll; const int N = 1e5 + 10; const int Inf = 1061109567; struct Data { int t, a, b; }; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; vector<Data> game; for(int i = 0; i < n; i++) { int t, a, b; cin >> t >> a >> b; game.pb({t, a, b}); } ll teamA = 0, teamB = 0; vector<int> last(10, -Inf); for(auto [t, a, b] : game) { int bones = 0; if(t - last[a] <= 10) bones = 50; if(a <= 4) teamA += 100 + bones; else teamB += 100 + bones; last[a] = t; } cout << teamA << ' ' << teamB << '\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...