Submission #1110667

#TimeUsernameProblemLanguageResultExecution timeMemory
1110667vjudge1Tuna (COCI17_tuna)C++98
50 / 50
1 ms504 KiB
#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 timeMemoryGrader output
Fetching results...