#3911
PermPrimPF
Se dă o mulțime cu n
elemente, numere naturale. Afișați în ordine lexicografică toate permutările mulțimii date în care elementele prime sunt puncte fixe (nu își schimbă poziția).
Problema | PermPrimPF | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54493402 | Utilizator | |
Fișier | permprimpf.cpp | Dimensiune | 1.25 KB |
Data încărcării | 30 Noiembrie 2024, 10:06 | Scor / rezultat | Eroare de compilare |
permprimpf.cpp:1:10: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include <iostream>using namespace std; ^ permprimpf.cpp:1:20: warning: extra tokens at end of #include directive [enabled by default] #include <iostream>using namespace std; ^ permprimpf.cpp: In function 'void Afisare(int)': permprimpf.cpp:19:9: error: 'cout' was not declared in this scope cout << A[x[i]] << " "; ^ permprimpf.cpp:19:9: note: suggested alternative: In file included from permprimpf.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ permprimpf.cpp:20:5: error: 'cout' was not declared in this scope cout << '\n'; ^ permprimpf.cpp:20:5: note: suggested alternative: In file included from permprimpf.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ permprimpf.cpp: In function 'int main()': permprimpf.cpp:50:5: error: 'cin' was not declared in this scope cin >> n; ^ permprimpf.cpp:50:5: note: suggested alternative: In file included from permprimpf.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ permprimpf.cpp:58:41: error: 'swap' was not declared in this scope swap(A[i] , A[j]); ^ permprimpf.cpp:58:41: note: suggested alternatives: In file included from /usr/include/c++/4.8/string:52:0, 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 permprimpf.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2717:5: note: 'std::swap' swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ In file included from /usr/include/c++/4.8/exception:152:0, from /usr/include/c++/4.8/ios:39, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from permprimpf.cpp:1: /usr/include/c++/4.8/bits/exception_ptr.h:160:5: note: 'std::__exception_ptr::swap' swap(exception_ptr& __lhs, exception_ptr& __rhs) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PermPrimPF 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ă.