Submission #1110695

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