#1330
PartitiiMultime
Fie n
un număr natural nenul și mulțimea A={1,2,3,...,n}
. Să se determine toate partițiile disjuncte ale mulțimii A
.
Problema | PartitiiMultime | Operații I/O |
partitiimultime.in /partitiimultime.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 2 MB
/
Stivă 2 MB
|
Id soluție | #54883054 | Utilizator | |
Fișier | partitiimultime.cpp | Dimensiune | 919 B |
Data încărcării | 11 Decembrie 2024, 10:40 | Scor / rezultat | Eroare de compilare |
partitiimultime.cpp: In function 'int gm(int)': partitiimultime.cpp:7:12: error: 's' was not declared in this scope if(s[i] > m) { ^ partitiimultime.cpp: In function 'void afisare(int)': partitiimultime.cpp:16:16: error: 's' was not declared in this scope if(s[i] == gr) { ^ partitiimultime.cpp:17:17: error: 'fout' was not declared in this scope fout << i <<; ^ partitiimultime.cpp:17:29: error: expected primary-expression before ';' token fout << i <<; ^ partitiimultime.cpp:20:18: error: expected primary-expression before ';' token cout << *; ^ partitiimultime.cpp: In function 'bool valid(int)': partitiimultime.cpp:25:17: error: 's' was not declared in this scope return(1 <= s[i] && s[k] <= gm(k - 1) + 1); ^ partitiimultime.cpp:25:19: error: 'i' was not declared in this scope return(1 <= s[i] && s[k] <= gm(k - 1) + 1); ^ partitiimultime.cpp: In function 'bool sc(int)': partitiimultime.cpp:28:17: error: 'n' was not declared in this scope return k == n; ^ partitiimultime.cpp: In function 'void backk(int)': partitiimultime.cpp:31:25: error: 'n' was not declared in this scope for(int g = 1; g <= n; g++) { ^ partitiimultime.cpp:32:9: error: 's' was not declared in this scope s[i] = g; ^ partitiimultime.cpp:32:11: error: 'i' was not declared in this scope s[i] = g; ^ partitiimultime.cpp: In function 'int main()': partitiimultime.cpp:44:5: error: 'fin' was not declared in this scope fin >> n; ^ partitiimultime.cpp:44:12: error: 'n' was not declared in this scope fin >> n; ^ partitiimultime.cpp:47:5: error: 'fout' was not declared in this scope fout.close(); ^ partitiimultime.cpp: In function 'bool valid(int)': partitiimultime.cpp:26:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ partitiimultime.cpp: In function 'bool sc(int)': partitiimultime.cpp:29:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PartitiiMultime 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ă.