# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110709 | vjudge1 | Tuna (COCI17_tuna) | C++98 | 1 ms | 336 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 <iostream>
using namespace std;
int main() {
int N, x;
cin >> N >> x;
int toplam = 0;
for (int i = 0; i < N; i++) {
int H, Z;
cin >> H >> Z;
if (abs(H - Z) <= x) {
toplam += (H > Z ? H : Z);
} else {
int S;
cin >> S;
toplam += S;
}
}
cout << toplam << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |