제출 #321674

#제출 시각아이디문제언어결과실행 시간메모리
321674daniel920712Soccer (JOI17_soccer)C++14
5 / 100
1 ms512 KiB
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <set>
#include <map>
#include <algorithm>
#include <time.h>
#include <algorithm>
#include <queue>
#include <utility>

using namespace std;
long long x[1000005];
long long y[1000005];
int main()
{
    long long H,W;
    long long N,A,B,C,i;
    scanf("%lld %lld",&H,&W);
    scanf("%lld %lld %lld",&A,&B,&C);
    scanf("%lld",&N);
    for(i=0;i<N;i++) scanf("%lld %lld",&x[i],&y[i]);
    printf("%lld\n",min(C*abs(y[1]-y[0])+min(C*abs(x[1]-x[0]),A*abs(x[1]-x[0])+B),C*abs(x[1]-x[0])+min(C*abs(y[1]-y[0]),A*abs(y[1]-y[0])+B)));
    return 0;
}

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

soccer.cpp: In function 'int main()':
soccer.cpp:20:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   20 |     scanf("%lld %lld",&H,&W);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~
soccer.cpp:21:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   21 |     scanf("%lld %lld %lld",&A,&B,&C);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
soccer.cpp:22:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   22 |     scanf("%lld",&N);
      |     ~~~~~^~~~~~~~~~~
soccer.cpp:23:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   23 |     for(i=0;i<N;i++) scanf("%lld %lld",&x[i],&y[i]);
      |                      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...