Submission #1110651

#TimeUsernameProblemLanguageResultExecution timeMemory
1110651vjudge1Tuna (COCI17_tuna)C++17
50 / 50
1 ms508 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int teklif; int x; int d=0; int s1,s2,es; cin>>teklif; cin>>x; for(long long n=0;n<teklif;n++){ cin>>s1>>s2; if(abs(s1-s2)<=x){ if(s1>s2) d+=s1; else d+=s2; } else{ cin>>es; d+=es; } } cout<<d; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...