Borderou de evaluare (job #1044918)
Utilizator | Data | 30 noiembrie 2013 16:32:56 | |
---|---|---|---|
Problema | Cel mai lung subsir comun | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘std::vector<int> lcs(std::vector<int>&, std::vector<int>&)’:
user.cpp:19:89: error: invalid initialization of non-const reference of type ‘std::vector<int>&’ from an rvalue of type ‘std::vector<int>’
sol = lcs(lcs(vector<int>(x.begin(), x.end() - 1), vector<int>(y.begin(), y.end() - 1)), x);
^
user.cpp:6:13: error: in passing argument 1 of ‘std::vector<int> lcs(std::vector<int>&, std::vector<int>&)’
vector<int> lcs(vector<int> &x, vector<int> &y)
^
user.cpp:26:49: error: invalid initialization of non-const reference of type ‘std::vector<int>&’ from an rvalue of type ‘std::vector<int>’
a = lcs(x, vector<int>(y.begin(), y.end() - 1));
^
user.cpp:6:13: error: in passing argument 2 of ‘std::vector<int> lcs(std::vector<int>&, std::vector<int>&)’
vector<int> lcs(vector<int> &x, vector<int> &y)
^
user.cpp:27:49: error: invalid initialization of non-const reference of type ‘std::vector<int>&’ from an rvalue of type ‘std::vector<int>’
b = lcs(vector<int>(x.begin(), x.end() - 1), y);
^
user.cpp:6:13: error: in passing argument 1 of ‘std::vector<int> lcs(std::vector<int>&, std::vector<int>&)’
vector<int> lcs(vector<int> &x, vector<int> &y)
^
user.cpp:37:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !