Borderou de evaluare (job #3204799)
Utilizator | Alexandra Iacob alexandraiacobel | Data | 17 februarie 2024 14:40:04 |
---|---|---|---|
Problema | Stramosi | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:7:58: error: 'int log2 [30]' redeclared as different kind of entity
7 | int n,m,i,j,mbr,str,dp[300005][25],father[250005],log2[30],pwr2[30];
| ^
In file included from /usr/include/features.h:490,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/os_defines.h:39,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/c++config.h:655,
from /usr/include/c++/12.2.1/cassert:43,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:33,
from main.cpp:1:
/usr/include/bits/mathcalls.h:133:1: note: previous declaration 'double log2(double)'
133 | __MATHCALL_VEC (log2,, (_Mdouble_ __x));
| ^~~~~~~~~~~~~~
main.cpp:9:1: error: ISO C++ forbids declaration of 'precalc' with no type [-fpermissive]
9 | precalc()
| ^~~~~~~
main.cpp: In function 'int precalc()':
main.cpp:11:4: error: 'pwr' was not declared in this scope; did you mean 'pwr2'?
11 | pwr[0]=1;
| ^~~
| pwr2
main.cpp:14:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
14 | log2[1]=0;
| ^
main.cpp:16:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
16 | log2[i]=log2[i/2]+1;
| ^
main.cpp:16:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
16 | log2[i]=log2[i/2]+1;
| ^
main.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
17 | }
| ^
main.cpp: In function 'int main()':
main.cpp:43:27: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
43 | int put = log2[str]; //2 //1 //0
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !