# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1186632 | trantrungkein | Ljeto (COCI21_ljeto) | C++20 | 0 ms | 328 KiB |
#include<bits/stdc++.h>
#define taskname "A"
using namespace std;
const int LIM = 1e3 + 5;
int n, ans[2], a[LIM], b[LIM];
int main(){
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
if(fopen(taskname".inp", "r")){
freopen(taskname".inp", "r", stdin);
}
cin >> n;
memset(a, ans[0] = ans[1] = 0, sizeof(a));
for(int _ = 0; _ < n; _++){
int t;
cin >> t >> a[t] >> b[t];
}
for(int i = 1; i < LIM; i++){
if(a[i] != 0){
for(int j = max(1, i - 10); j < i; j++){
if(a[j] == a[i]){
ans[(a[i] - 1) >> 2] += 50;
break;
}
}
ans[(a[i] - 1) >> 2] += 100;
}
}
cout << ans[0] << " " << ans[1];
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |