/ Vijos /

记录详情

Compile Error

/in/foo.c:23:5: error: expected specifier-qualifier-list before 'mat'
     mat(int M=0,int N=0){m=M;n=N;}
     ^~~
/in/foo.c:34:1: error: unknown type name 'mat'
 mat operator*(mat a,mat b){
 ^~~
/in/foo.c:34:1: note: use 'struct' keyword to refer to the type
/in/foo.c:34:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
 mat operator*(mat a,mat b){
             ^
/in/foo.c:50:1: error: unknown type name 'mat'
 mat operator^(mat x,ll p){
 ^~~
/in/foo.c:50:1: note: use 'struct' keyword to refer to the type
/in/foo.c:50:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '^' token
 mat operator^(mat x,ll p){
             ^
/in/foo.c: In function 'main':
/in/foo.c:3:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'll * {aka long long int *}' [-Wformat=]
 #define GetI64(x) scanf("%I64d",&x)
                         ^
/in/foo.c:62:5: note: in expansion of macro 'GetI64'
     GetI64(m);GetI64(a);GetI64(c);GetI64(x0);GetI64(n);GetI64(g);
     ^~~~~~
/in/foo.c:3:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'll * {aka long long int *}' [-Wformat=]
 #define GetI64(x) scanf("%I64d",&x)
                         ^
/in/foo.c:62:15: note: in expansion of macro 'GetI64'
     GetI64(m);GetI64(a);GetI64(c);GetI64(x0);GetI64(n);GetI64(g);
               ^~~~~~
/in/foo.c:3:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'll * {aka long long int *}' [-Wformat=]
 #define GetI64(x) scanf("%I64d",&x)
                         ^
/in/foo.c:62:25: note: in expansion of macro 'GetI64'
     GetI64(m);GetI64(a);GetI64(c);GetI64(x0);GetI64(n);GetI64(g);
                         ^~~~~~
/in/foo.c:3:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'll * {aka long long int *}' [-Wformat=]
 #define GetI64(x) scanf("%I64d",&x)
                         ^
/in/foo.c:62:35: note: in expansion of macro 'GetI64'
     GetI64(m);GetI64(a);GetI64(c);GetI64(x0);GetI64(n);GetI64(g);
                                   ^~~~~~
/in/foo.c:3:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'll * {aka long long int *}' [-Wformat=]
 #define GetI64(x) scanf("%I64d",&x)
                         ^
/in/foo.c:62:46: note: in expansion of macro 'GetI64'
     GetI64(m);GetI64(a);GetI64(c);GetI64(x0);GetI64(n);GetI64(g);
                                              ^~~~~~
/in/foo.c:3:25: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'll * {aka long long int *}' [-Wformat=]
 #define GetI64(x) scanf("%I64d",&x)
                         ^
/in/foo.c:62:56: note: in expansion of macro 'GetI64'
     GetI64(m);GetI64(a);GetI64(c);GetI64(x0);GetI64(n);GetI64(g);
                                                        ^~~~~~
/in/foo.c:64:5: error: unknown type name 'mat'
     mat b(1,2);
     ^~~
/in/foo.c:64:5: note: use 'struct' keyword to refer to the type
/in/foo.c:64:11: error: expected declaration specifiers or '...' before numeric constant
     mat b(1,2);
           ^
/in/foo.c:64:13: error: expected declaration specifiers or '...' before numeric constant
     mat b(1,2);
             ^
/in/foo.c:65:5: error: 'b' undeclared (first use in this function)
     b[1][1]=x0;
     ^
/in/foo.c:65:5: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:67:5: error: unknown type name 'mat'
     mat f(2,2);
     ^~~
/in/foo.c:67:5: note: use 'struct' keyword to refer to the type
/in/foo.c:67:11: error: expected declaration specifiers or '...' before numeric constant
     mat f(2,2);
           ^
/in/foo.c:67:13: error: expected declaration specifiers or '...' before numeric constant
     mat f(2,2);
             ^
/in/foo.c:68:5: error: 'f' undeclared (first use in this function)
     f[1][1]=a;
     ^
/in/foo.c:72:5: error: unknown type name 'mat'
     mat ans=b*(f^n);
     ^~~
/in/foo.c:72:5: note: use 'struct' keyword to refer to the type
/in/foo.c:73:13: error: subscripted value is neither array nor pointer nor vector
     ll x=ans[1][1]%g;
             ^
/in/foo.c:4:33: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
 #define PutI64(x,arg...) printf("%I64d" arg,x)
                                 ^
/in/foo.c:75:5: note: in expansion of macro 'PutI64'
     PutI64(x,"\n");
     ^~~~~~
/in/foo.c:72:9: warning: variable 'ans' set but not used [-Wunused-but-set-variable]
     mat ans=b*(f^n);
         ^~~

信息

递交者
类型
递交
题目
P1725 随机数生成器
语言
C
递交时间
2018-03-24 20:46:02
评测时间
2018-03-24 20:46:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes