제출 #239057

#제출 시각아이디문제언어결과실행 시간메모리
239057AutoratchTuna (COCI17_tuna)C++14
50 / 50
5 ms384 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n,x; cin >> n >> x; int ans = 0; while(n--) { int a,b; cin >> a >> b; if(abs(a-b)<=x) ans+=max(a,b); else cin >> a,ans+=a; } cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...