Submission #1110613

#TimeUsernameProblemLanguageResultExecution timeMemory
1110613vjudge1Tuna (COCI17_tuna)C++17
50 / 50
1 ms592 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int32_t main(){ int n,x,ans=0; cin >> n >> x; for(int i=0;i<n;i++){ int a,b; cin >> a >> b; if(abs(a-b)<=x){ ans+=max(a,b); } else{ int c; cin >> c; ans+=c; } } cout << ans << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...