/ Vijos /

记录详情

Compile Error

foo.c: In function 'main':
foo.c:33:9: warning: 'gets' is deprecated [-Wdeprecated-declarations]
   33 |         gets(num);
      |         ^~~~
In file included from foo.c:1:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
foo.c:34:13: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   34 |         l = strlen(num);
      |             ^~~~~~
foo.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | 
foo.c:34:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   34 |         l = strlen(num);
      |             ^~~~~~
foo.c:34:13: note: include '<string.h>' or provide a declaration of 'strlen'
foo.c:36:9: warning: 'gets' is deprecated [-Wdeprecated-declarations]
   36 |         gets(buf);
      |         ^~~~
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
foo.c:61:34: error: invalid operands to binary * (have 'int *' and 'int')
   61 |                 int tm = mods[0] * mods[i][l-1] % m;
      |                          ~~~~    ^ ~~~~~~~~~~~~
      |                          |                |
      |                          int *            int
foo.c:75:42: error: invalid operands to binary * (have 'int *' and 'int')
   75 |                         int tm = mods[0] * mods[i][j-1] * mods[j][l-1] % m;
      |                                  ~~~~    ^ ~~~~~~~~~~~~
      |                                  |                |
      |                                  int *            int
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1455 最小与最大
语言
C
递交时间
2023-11-13 21:33:49
评测时间
2023-11-13 21:33:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes