Compile Error

foo.cc: In function 'int main()':
foo.cc:5:15: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
  scanf("%d",&n);
             ~~^
foo.cc:7:19: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   scanf("%d",&a[i]);
              ~~~~~^
foo.cc:9:36: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
  scanf("%d %d %d %d",&m,&p1,&s1,&s2);
                      ~~            ^
foo.cc:9:36: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
foo.cc:9:36: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long long int*' [-Wformat=]
foo.cc:9:36: warning: format '%d' expects argument of type 'int*', but argument 5 has type 'long long int*' [-Wformat=]
foo.cc:39:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
  printf("%d ",ans);
                  ^
foo.cc:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
  ~~~~~^~~~~~~~~
foo.cc:7:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&a[i]);
   ~~~~~^~~~~~~~~~~~
foo.cc:9:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d %d %d",&m,&p1,&s1,&s2);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/ccppssXp.o: In function `main':
foo.cc:(.text.startup+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0x5b): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0x95): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0xb1): relocation truncated to fit: R_X86_64_PC32 against symbol `tiger' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `dragon' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol `dragon' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0x15a): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0x1f5): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0x253): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccppssXp.o
foo.cc:(.text.startup+0x262): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P2232 龙虎斗
语言
C++
递交时间
2021-10-24 10:02:49
评测时间
2021-10-24 10:02:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes