# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110667 | vjudge1 | Tuna (COCI17_tuna) | C++98 | 1 ms | 504 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 y, x;
cin >> y >> x;
int toplam = 0;
for (int i = 0; i < y; i++) {
int a, b;
cin >> a >> b;
if (a - b <= x && b - a <= x) {
toplam += max(a, b);
} else {
int z;
cin >> z;
toplam += z;
}
}
cout << toplam << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |