# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
633641 | rc_catunta | Ljeto (COCI21_ljeto) | C++14 | 0 ms | 212 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 <iostream>
#include <vector>
using namespace std;
int main(){
int x;cin>>x;
vector <vector <int> > dis;
dis.assign(8+1,vector<int>());
for(int i=0;i<x;i++){
int t,a,b;cin>>t>>a>>b;
dis[a-1].push_back(t);
}
int cont=0,contt=0;
for(int i=0;i<4;i++){
for(int j=0;j<dis[i].size();j++){
if(j==0){
cont+=100;
}else{
if(dis[i][j-1]>=(dis[i][j]-10)){
cont+=150;
}else{
cont+=100;
}
}
}
}
for(int i=4;i<8;i++){
for(int j=0;j<dis[i].size();j++){
if(j==0){
cont+=100;
}else{
if(dis[i][j-1]>=(dis[i][j]-10)){
contt+=150;
}else{
contt+=100;
}
}
}
}
cout<<cont<<" "<<contt;
return 0;
}
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... |