# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
659999 | ajthelegendcoder | Tuna (COCI17_tuna) | C++17 | 1 ms | 304 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;
cin >> n >> x;
int sum = 0;
while(n--){
int a,b;
cin >> a >> b;
if(abs(a-b) > x){
int c;
cin >> c;
sum += c;
} else {
sum += max(a,b);
}
}
cout << sum;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |