# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110668 | vjudge1 | Tuna (COCI17_tuna) | C++98 | 1 ms | 372 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.
// Online C++ compiler to run C++ program online
#include <iostream>
using namespace std;
int main() {
int x = 0;
int sayac = 0;
cin >> x;
int y = 0;
int s = 0;
cin >> y;
for(int i = 0;i < x;i++){
int z = 0;
int h = 0;
cin>>z;
cin>>h;
if(abs(h-z) <= y){
sayac+=max(h ,z);
}else{
cin >> s;
sayac+=s;
}
}
cout << sayac;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |