제출 #740000

#제출 시각아이디문제언어결과실행 시간메모리
740000fractlpaca삶의 질 (IOI10_quality)C++17
컴파일 에러
0 ms0 KiB
#include <stdio.h> #include <stdlib.h> #include "quality.h" static int R,C,H,W,Q[3001][3001],i,j,ans; int main(){ scanf("%d%d%d%d",&R,&C,&H,&W); for (i=0;i<R;i++) for (j=0;j<C;j++) scanf("%d",&Q[i][j]); ans = rectangle(R,C,H,W,Q); printf("%d\n",ans); return 0; }

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

quality.cpp: In function 'int main()':
quality.cpp:7:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    7 |    scanf("%d%d%d%d",&R,&C,&H,&W);
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
quality.cpp:8:45: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |    for (i=0;i<R;i++) for (j=0;j<C;j++) scanf("%d",&Q[i][j]);
      |                                        ~~~~~^~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cca7KPoL.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccoFf5RL.o:quality.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccoFf5RL.o: in function `main':
quality.cpp:(.text.startup+0xd4): undefined reference to `rectangle(int, int, int, int, int (*) [3001])'
/usr/bin/ld: /tmp/cca7KPoL.o: in function `main':
grader.cpp:(.text.startup+0xe9): undefined reference to `rectangle(int, int, int, int, int (*) [3001])'
collect2: error: ld returned 1 exit status