#3741
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 |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64699032 | Utilizator | |
| Fișier | starsandbars1.cpp | Dimensiune | 9.47 KB |
| Data încărcării | 24 Mai 2026, 17:57 | Scor/rezultat | 80 puncte |
starsandbars1.cpp: In member function ‘big_int::operator std::string() const’: starsandbars1.cpp:53:13: warning: unused variable ‘i’ [-Wunused-variable] 53 | int i; | ^ starsandbars1.cpp: In member function ‘big_int big_int::operator+(const big_int&) const’: starsandbars1.cpp:147:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long unsigned int’ [-Wsign-compare] 147 | for(i=0;i<min(digits.size(),b.digits.size());i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ starsandbars1.cpp:153:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 153 | for (; i < digits.size(); i++) | ~~^~~~~~~~~~~~~~~ starsandbars1.cpp:159:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 159 | for (; i < b.digits.size(); i++) | ~~^~~~~~~~~~~~~~~~~ starsandbars1.cpp: In member function ‘big_int big_int::operator-(const big_int&) const’: starsandbars1.cpp:191:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long unsigned int’ [-Wsign-compare] 191 | for(i=0;i<min(digits.size(),b.digits.size());i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ starsandbars1.cpp:205:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 205 | for (; i < digits.size(); i++) | ~~^~~~~~~~~~~~~~~ starsandbars1.cpp: In member function ‘big_int big_int::operator*(const big_int&) const’: starsandbars1.cpp:230:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 230 | for(i=0;i<digits.size();i++) | ~^~~~~~~~~~~~~~ starsandbars1.cpp:233:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 233 | for(j=0;j<b.digits.size();j++) | ~^~~~~~~~~~~~~~~~ starsandbars1.cpp: In member function ‘big_int big_int::operator/(const big_int&) const’: starsandbars1.cpp:281:13: warning: statement has no effect [-Wunused-value] 281 | for(i;i>=-1;i--) | ^ starsandbars1.cpp: In member function ‘big_int big_int::operator-(const big_int&) const’: starsandbars1.cpp:218:5: warning: control reaches end of non-void function [-Wreturn-type] 218 | } | ^ starsandbars1.cpp: In member function ‘big_int big_int::operator+(const big_int&) const’: starsandbars1.cpp:172:5: warning: control reaches end of non-void function [-Wreturn-type] 172 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 5 | 5 | Exemplu | |
| 2 | 0.002 secunde | OK. | 5 | 5 | ||
| 3 | 0.001 secunde | OK. | 5 | 5 | ||
| 4 | 0.001 secunde | OK. | 5 | 5 | ||
| 5 | 0.002 secunde | OK. | 10 | 10 | ||
| 6 | 0.002 secunde | OK. | 10 | 10 | ||
| 7 | 0.002 secunde | OK. | 10 | 10 | ||
| 8 | 0.004 secunde | OK. | 5 | 5 | ||
| 9 | 0.017 secunde | OK. | 5 | 5 | ||
| 10 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 11 | Depășit | Limita de timp depășită | 10 | 0 | ||
| 12 | 0.079 secunde | OK. | 10 | 10 | ||
| 13 | 0.056 secunde | OK. | 10 | 10 | ||
| Punctaj total | 80 | |||||
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ă.