#3336
Candyman are acadele de trei feluri: cu căpşuni, cu vişine şi cu zmeură, oricâte acadele din fiecare fel. Cei n copii de la grupa pregătitoare şi-au ales fiecare câte o acadea astfel încât cel mult doi copii şi-au ales cu vişine. Dacă notăm cu m numărul de moduri în care puteau să-şi aleagă fiecare câte o acadea, să se afle restul împărţirii lui m la 2020.
| Problema | acadele | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64676006 | Utilizator | |
| Fișier | acadele.cpp | Dimensiune | 7.50 KB |
| Data încărcării | 22 Mai 2026, 03:01 | Scor/rezultat | 65 puncte |
acadele.cpp: In function ‘long long unsigned int putere(int, int)’: acadele.cpp:27:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 27 | while (b > produs) { | ~~^~~~~~~~ acadele.cpp:32:16: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] 32 | if (produs <= b) { | ~~~~~~~^~~~ acadele.cpp: In function ‘int PB_ceva()’: acadele.cpp:124:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 124 | for (int i = 0; i < strlen(n); i++) { | ~~^~~~~~~~~~~ acadele.cpp:125:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] 125 | freq[n[i]]++; | ~~~^ acadele.cpp:128:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] 128 | if (freq[i] > 1) { | ^ acadele.cpp:129:37: warning: array subscript has type ‘char’ [-Wchar-subscripts] 129 | suma /= Permutari_cu_mod(freq[i]); | ^ acadele.cpp:121:7: warning: unused variable ‘k’ [-Wunused-variable] 121 | int k; | ^ acadele.cpp: In function ‘int descompunere_factori_factoriale()’: acadele.cpp:141:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 141 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ acadele.cpp:152:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 152 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ acadele.cpp:165:1: warning: no return statement in function returning non-void [-Wreturn-type] 165 | } | ^ acadele.cpp: In function ‘int ma2in()’: acadele.cpp:172:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 172 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ acadele.cpp:179:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 179 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ acadele.cpp:169:27: warning: unused variable ‘cntc’ [-Wunused-variable] 169 | int cnta = 0, cntb = 0, cntc = 0; | ^~~~ acadele.cpp:192:1: warning: no return statement in function returning non-void [-Wreturn-type] 192 | } | ^ acadele.cpp: In function ‘int pb_3630_30_limita_de_timp_depasita()’: acadele.cpp:234:27: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘long long unsigned int’ [-Wsign-compare] 234 | for (long long i = 1; i <= n; i++) { | ~~^~~~ acadele.cpp:241:1: warning: no return statement in function returning non-void [-Wreturn-type] 241 | } | ^ acadele.cpp: In function ‘int pb_1297()’: acadele.cpp:258:1: warning: no return statement in function returning non-void [-Wreturn-type] 258 | } | ^ acadele.cpp: In function ‘int veverita_programare_dinamica()’: acadele.cpp:289:1: warning: no return statement in function returning non-void [-Wreturn-type] 289 | } | ^ acadele.cpp: In function ‘int pb_3589()’: acadele.cpp:319:1: warning: no return statement in function returning non-void [-Wreturn-type] 319 | } | ^ acadele.cpp: In function ‘int pb_2011_50()’: acadele.cpp:334:1: warning: no return statement in function returning non-void [-Wreturn-type] 334 | } | ^ acadele.cpp: In function ‘int prob4812()’: acadele.cpp:229:1: warning: control reaches end of non-void function [-Wreturn-type] 229 | } | ^ acadele.cpp: In function ‘int pb_1163()’: acadele.cpp:351:1: warning: control reaches end of non-void function [-Wreturn-type] 351 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.003 secunde | OK. | 7 | 7 | Exemplu | |
| 2 | Depășit | Limita de timp depășită | 7 | 0 | ||
| 3 | 0.001 secunde | OK. | 7 | 7 | ||
| 4 | 0.001 secunde | OK. | 7 | 7 | ||
| 5 | 0.001 secunde | OK. | 7 | 7 | ||
| 6 | 0.001 secunde | OK. | 7 | 7 | ||
| 7 | 0.002 secunde | OK. | 7 | 7 | ||
| 8 | 0.001 secunde | OK. | 4 | 4 | ||
| 9 | 0.001 secunde | OK. | 4 | 4 | ||
| 10 | 0.001 secunde | OK. | 4 | 4 | ||
| 11 | 0.001 secunde | OK. | 4 | 4 | ||
| 12 | Depășit | Limita de timp depășită | 4 | 0 | ||
| 13 | Depășit | Limita de timp depășită | 4 | 0 | ||
| 14 | 0.001 secunde | Raspuns gresit. | 4 | 0 | ||
| 15 | Depășit | Limita de timp depășită | 4 | 0 | ||
| 16 | 0.001 secunde | Raspuns gresit. | 4 | 0 | ||
| 17 | 0.001 secunde | Raspuns gresit. | 4 | 0 | ||
| 18 | Depășit | Limita de timp depășită | 4 | 0 | ||
| 19 | 0.002 secunde | OK. | 4 | 4 | ||
| 20 | 0.002 secunde | OK. | 3 | 3 | ||
| Punctaj total | 65 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema acadele 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ă.