# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
207726 | DodgeBallMan | Tuna (COCI17_tuna) | C++14 | 5 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |