#3589
O culegere conține n probleme, dintre care m sunt probleme ușoare. În câte moduri pot fi alese k probleme, astfel încât între cele k probleme alese să existe cel puțin s probleme ușoare?
| Problema | probleme | Operații I/O |
probleme.in/probleme.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64675959 | Utilizator | |
| Fișier | probleme.cpp | Dimensiune | 6.17 KB |
| Data încărcării | 22 Mai 2026, 02:16 | Scor/rezultat | 10 puncte |
probleme.cpp: In function ‘long long unsigned int putere(int, int)’: probleme.cpp:91:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 91 | while (b > produs) { | ~~^~~~~~~~ probleme.cpp:97:16: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] 97 | if (produs <= b) { | ~~~~~~~^~~~ probleme.cpp: In function ‘int PB_ceva()’: probleme.cpp:120:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 120 | for (int i = 0; i < strlen(n); i++) { | ~~^~~~~~~~~~~ probleme.cpp:121:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] 121 | freq[n[i]]++; | ~~~^ probleme.cpp:124:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] 124 | if (freq[i] > 1) { | ^ probleme.cpp:125:37: warning: array subscript has type ‘char’ [-Wchar-subscripts] 125 | suma /= Permutari_cu_mod(freq[i]); | ^ probleme.cpp:117:7: warning: unused variable ‘k’ [-Wunused-variable] 117 | int k; | ^ probleme.cpp: In function ‘int descompunere_factori_factoriale()’: probleme.cpp:137:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 137 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ probleme.cpp:148:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 148 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ probleme.cpp:161:1: warning: no return statement in function returning non-void [-Wreturn-type] 161 | } | ^ probleme.cpp: In function ‘int ma2in()’: probleme.cpp:168:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 168 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ probleme.cpp:175:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 175 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ probleme.cpp:165:27: warning: unused variable ‘cntc’ [-Wunused-variable] 165 | int cnta = 0, cntb = 0, cntc = 0; | ^~~~ probleme.cpp:188:1: warning: no return statement in function returning non-void [-Wreturn-type] 188 | } | ^ probleme.cpp: In function ‘int pb_3630_30_limita_de_timp_depasita()’: probleme.cpp:230:27: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘long long unsigned int’ [-Wsign-compare] 230 | for (long long i = 1; i <= n; i++) { | ~~^~~~ probleme.cpp:237:1: warning: no return statement in function returning non-void [-Wreturn-type] 237 | } | ^ probleme.cpp: In function ‘int pb_1297()’: probleme.cpp:254:1: warning: no return statement in function returning non-void [-Wreturn-type] 254 | } | ^ probleme.cpp: In function ‘int veverita_programare_dinamica()’: probleme.cpp:285:1: warning: no return statement in function returning non-void [-Wreturn-type] 285 | } | ^ probleme.cpp: In function ‘int prob4812()’: probleme.cpp:225:1: warning: control reaches end of non-void function [-Wreturn-type] 225 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 2 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 3 | 0.004 secunde | Raspuns gresit. | 10 | 0 | ||
| 4 | 0.002 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 6 | 0.333 secunde | Raspuns gresit. | 10 | 0 | ||
| 7 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 8 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 9 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 10 | Depășit | Limita de timp depășită | 10 | 0 | ||
| Punctaj total | 10 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema probleme 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ă.