# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
239057 | Autoratch | 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,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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |