Borderou de evaluare (job #2107387)

Utilizator ionanghelinaIonut Anghelina ionanghelina Data 17 ianuarie 2018 09:26:29
Problema Xor3 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:3:10: error: ‘int j1’ redeclared as different kind of symbol int q,i1,j1,a,b,m,sol; ^ In file included from /usr/include/features.h:357:0, from /usr/include/assert.h:37, from /usr/include/c++/4.8/cassert:43, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:33, from user.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:240:1: error: previous declaration of ‘double j1(double)’ __MATHCALL (j1,, (_Mdouble_)); ^ user.cpp: In function ‘int main()’: user.cpp:9:45: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘double (*)(double)throw ()’ [-Wformat=] scanf("%d%d%d%d%d%d",&q,&i1,&j1,&a,&b,&m); ^ user.cpp:13:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int p=1;p<=j1;p<<=1) ^ user.cpp:15:29: warning: pointer to a function used in arithmetic [-Wpointer-arith] if(!((i1+p)&(j1-p))) sol|=p; ^ user.cpp:15:30: error: invalid operands of types ‘int’ and ‘double (*)(double)throw ()’ to binary ‘operator&’ if(!((i1+p)&(j1-p))) sol|=p; ^ user.cpp:19:15: error: invalid operands of types ‘int’ and ‘double(double)throw ()’ to binary ‘operator*’ j1=(a*j1+b)%m; ^ user.cpp:6:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("xor3.in","r",stdin); ^ user.cpp:7:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("xor3.out","w",stdout); ^ user.cpp:9:46: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d%d%d%d%d",&q,&i1,&j1,&a,&b,&m); ^

Ceva nu functioneaza?