/ Vijos /

记录详情

Runtime Error

/in/foo.c: In function 'listcreate':
/in/foo.c:61:16: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
  if(i<2&&i>10) exit(0);
                ^~~~
/in/foo.c:61:16: warning: incompatible implicit declaration of built-in function 'exit'
/in/foo.c:61:16: note: include '<stdlib.h>' or provide a declaration of 'exit'
/in/foo.c:64:34: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
         temp=(struct gift_giver*)malloc(sizeof(struct gift_giver));
                                  ^~~~~~
/in/foo.c:64:34: warning: incompatible implicit declaration of built-in function 'malloc'
/in/foo.c:64:34: note: include '<stdlib.h>' or provide a declaration of 'malloc'
/in/foo.c:65:9: warning: 'gets' is deprecated [-Wdeprecated-declarations]
         gets(temp->name);
         ^~~~
In file included from /in/foo.c:2:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.c:78:9: warning: 'gets' is deprecated [-Wdeprecated-declarations]
         gets(temp_name);
         ^~~~
In file included from /in/foo.c:2:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.c:86:49: warning: incompatible implicit declaration of built-in function 'exit'
   if(pcur->give_money<0&&pcur->give_money>2000) exit(0);
                                                 ^~~~
/in/foo.c:86:49: note: include '<stdlib.h>' or provide a declaration of 'exit'
/in/foo.c:87:37: warning: incompatible implicit declaration of built-in function 'malloc'
         pcur->givelist=(char(*)[14])malloc(sizeof(char[14])*(pcur->number));
                                     ^~~~~~
/in/foo.c:87:37: note: include '<stdlib.h>' or provide a declaration of 'malloc'
/in/foo.c:91:20: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[14]' [-Wformat=]
            scanf("%s",(pcur->givelist+k));
                    ^
/tmp/cc1McOhi.o: In function `listcreate':
foo.c:(.text+0xe8): warning: the `gets' function is dangerous and should not be used.
# 状态 耗时 内存占用
#1 Runtime Error 2ms 256.0 KiB
#2 Runtime Error 2ms 256.0 KiB
#3 Runtime Error 1ms 256.0 KiB
#4 Runtime Error 7ms 256.0 KiB
#5 Runtime Error 2ms 256.0 KiB
#6 Runtime Error 2ms 256.0 KiB
#7 Runtime Error 3ms 256.0 KiB
#8 Runtime Error 2ms 256.0 KiB
#9 Runtime Error 2ms 256.0 KiB
#10 Runtime Error 2ms 256.0 KiB

信息

递交者
类型
递交
题目
P1035 贪婪的送礼者
语言
C
递交时间
2018-08-31 17:59:27
评测时间
2018-08-31 17:59:27
评测机
分数
0
总耗时
29ms
峰值内存
256.0 KiB