Submission #1110670

#TimeUsernameProblemLanguageResultExecution timeMemory
1110670vjudge1Tuna (COCI17_tuna)C++17
50 / 50
1 ms336 KiB
#include <bits/stdc++.h> 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 += max(H, Z); } else { int S; cin >> S; toplam += S; } } cout << toplam << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...