답안 #321674

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
321674 2020-11-13T03:12:21 Z daniel920712 Soccer (JOI17_soccer) C++14
5 / 100
1 ms 512 KB
#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;
}

Compilation message

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]);
      |                      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 512 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 512 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Incorrect 1 ms 364 KB Output isn't correct
7 Halted 0 ms 0 KB -