#324
PartitiiNumar4
Se dă un număr natural n
şi o mulţime cu m
elemente, numere naturale nenule. Determinaţi, în ordine lexicografică, toate modalităţile de a-l scrie pe n
ca sumă de termeni din acea mulţime.
Problema | PartitiiNumar4 | Operații I/O |
partitiinumar4.in /partitiinumar4.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #25960195 | Utilizator | |
Fișier | partitiinumar4.cpp | Dimensiune | 692 B |
Data încărcării | 19 Noiembrie 2020, 23:43 | Scor / rezultat | Eroare de compilare |
partitiinumar4.cpp: In function 'void afisare(int)': partitiinumar4.cpp:9:9: error: reference to 'cout' is ambiguous cout << a[x[i]] << ' '; ^ partitiinumar4.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("partitiinumar4.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiinumar4.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiinumar4.cpp:10:5: error: reference to 'cout' is ambiguous cout << '\n'; ^ partitiinumar4.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("partitiinumar4.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiinumar4.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ partitiinumar4.cpp: In function 'int main()': partitiinumar4.cpp:28:5: error: reference to 'cin' is ambiguous cin >> n >> m; ^ partitiinumar4.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("partitiinumar4.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiinumar4.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ partitiinumar4.cpp:30:9: error: reference to 'cin' is ambiguous cin >> a[i]; ^ partitiinumar4.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("partitiinumar4.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from partitiinumar4.cpp:1: /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 PartitiiNumar4 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ă.