# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
703970 |
2023-03-01T07:16:50 Z |
KazmetreD |
Ljeto (COCI21_ljeto) |
C++17 |
|
1 ms |
328 KB |
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "debug.h"
#else
#define debug(x) void(37)
#endif
#define lsb(x) ((x)&(-x))
#define all(x) x.begin(),x.end()
#define setprec(n) cout << fixed << showpoint;cout << setprecision(n);
typedef long long ll;
typedef long double ld;
const ld eps = 1e-10;
const ll MOD1 = 1e9+7;
const ll MOD2 = 998244353;
const ll LINF = 1e18;
const int IINF = 1e9;
#define int ll
void solve(){
int n;
cin >> n;
vector<int> last(9, -100);
pair<int,int> pts = {0, 0};
for(int i = 0;i < n;i++){
int t, a, b;
cin >> t >> a >> b;
if(a > b){
pts.second += 100;
if(t - last[a] <= 10) pts.second += 50;
}
if(b > a){
pts.first += 100;
if(t - last[a] <= 10) pts.first += 50;
}
last[a] = t;
}
cout << pts.first << " " << pts.second << "\n";
}
signed main(){
ios_base::sync_with_stdio(false); cin.tie(NULL);
mt19937 mt(time(NULL));
//setprec(10);
//freopen("sleepy.in", "r", stdin);
//freopen("in.txt", "w", stdout);
int t = 1;
//cin >> t;
for(int i = 1;i <= t;i++)
solve();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
328 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 |
# |
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 |
328 KB |
Output is correct |
4 |
Correct |
0 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 |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
316 KB |
Output is correct |
11 |
Correct |
0 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
324 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |