제출 #1110622

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

컴파일 시 표준 에러 (stderr) 메시지

tuna.cpp: In function 'int32_t main()':
tuna.cpp:13:17: warning: 'para' may be used uninitialized in this function [-Wmaybe-uninitialized]
   13 |             para+=max(H,Z);
      |             ~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...