제출 #1110633

#제출 시각아이디문제언어결과실행 시간메모리
1110633vjudge1Tuna (COCI17_tuna)C++98
50 / 50
1 ms336 KiB
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { int t,m,para=0,H,Z,S; cin>>t>>m; for (int i = 0; i < t; i++) { cin>>H>>Z; if(abs(H - Z)<=m) { para+=max(H,Z); } else { cin>>S; para+=S; } } cout << para; }
#Verdict Execution timeMemoryGrader output
Fetching results...