#123
Permutari
Se citeşte un număr natural nenul n
. Să se afişeze, în ordine lexicografică, permutările mulţimii {1,2,..,n}
.
Problema | Permutari | Operații I/O |
permutari.in /permutari.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54172101 | Utilizator | |
Fișier | permutari.cpp | Dimensiune | 375 B |
Data încărcării | 21 Noiembrie 2024, 11:32 | Scor / rezultat | Eroare de compilare |
permutari.cpp: In function 'int main()': permutari.cpp:24:13: error: call of overloaded 'div(int&, int&)' is ambiguous div(a, b); ^ permutari.cpp:24:13: note: candidates are: In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from permutari.cpp:3: /usr/include/stdlib.h:789:14: note: div_t div(int, int) extern div_t div (int __numer, int __denom) ^ permutari.cpp:6:5: note: int div(int, int&) int div(int a, int &div){ ^ In file included from /usr/include/c++/4.8/ext/string_conversions.h:41:0, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from permutari.cpp:3: /usr/include/c++/4.8/cstdlib:214:3: note: lldiv_t __gnu_cxx::div(long long int, long long int) div(long long __n, long long __d) ^ /usr/include/c++/4.8/cstdlib:169:3: note: ldiv_t std::div(long int, long int) div(long __i, long __j) { return ldiv(__i, __j); } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Permutari 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ă.