# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110649 | vjudge1 | Tuna (COCI17_tuna) | C++17 | 1 ms | 504 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;
int main() {
int N,x,H,Z,a,sum=0;
cin>>N>>x;
for(int i=0;i<N;i++){
cin>>H>>Z;
if(abs(H-Z)>x){
cin>>a;
sum+=a;
}
else{
if(H>Z)
sum+=H;
else
sum+=Z;
}
}
cout<<sum;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |