/ Vijos /

记录详情

Compile Error

foo.cpp:3:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main()
      ^
foo.cpp: In function 'int main()':
foo.cpp:14:33: error: invalid operands of types 'long int [21]' and 'long int [21]' to binary 'operator+'
 else a[i][j][k]=a[j][k]+a[j-1][k]+a[j][k-1]-a[j-1][k-1];
                                 ^
foo.cpp:16:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
 scanf("%d%d%d",&x,&b,&c);
                        ^
foo.cpp:16:24: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=]
foo.cpp:16:24: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long int*' [-Wformat=]
foo.cpp:19:63: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
 if ((x<=0)||(b<=0)||(c<=0)) printf("w(%d, %d, %d) = 1\n",x,b,c);
                                                               ^
foo.cpp:19:63: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
foo.cpp:19:63: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
foo.cpp:20:83: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
 else if ((x>20)||(b>20)||(c>20)) printf("w(%d, %d, %d) = %d\n",x,b,c,a[20][20][20]);
                                                                                   ^
foo.cpp:20:83: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
foo.cpp:20:83: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
foo.cpp:20:83: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long int' [-Wformat=]
foo.cpp:21:49: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
 else printf("w(%d, %d, %d) = %d\n",x,b,c,a[x][c]);
                                                 ^
foo.cpp:21:49: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
foo.cpp:21:49: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long int' [-Wformat=]
foo.cpp:21:49: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long int*' [-Wformat=]
foo.cpp:22:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
 scanf("%d%d%d",&x,&b,&c);
                        ^
foo.cpp:22:24: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=]
foo.cpp:22:24: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long int*' [-Wformat=]

信息

递交者
类型
递交
题目
P1080 Function(Function(F...
语言
C++
递交时间
2014-10-06 14:47:42
评测时间
2014-10-06 14:47:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes