#1286
Submultimi1
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}
pentru care diferența dintre oricare două elemente este mai mare decât 1
.
Problema | Submultimi1 | Operații I/O |
submultimi1.in /submultimi1.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50822029 | Utilizator | |
Fișier | submultimi1.cpp | Dimensiune | 389 B |
Data încărcării | 08 Mai 2024, 16:00 | Scor / rezultat | Eroare de compilare |
submultimi1.cpp:4:1: error: stray '\342' in program ifstream cin(“submultimi.in”); ^ submultimi1.cpp:4:1: error: stray '\200' in program submultimi1.cpp:4:1: error: stray '\234' in program submultimi1.cpp:4:1: error: stray '\342' in program submultimi1.cpp:4:1: error: stray '\200' in program submultimi1.cpp:4:1: error: stray '\235' in program submultimi1.cpp:5:1: error: stray '\342' in program ofstream cout(“submultimi.out”); ^ submultimi1.cpp:5:1: error: stray '\200' in program submultimi1.cpp:5:1: error: stray '\234' in program submultimi1.cpp:5:1: error: stray '\342' in program submultimi1.cpp:5:1: error: stray '\200' in program submultimi1.cpp:5:1: error: stray '\235' in program submultimi1.cpp:9:1: error: stray '\342' in program cout <<x[i]<<” “; ^ submultimi1.cpp:9:1: error: stray '\200' in program submultimi1.cpp:9:1: error: stray '\235' in program submultimi1.cpp:9:1: error: stray '\342' in program submultimi1.cpp:9:1: error: stray '\200' in program submultimi1.cpp:9:1: error: stray '\234' in program submultimi1.cpp:10:1: error: stray '\342' in program cout <<”\n”; ^ submultimi1.cpp:10:1: error: stray '\200' in program submultimi1.cpp:10:1: error: stray '\235' in program submultimi1.cpp:10:1: error: stray '\' in program submultimi1.cpp:10:1: error: stray '\342' in program submultimi1.cpp:10:1: error: stray '\200' in program submultimi1.cpp:10:1: error: stray '\235' in program submultimi1.cpp:4:17: error: 'submultimi' was not declared in this scope ifstream cin(“submultimi.in”); ^ submultimi1.cpp:5:18: error: 'submultimi' was not declared in this scope ofstream cout(“submultimi.out”); ^ submultimi1.cpp:7:15: error: expected ',' or '...' before numeric constant void afis(int 1){ ^ submultimi1.cpp: In function 'void afis(int)': submultimi1.cpp:9:1: error: reference to 'cout' is ambiguous cout <<x[i]<<” “; ^ submultimi1.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout(“submultimi.out”); ^ In file included from submultimi1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ submultimi1.cpp:9:21: error: expected primary-expression before ';' token cout <<x[i]<<” “; ^ submultimi1.cpp:10:1: error: reference to 'cout' is ambiguous cout <<”\n”; ^ submultimi1.cpp:5:10: note: candidates are: std::ofstream cout ofstream cout(“submultimi.out”); ^ In file included from submultimi1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ submultimi1.cpp: In function 'void back(int)': submultimi1.cpp:13:13: error: 'k1' was not declared in this scope for(int i=x[k1]+2;i<=n;++i){ ^ submultimi1.cpp: In function 'int main()': submultimi1.cpp:20:1: error: reference to 'cin' is ambiguous cin>>n; ^ submultimi1.cpp:4:10: note: candidates are: std::ifstream cin ifstream cin(“submultimi.in”); ^ In file included from submultimi1.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 Submultimi1 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ă.