#3741
StarsAndBars1
Gigel are n
bile și k
cutii. În câte moduri poate plasa Gigel bilele în cutii, știind că pot rămâne și cutii goale.
Problema | StarsAndBars1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48253299 | Utilizator | |
Fișier | starsandbars1.cpp | Dimensiune | 955 B |
Data încărcării | 19 Ianuarie 2024, 17:53 | Scor / rezultat | Eroare de compilare |
starsandbars1.cpp: In function 'int factorial(int)': starsandbars1.cpp:10:23: error: 'produs' was not declared in this scope produs(p,n); ^ starsandbars1.cpp:11:12: error: invalid conversion from 'int*' to 'int' [-fpermissive] return p; ^ starsandbars1.cpp:6:12: warning: address of local variable 'p' returned [-Wreturn-local-addr] nrmare p; ^ starsandbars1.cpp: In function 'int impartire(int*, int*)': starsandbars1.cpp:31:14: error: 'Shl' was not declared in this scope { Shl(R,1);R[1]=A[i]; ^ starsandbars1.cpp:33:21: error: 'Sgn' was not declared in this scope while (Sgn(B,R)!=1) ^ starsandbars1.cpp:35:23: error: 'Subtract' was not declared in this scope Subtract(R,B); ^ starsandbars1.cpp:39:10: error: invalid conversion from 'int*' to 'int' [-fpermissive] return C; ^ starsandbars1.cpp:28:15: warning: address of local variable 'C' returned [-Wreturn-local-addr] int R[1010],C[1010]; ^ starsandbars1.cpp: In function 'int combinari(int, int)': starsandbars1.cpp:43:30: error: array must be initialized with a brace-enclosed initializer int jos[1010]=factorial(n); ^ starsandbars1.cpp:44:34: error: array must be initialized with a brace-enclosed initializer int sus[1010]=factorial(n+k-1); ^ starsandbars1.cpp: In function 'int main()': starsandbars1.cpp:51:6: error: incompatible types in assignment of 'int' to 'int [1010]' v=combinari (n,k); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema StarsAndBars1 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.