#323
PartitiiNumar3
Se dă un număr natural n
şi un interval [a,b]
. Determinaţi, în ordine lexicografică, toate modalităţile de a-l scrie pe n
ca sumă de numere naturale din intervalul [a,b]
.
Problema | PartitiiNumar3 | Operații I/O |
partitiinumar3.in /partitiinumar3.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #37545376 | Utilizator | |
Fișier | partitiinumar3.cpp | Dimensiune | 3.35 KB |
Data încărcării | 09 Septembrie 2022, 15:43 | Scor / rezultat | Eroare de compilare |
partitiinumar3.cpp: In function 'void afisare(int)': partitiinumar3.cpp:25:9: error: reference to 'cout' is ambiguous cout << x[i] << ' '; ^ partitiinumar3.cpp:18:10: note: candidates are: std::ofstream cout ofstream cout("partitiinumar3.out"); ^ In file included from partitiinumar3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiinumar3.cpp:27:5: error: reference to 'cout' is ambiguous cout << '\n'; ^ partitiinumar3.cpp:18:10: note: candidates are: std::ofstream cout ofstream cout("partitiinumar3.out"); ^ In file included from partitiinumar3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiinumar3.cpp: In function 'void Afisare(int)': partitiinumar3.cpp:110:17: error: reference to 'cout' is ambiguous cout << "* "; ^ partitiinumar3.cpp:18:10: note: candidates are: std::ofstream cout ofstream cout("partitiinumar3.out"); ^ In file included from partitiinumar3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiinumar3.cpp:112:17: error: reference to 'cout' is ambiguous cout << "- "; ^ partitiinumar3.cpp:18:10: note: candidates are: std::ofstream cout ofstream cout("partitiinumar3.out"); ^ In file included from partitiinumar3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiinumar3.cpp:113:9: error: reference to 'cout' is ambiguous cout << endl; ^ partitiinumar3.cpp:18:10: note: candidates are: std::ofstream cout ofstream cout("partitiinumar3.out"); ^ In file included from partitiinumar3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiinumar3.cpp: In function 'void regine(int)': partitiinumar3.cpp:122:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(Valid(k)) ^ partitiinumar3.cpp: In function 'int main()': partitiinumar3.cpp:159:5: error: reference to 'cin' is ambiguous cin >> n >> a >> b; ^ partitiinumar3.cpp:17:10: note: candidates are: std::ifstream cin ifstream cin("partitiinumar3.in"); ^ In file included from partitiinumar3.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PartitiiNumar3 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ă.