foo.cc: In function 'int main()':
foo.cc:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:13:57: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1; i<=n; i++) scanf("%d",&a[i]), f[i][i]=0, s[i]=s[i-1]+a[i];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/tmp/ccpEYBqz.o: In function `main':
foo.cc:(.text.startup+0x2a): relocation truncated to fit: R_X86_64_32 against symbol `n' defined in .bss section in /tmp/ccpEYBqz.o
foo.cc:(.text.startup+0x3b): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpEYBqz.o
foo.cc:(.text.startup+0x49): relocation truncated to fit: R_X86_64_32 against symbol `a' defined in .bss section in /tmp/ccpEYBqz.o
foo.cc:(.text.startup+0x75): relocation truncated to fit: R_X86_64_32S against symbol `s' defined in .bss section in /tmp/ccpEYBqz.o
foo.cc:(.text.startup+0x80): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpEYBqz.o
foo.cc:(.text.startup+0x96): relocation truncated to fit: R_X86_64_32S against symbol `s' defined in .bss section in /tmp/ccpEYBqz.o
foo.cc:(.text.startup+0xd7): relocation truncated to fit: R_X86_64_32S against symbol `s' defined in .bss section in /tmp/ccpEYBqz.o
foo.cc:(.text.startup+0xe7): relocation truncated to fit: R_X86_64_32 against symbol `s' defined in .bss section in /tmp/ccpEYBqz.o
/tmp/ccpEYBqz.o: In function `_GLOBAL__sub_I_n':
foo.cc:(.text.startup+0x1a5): relocation truncated to fit: R_X86_64_32 against `.bss'
foo.cc:(.text.startup+0x1b4): relocation truncated to fit: R_X86_64_32 against `.bss'
collect2: error: ld returned 1 exit status
自豪的采用 HydroJudger 进行评测(github.com/hydro-dev/HydroJudger)