#3909
Permutari6
Se citesc două numere a
și b
. Să se afișeze, în ordine lexicografică, permutările mulțimii {a, a + 1, ..., b}
.
Problema | Permutari6 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52314136 | Utilizator | |
Fișier | permutari6.cpp | Dimensiune | 1.22 KB |
Data încărcării | 26 Septembrie 2024, 10:16 | Scor / rezultat | Eroare de compilare |
permutari6.cpp:14:2: error: stray '#' in program }#include <bits/stdc++.h> ^ permutari6.cpp:14:3: error: 'include' does not name a type }#include <bits/stdc++.h> ^ permutari6.cpp:21:5: error: redefinition of 'int n' int n , x[10] , p[10] , a[10]; ^ permutari6.cpp:7:5: error: 'int n' previously declared here int n , x[10]; ^ permutari6.cpp:21:13: error: redefinition of 'int x [10]' int n , x[10] , p[10] , a[10]; ^ permutari6.cpp:7:9: error: 'int x [10]' previously declared here int n , x[10]; ^ permutari6.cpp: In function 'void afisare()': permutari6.cpp:23:6: error: redefinition of 'void afisare()' void afisare() ^ permutari6.cpp:9:6: error: 'void afisare()' previously defined here void afisare() ^ permutari6.cpp:26:9: error: reference to 'cout' is ambiguous cout << a[x[i]] << " "; ^ permutari6.cpp:19:10: note: candidates are: std::ofstream cout ofstream cout("permutari2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from permutari6.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ permutari6.cpp:27:5: error: reference to 'cout' is ambiguous cout << '\n'; ^ permutari6.cpp:19:10: note: candidates are: std::ofstream cout ofstream cout("permutari2.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from permutari6.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ permutari6.cpp: In function 'int main()': permutari6.cpp:45:5: error: reference to 'cin' is ambiguous cin >> n; ^ permutari6.cpp:18:10: note: candidates are: std::ifstream cin ifstream cin("permutari2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from permutari6.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ permutari6.cpp:47:9: error: reference to 'cin' is ambiguous cin >> a[i]; ^ permutari6.cpp:18:10: note: candidates are: std::ifstream cin ifstream cin("permutari2.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from permutari6.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ permutari6.cpp: In function 'void back(int)': permutari6.cpp:60:6: error: redefinition of 'void back(int)' void back(int k) ^ permutari6.cpp:30:6: error: 'void back(int)' previously defined here void back(int k) ^ permutari6.cpp:65:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(valid(k)) ^ permutari6.cpp: In function 'int main()': permutari6.cpp:71:5: error: redefinition of 'int main()' int main() ^ permutari6.cpp:43:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Permutari6 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ă.