Borderou de evaluare (job #3189415)

Utilizator tryharderulbrebenel mihnea stefan tryharderul Data 5 ianuarie 2024 12:01:42
Problema Permheap Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:11:42: error: 'int log2 [200000]' redeclared as different kind of entity 11 | int fact[NMAX], permHeap[NMAX], log2[NMAX]; | ^ 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: In function 'int init()': main.cpp:18:43: error: 'mod' was not declared in this scope; did you mean 'modf'? 18 | fact[i] = (fact[i-1] * 1LL * i) % mod; | ^~~ | modf main.cpp:27:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 27 | log2[i] = curlog2; | ^ main.cpp:33:1: warning: no return statement in function returning non-void [-Wreturn-type] 33 | } | ^ main.cpp: In function 'int modularInverse(int)': main.cpp:37:13: error: 'mod' was not declared in this scope; did you mean 'modf'? 37 | int n = mod-2, res = 1; | ^~~ | modf main.cpp:40:13: error: 'res' was not declared in this scope 40 | res = (res * 1LL * a) % mod; | ^~~ main.cpp:46:12: error: 'res' was not declared in this scope 46 | return res; | ^~~ main.cpp: In function 'int coefBinomial(int, int)': main.cpp:52:59: error: 'mod' was not declared in this scope; did you mean 'modf'? 52 | int res = (fact[n] * 1LL * modularInverse(fact[k])) % mod; | ^~~ | modf main.cpp: In function 'int getleft(int)': main.cpp:60:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 60 | int h = log2[n]; | ^ main.cpp: In function 'int numberOfHeaps(int)': main.cpp:81:39: error: 'mod' was not declared in this scope; did you mean 'modf'? 81 | int x = coefBinomial(n-1, left) % mod; | ^~~ | modf Non zero exit status: 1

Ceva nu functioneaza?