#3158
numere123
Se citește un număr natural n
având cifrele diferite două câte două. Afișați în ordine crescătoare numerele care se pot obține din cifrele lui n
și care au același număr de cifre ca n
.
Problema | numere123 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.4 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #34919000 | Utilizator | |
Fișier | numere123.cpp | Dimensiune | 854 B |
Data încărcării | 18 Februarie 2022, 09:00 | Scor / rezultat | Eroare de compilare |
numere123.cpp:5:45: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive] ostream &operator<< (ostream output, const& vector<int>solution){ ^ numere123.cpp:5:45: error: expected ',' or '...' numere123.cpp: In function 'std::ostream& operator<<(std::ostream, const int&)': numere123.cpp:6:17: error: 'solution' was not declared in this scope for(auto elem: solution) ^ numere123.cpp:5:10: warning: reference to local variable 'output' returned [-Wreturn-local-addr] ostream &operator<< (ostream output, const& vector<int>solution){ ^ numere123.cpp: At global scope: numere123.cpp:11:32: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive] bool valid_combo(int k, const& vector<int> solutions) { ^ numere123.cpp:11:32: error: expected ',' or '...' numere123.cpp: In function 'bool valid_combo(int, const int&)': numere123.cpp:12:18: error: 'solution' was not declared in this scope for(auto elem : solution) ^ numere123.cpp:14:12: error: 'solutions' was not declared in this scope if(solutions[k] == elem) ^ numere123.cpp: At global scope: numere123.cpp:21:30: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive] void BT(int k, int n, const& vector<int> options, const& vector<int> solutions) { ^ numere123.cpp:21:30: error: expected ',' or '...' numere123.cpp: In function 'void BT(int, int, const int&)': numere123.cpp:22:25: error: 'v' was not declared in this scope if(k == n - 1) cout << v; ^ numere123.cpp:23:23: error: 'solutions' was not declared in this scope if(valid_combo(k, solutions)){ ^ numere123.cpp:24:32: error: missing template arguments before '.' token solutions.push_back(vector.at(k)); ^ numere123.cpp: In function 'int main()': numere123.cpp:39:51: error: invalid initialization of reference of type 'const int&' from expression of type 'std::vector<int>' BT(0, digits.size(), digits, new vector<int>()) ^ numere123.cpp:21:6: error: in passing argument 3 of 'void BT(int, int, const int&)' void BT(int k, int n, const& vector<int> options, const& vector<int> solutions) { ^ numere123.cpp:40:1: error: expected ';' before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema numere123 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ă.