#198
Submultimi
Se citește un număr natural nenul n
. Să se afişeze, în ordine lexicografică, toate submulțimile nevide ale mulţimii {1,2,..,n}
.
Problema | Submultimi | Operații I/O |
submultimi.in /submultimi.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53757522 | Utilizator | |
Fișier | submultimi.cpp | Dimensiune | 1.09 KB |
Data încărcării | 11 Noiembrie 2024, 08:41 | Scor / rezultat | Eroare de compilare |
submultimi.cpp:4:12: warning: ISO C99 requires whitespace after the macro name [enabled by default] #define std::cin in ^ submultimi.cpp:5:12: warning: ISO C99 requires whitespace after the macro name [enabled by default] #define std::cout out ^ submultimi.cpp:5:0: warning: "std" redefined [enabled by default] #define std::cout out ^ submultimi.cpp:4:0: note: this is the location of the previous definition #define std::cin in ^ submultimi.cpp:5:12: error: 'cout' in namespace '::' does not name a type #define std::cout out ^ submultimi.cpp:7:1: note: in expansion of macro 'std' std::ifstream in ("submultimi.in"); ^ submultimi.cpp:5:12: error: 'cout' in namespace '::' does not name a type #define std::cout out ^ submultimi.cpp:8:1: note: in expansion of macro 'std' std::ofstream out ("submultimi.out"); ^ submultimi.cpp: In function 'void Afisare(int)': submultimi.cpp:23:25: error: 'M' was not declared in this scope for(int i = 1; i <= M; ++i) { ^ submultimi.cpp:5:12: error: '::cout' has not been declared #define std::cout out ^ submultimi.cpp:24:9: note: in expansion of macro 'std' std::cout << sol[i] << " "; ^ submultimi.cpp:5:12: note: suggested alternative: #define std::cout out ^ submultimi.cpp:24:9: note: in expansion of macro 'std' std::cout << sol[i] << " "; ^ In file included from submultimi.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ submultimi.cpp:5:19: error: expected ';' before 'out' #define std::cout out ^ submultimi.cpp:24:9: note: in expansion of macro 'std' std::cout << sol[i] << " "; ^ submultimi.cpp:5:12: error: '::cout' has not been declared #define std::cout out ^ submultimi.cpp:26:5: note: in expansion of macro 'std' std::cout << "\n"; ^ submultimi.cpp:5:12: note: suggested alternative: #define std::cout out ^ submultimi.cpp:26:5: note: in expansion of macro 'std' std::cout << "\n"; ^ In file included from submultimi.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ submultimi.cpp:5:19: error: expected ';' before 'out' #define std::cout out ^ submultimi.cpp:26:5: note: in expansion of macro 'std' std::cout << "\n"; ^ submultimi.cpp: In function 'int main()': submultimi.cpp:5:12: error: '::cout' has not been declared #define std::cout out ^ submultimi.cpp:41:5: note: in expansion of macro 'std' std::cin >> N; ^ submultimi.cpp:5:12: note: suggested alternative: #define std::cout out ^ submultimi.cpp:41:5: note: in expansion of macro 'std' std::cin >> N; ^ In file included from submultimi.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ submultimi.cpp:5:19: error: expected ';' before 'out' #define std::cout out ^ submultimi.cpp:41:5: note: in expansion of macro 'std' std::cin >> N; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Submultimi 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ă.