# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110631 | 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;
int x;
int puan=0;
scanf("%d %d",&n,&x);
int a,b,c;
for(int i=0;i<n;i++){
scanf("%d %d",&a, &b);
if(abs(a-b)>x){
scanf("%d",&c);
puan+=c;
}
else{
puan+=max(a,b);
}
}
printf("%d",puan);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |