记录详情

Memory Exceeded

/in/foo.c: In function 'main':
/in/foo.c:7:15: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
  int *a=(int*)malloc(sizeof(int)*n);
               ^~~~~~
/in/foo.c:7:15: warning: incompatible implicit declaration of built-in function 'malloc'
/in/foo.c:7:15: note: include '<stdlib.h>' or provide a declaration of 'malloc'
/in/foo.c:9:12: warning: format '%ld' expects argument of type 'long int *', but argument 2 has type 'int *' [-Wformat=]
   scanf("%ld",&a[i]);
            ^
/in/foo.c:11:13: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
   printf("%ld ",a[i]);
             ^
/in/foo.c:12:12: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=]
  printf("%ld",a[0]);
            ^
/in/foo.c:13:2: warning: implicit declaration of function 'free' [-Wimplicit-function-declaration]
  free(a);
  ^~~~
/in/foo.c:13:2: warning: incompatible implicit declaration of built-in function 'free'
/in/foo.c:13:2: note: include '<stdlib.h>' or provide a declaration of 'free'
/in/foo.c:5:11: warning: unused variable 'b' [-Wunused-variable]
  long n,i,b;
           ^
# 状态 耗时 内存占用
#1 Accepted 1ms 204.0 KiB
#2 Memory Exceeded ≥493ms ≥16.0 MiB

信息

递交者
类型
递交
题目
1-3 序列循环左移
语言
C
递交时间
2019-03-31 16:53:41
评测时间
2019-03-31 16:53:41
评测机
分数
50
总耗时
≥494ms
峰值内存
≥16.0 MiB