# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
974869 | vjudge1 | Ljeto (COCI21_ljeto) | C++17 | 1 ms | 604 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
signed main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int n; cin >> n;
vector < vector < int >> a ( 9 );
for ( int i = 1; i <= n; i++){
int time, t1, t2; cin >> time >> t1 >> t2;
a[t1].push_back(time);
}
ll ta = 0, tb = 0;
for ( int i = 1; i <= 8; i++){
ll now = -1e9;
for ( int j = 0; j < a[i].size(); j++){
if ( i <= 4 ){
if ( a[i][j] - now <= 10){
ta += 150;
now = a[i][j];
}
else{
ta += 100;
now = a[i][j];
}
}
else{
if ( a[i][j] - now <= 10 ){
tb += 150;
now = a[i][j];
}
else{
tb += 100;
now = a[i][j];
}
}
}
}
cout << ta << " " << tb << endl;
}
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... |