#196
Aranjamente
Se citesc două numere naturale nenule n
și k
. Să se afişeze, în ordine lexicografică, aranjamentele de câte k
elemente ale mulţimii {1,2,..,n}
.
Problema | Aranjamente | Operații I/O |
aranjamente.in /aranjamente.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50547122 | Utilizator | |
Fișier | aranjamente.cpp | Dimensiune | 711 B |
Data încărcării | 14 Aprilie 2024, 17:45 | Scor / rezultat | Eroare de compilare |
aranjamente.cpp:6:33: error: no matching function for call to 'std::basic_ostream<char>::basic_ostream(const char [17])' ostream h("aranjamente.out "); ^ aranjamente.cpp:6:33: note: candidates are: In file included from /usr/include/c++/4.8/iostream:39:0, from aranjamente.cpp:1: /usr/include/c++/4.8/ostream:384:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream() [with _CharT = char; _Traits = std::char_traits<char>] basic_ostream() ^ /usr/include/c++/4.8/ostream:384:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/4.8/ostream:84:7: note: std::basic_ostream<_CharT, _Traits>::basic_ostream(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>] basic_ostream(__streambuf_type* __sb) ^ /usr/include/c++/4.8/ostream:84:7: note: no known conversion for argument 1 from 'const char [17]' to 'std::basic_ostream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}' aranjamente.cpp: In function 'void Back(int)': aranjamente.cpp:33:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(OK(k)) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Aranjamente 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ă.