/ Vijos /

记录详情

Compile Error

foo.c: In function 'judgement':
foo.c:33:17: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   33 |         else if(abs(small1-small2)==2&&small1>small2&&small2>=type-1)
      |                 ^~~
foo.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | char score[100];
foo.c: In function 'main':
foo.c:57:43: warning: comparison between pointer and integer
   57 |                 if(score[p]=='W'||score[p]=="L")
      |                                           ^~
foo.c:57:43: warning: comparison with string literal results in unspecified behavior [-Waddress]
foo.c:64:37: error: 'scaore' undeclared (first use in this function); did you mean 'score'?
   64 |                         scanf("%c",&scaore[p]);
      |                                     ^~~~~~
      |                                     score
foo.c:64:37: note: each undeclared identifier is reported only once for each function it appears in
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1217 乒乓球
语言
C
递交时间
2022-09-08 13:37:42
评测时间
2022-09-08 14:00:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes