제출 #207726

#제출 시각아이디문제언어결과실행 시간메모리
207726DodgeBallManTuna (COCI17_tuna)C++14
50 / 50
5 ms384 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, m, sum = 0; cin >> n >> m; while(n--) { int a, b; cin >> a >> b; if(a < b) swap(a, b); if(a - b <= m) sum += a; else sum += *istream_iterator<int>(cin); } printf("%d\n", sum); }
#Verdict Execution timeMemoryGrader output
Fetching results...