#1834
Pentru o mulţime cu n elemente naturale să se afle câte submulţimi nevide au suma elementelor pară.
| Problema | Memory005 | Operații I/O |
memory005.in/memory005.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0 MB
|
| Id soluție | #64641367 | Utilizator | |
| Fișier | memory005.cpp | Dimensiune | 5.04 KB |
| Data încărcării | 20 Mai 2026, 02:23 | Scor/rezultat | Eroare de compilare |
memory005.cpp: In function ‘long long unsigned int putere(int, int)’: memory005.cpp:90:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 90 | while (b > produs) { | ~~^~~~~~~~ memory005.cpp:96:16: warning: comparison of integer expressions of different signedness: ‘long long unsigned int’ and ‘int’ [-Wsign-compare] 96 | if (produs <= b) { | ~~~~~~~^~~~ memory005.cpp: In function ‘int PB_ceva()’: memory005.cpp:119:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 119 | for (int i = 0; i < strlen(n); i++) { | ~~^~~~~~~~~~~ memory005.cpp:120:13: warning: array subscript has type ‘char’ [-Wchar-subscripts] 120 | freq[n[i]]++; | ~~~^ memory005.cpp:123:14: warning: array subscript has type ‘char’ [-Wchar-subscripts] 123 | if (freq[i] > 1) { | ^ memory005.cpp:124:37: warning: array subscript has type ‘char’ [-Wchar-subscripts] 124 | suma /= Permutari_cu_mod(freq[i]); | ^ memory005.cpp:116:7: warning: unused variable ‘k’ [-Wunused-variable] 116 | int k; | ^ memory005.cpp: In function ‘int descompunere_factori_factoriale()’: memory005.cpp:136:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 136 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ memory005.cpp:147:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 147 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ memory005.cpp:160:1: warning: no return statement in function returning non-void [-Wreturn-type] 160 | } | ^ memory005.cpp: In function ‘int ma2in()’: memory005.cpp:167:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [-Wsign-compare] 167 | for (int i = max(b, c) + 1; i <= a; i++) { | ~~^~~~ memory005.cpp:174:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long long unsigned int’ [-Wsign-compare] 174 | for (int i = 2; i <= min(b, c); i++) { | ~~^~~~~~~~~~~~ memory005.cpp:164:27: warning: unused variable ‘cntc’ [-Wunused-variable] 164 | int cnta = 0, cntb = 0, cntc = 0; | ^~~~ memory005.cpp:187:1: warning: no return statement in function returning non-void [-Wreturn-type] 187 | } | ^ memory005.cpp: In function ‘int pb_3630_30_limita_de_timp_depasita()’: memory005.cpp:229:27: warning: comparison of integer expressions of different signedness: ‘long long int’ and ‘long long unsigned int’ [-Wsign-compare] 229 | for (long long i = 1; i <= n; i++) { | ~~^~~~ memory005.cpp:233:1: warning: no return statement in function returning non-void [-Wreturn-type] 233 | } | ^ memory005.cpp: In function ‘int pb_1297()’: memory005.cpp:250:1: warning: no return statement in function returning non-void [-Wreturn-type] 250 | } | ^ memory005.cpp: In function ‘int main()’: memory005.cpp:265:12: error: expected primary-expression before ‘;’ token 265 | S += ; | ^ memory005.cpp: In function ‘int prob4812()’: memory005.cpp:224:1: warning: control reaches end of non-void function [-Wreturn-type] 224 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Memory005 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ă.