Submission #1110668

#TimeUsernameProblemLanguageResultExecution timeMemory
1110668vjudge1Tuna (COCI17_tuna)C++98
50 / 50
1 ms372 KiB
// 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 timeMemoryGrader output
Fetching results...