# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
397504 | Iwanttobreakfree | Tuna (COCI17_tuna) | C++98 | 1 ms | 296 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>
using namespace std;
int main(){
long long int n,x,p1,p2,p3,dif,sum=0;
cin>>n>>x;
while(n--){
cin>>p1>>p2;
dif=p2-p1;
p3=max(p2,p1);
if(dif<0)dif*=-1;
if(dif>x)cin>>p3;
sum+=p3;
}
cout<<sum;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |