Borderou de evaluare (job #1582203)

Utilizator iulianrotaruRotaru Gheorghe-Iulian iulianrotaru Data 27 ianuarie 2016 18:50:24
Problema Steins;Gate Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:5:15: error: ‘int rand’ redeclared as different kind of symbol int i,c,n,m,k,rand,x,y,v[1<<8],B[1<<8][1<<8],M[2][1<<8][1<<8],w[30]; ^ In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/stdlib.h:380:12: error: previous declaration of ‘int rand()’ extern int rand (void) __THROW; ^ user.cpp: In function ‘void mul_1()’: user.cpp:14:23: error: invalid operands of types ‘int()throw ()’ and ‘int’ to binary ‘operator&’ if(M[rand&1][j][l]&&M[rand&1][l][k]) z++; ^ user.cpp:14:40: error: invalid operands of types ‘int()throw ()’ and ‘int’ to binary ‘operator&’ if(M[rand&1][j][l]&&M[rand&1][l][k]) z++; ^ user.cpp:15:17: warning: pointer to a function used in arithmetic [-Wpointer-arith] M[(rand+1)&1][j][k]=z&1; ^ user.cpp:15:20: error: invalid operands of types ‘int (*)()throw ()’ and ‘int’ to binary ‘operator&’ M[(rand+1)&1][j][k]=z&1; ^ user.cpp:17:7: error: ISO C++ forbids incrementing a pointer of type ‘int (*)()throw ()’ [-fpermissive] ++rand; ^ user.cpp:17:7: error: lvalue required as increment operand user.cpp: In function ‘void mul_2()’: user.cpp:27:23: error: invalid operands of types ‘int()throw ()’ and ‘int’ to binary ‘operator&’ if(M[rand&1][j][l]&&B[l][k]) z++; ^ user.cpp:28:17: warning: pointer to a function used in arithmetic [-Wpointer-arith] M[(rand+1)&1][j][k]=z&1; ^ user.cpp:28:20: error: invalid operands of types ‘int (*)()throw ()’ and ‘int’ to binary ‘operator&’ M[(rand+1)&1][j][k]=z&1; ^ user.cpp:30:7: error: ISO C++ forbids incrementing a pointer of type ‘int (*)()throw ()’ [-fpermissive] ++rand; ^ user.cpp:30:7: error: lvalue required as increment operand user.cpp: In function ‘int main()’: user.cpp:55:23: error: invalid operands of types ‘int()throw ()’ and ‘int’ to binary ‘operator&’ if(M[rand&1][c][i]) sol=max(sol,v[c]);

Ceva nu functioneaza?