#320
PartitiiNumar
Se dă un număr natural n
. Determinaţi, în ordine lexicografică, toate modalităţile de a-l scrie pe n
ca sumă de numere naturale.
Problema | PartitiiNumar | Operații I/O |
partitiinumar.in /partitiinumar.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53319193 | Utilizator | |
Fișier | partitiinumar.cpp | Dimensiune | 2.08 KB |
Data încărcării | 24 Octombrie 2024, 11:35 | Scor / rezultat | Eroare de compilare |
partitiinumar.cpp:28:2: error: stray '#' in program }#include <fstream> ^ partitiinumar.cpp:28:3: error: 'include' does not name a type }#include <fstream> ^ partitiinumar.cpp:30:13: error: redefinition of 'std::ifstream fin' ifstream fin("partitiinumar.in"); ^ partitiinumar.cpp:4:10: error: 'std::ifstream fin' previously declared here ifstream fin("partitiinumar.in"); ^ partitiinumar.cpp:31:14: error: redefinition of 'std::ofstream fout' ofstream fout("partitiinumar.out"); ^ partitiinumar.cpp:5:10: error: 'std::ofstream fout' previously declared here ofstream fout("partitiinumar.out"); ^ partitiinumar.cpp:32:5: error: redefinition of 'int n' int n,S=0,k,ev,as,s[101]; ^ partitiinumar.cpp:6:5: error: 'int n' previously declared here int n,k,ev,as,S,s[41],i; ^ partitiinumar.cpp:32:7: error: redefinition of 'int S' int n,S=0,k,ev,as,s[101]; ^ partitiinumar.cpp:6:15: error: 'int S' previously declared here int n,k,ev,as,S,s[41],i; ^ partitiinumar.cpp:32:11: error: redefinition of 'int k' int n,S=0,k,ev,as,s[101]; ^ partitiinumar.cpp:6:7: error: 'int k' previously declared here int n,k,ev,as,S,s[41],i; ^ partitiinumar.cpp:32:13: error: redefinition of 'int ev' int n,S=0,k,ev,as,s[101]; ^ partitiinumar.cpp:6:9: error: 'int ev' previously declared here int n,k,ev,as,S,s[41],i; ^ partitiinumar.cpp:32:16: error: redefinition of 'int as' int n,S=0,k,ev,as,s[101]; ^ partitiinumar.cpp:6:12: error: 'int as' previously declared here int n,k,ev,as,S,s[41],i; ^ partitiinumar.cpp:32:24: error: conflicting declaration 'int s [101]' int n,S=0,k,ev,as,s[101]; ^ partitiinumar.cpp:6:17: error: 's' has a previous declaration as 'int s [41]' int n,k,ev,as,S,s[41],i; ^ partitiinumar.cpp: In function 'void init()': partitiinumar.cpp:33:6: error: redefinition of 'void init()' void init() ^ partitiinumar.cpp:7:6: error: 'void init()' previously defined here void init() ^ partitiinumar.cpp: In function 'int succesor()': partitiinumar.cpp:39:5: error: redefinition of 'int succesor()' int succesor() ^ partitiinumar.cpp:12:5: error: 'int succesor()' previously defined here int succesor() ^ partitiinumar.cpp: In function 'int valid()': partitiinumar.cpp:52:5: error: redefinition of 'int valid()' int valid() ^ partitiinumar.cpp:20:5: error: 'int valid()' previously defined here int valid() ^ partitiinumar.cpp: In function 'int solutie()': partitiinumar.cpp:108:5: error: redefinition of 'int solutie()' int solutie() ^ partitiinumar.cpp:61:5: error: 'int solutie()' previously defined here int solutie() ^ partitiinumar.cpp: In function 'void tipar()': partitiinumar.cpp:113:6: error: redefinition of 'void tipar()' void tipar() ^ partitiinumar.cpp:67:6: error: 'void tipar()' previously defined here void tipar() ^ partitiinumar.cpp: In function 'void bt()': partitiinumar.cpp:120:6: error: redefinition of 'void bt()' void bt() ^ partitiinumar.cpp:74:6: error: 'void bt()' previously defined here void bt() ^ partitiinumar.cpp: In function 'int main()': partitiinumar.cpp:138:5: error: redefinition of 'int main()' int main() ^ partitiinumar.cpp:102:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PartitiiNumar 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ă.