# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
681663 |
2023-01-13T14:48:32 Z |
Iliya |
Ljeto (COCI21_ljeto) |
C++17 |
|
1 ms |
212 KB |
//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 time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
212 KB |
Output is correct |
8 |
Correct |
0 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |