#3742
Gigel are n bile și k cutii. În câte moduri poate plasa Gigel bilele în cutii, știind că în fiecare cutie trebuie plasată cel puțin o bilă.
| Problema | StarsAndBars2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64563274 | Utilizator | |
| Fișier | starsandbars2.cpp | Dimensiune | 1.11 KB |
| Data încărcării | 14 Mai 2026, 13:43 | Scor/rezultat | Eroare de compilare |
starsandbars2.cpp:5:6: error: variable or field ‘Atrib’ declared void 5 | void Atrib(NrMare A, int n){ | ^~~~~ starsandbars2.cpp:5:18: error: expected ‘)’ before ‘A’ 5 | void Atrib(NrMare A, int n){ | ~ ^~ | ) starsandbars2.cpp:5:22: error: expected primary-expression before ‘int’ 5 | void Atrib(NrMare A, int n){ | ^~~ starsandbars2.cpp:13:6: error: variable or field ‘Afis’ declared void 13 | void Afis(NrMare A){ | ^~~~ starsandbars2.cpp:13:17: error: expected ‘)’ before ‘A’ 13 | void Afis(NrMare A){ | ~ ^~ | ) starsandbars2.cpp:17:6: error: variable or field ‘Produs’ declared void 17 | void Produs(NrMare A , int n){ | ^~~~~~ starsandbars2.cpp:17:19: error: expected ‘)’ before ‘A’ 17 | void Produs(NrMare A , int n){ | ~ ^~ | ) starsandbars2.cpp:17:24: error: expected primary-expression before ‘int’ 17 | void Produs(NrMare A , int n){ | ^~~ starsandbars2.cpp: In function ‘int main()’: starsandbars2.cpp:48:11: error: expected ‘;’ before ‘rez’ 48 | NrMare rez; | ^~~~ | ; starsandbars2.cpp:48:5: warning: statement has no effect [-Wunused-value] 48 | NrMare rez; | ^~~~~~ starsandbars2.cpp:49:5: error: ‘rez’ was not declared in this scope 49 | rez[rez[0] = 1] = 1; | ^~~ starsandbars2.cpp:51:9: error: ‘Produs’ was not declared in this scope 51 | Produs(rez , F[i]); | ^~~~~~ starsandbars2.cpp:52:5: error: ‘Afis’ was not declared in this scope 52 | Afis(rez); | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema StarsAndBars2 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ă.