Submission #1110685

#TimeUsernameProblemLanguageResultExecution timeMemory
1110685vjudge1Tuna (COCI17_tuna)C++17
50 / 50
1 ms504 KiB
#include <bits/stdc++.h> using namespace std; int main() { int t,x; int top = 0; cin>>t>>x; for (int n = 0; n < t; ++n) { int a,b; cin>>a>>b; if (abs(a-b)>x) { int yeni; cin>>yeni; top += yeni; } else { if (a>b) { top += a; } else { top+=b; } } } cout<<top<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...