제출 #97899

#제출 시각아이디문제언어결과실행 시간메모리
97899AKaan37Tuna (COCI17_tuna)C++14
50 / 50
3 ms512 KiB
#include <bits/stdc++.h> using namespace std; typedef long long int lo; typedef pair< int,int > PII; #define fi first #define se second #define mp make_pair #define pb push_back #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR for(int i=1;i<=n;i++) const int inf = 1000000000; const int mod = 1000000007; const int KOK = 100000; const int li = 100005; const int LOG = 20; lo n,m,cev,x,k,a[li]; vector<int> v; char c; string s; int main(){ scanf("%lld %lld",&n,&m); FOR{ scanf("%lld %lld",&x,&k); if(abs(k-x)<=m){cev+=max(x,k);continue;} lo t=0; scanf("%lld",&t); cev+=t; } printf("%lld\n",cev); return 0; }

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

tuna.cpp: In function 'int main()':
tuna.cpp:27:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld",&n,&m);
  ~~~~~^~~~~~~~~~~~~~~~~~~
tuna.cpp:29:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld %lld",&x,&k);
   ~~~~~^~~~~~~~~~~~~~~~~~~
tuna.cpp:32:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&t);
   ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...