Borderou de evaluare (job #1832230)
Utilizator | Data | 19 decembrie 2016 17:20:57 | |
---|---|---|---|
Problema | Problema rucsacului | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:16:8: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’
cin>>N>>G;
^
In file included from /usr/include/c++/4.8/fstream:38:0,
from user.cpp:1:
/usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of ‘std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = int [10005]]’
operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x)
^
user.cpp:21:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
for(int tot=0; tot<=G; ++tot)
^
user.cpp:23:32: error: ‘l’ was not declared in this scope
Dp[1-rs][tot] = Dp[l][tot];
^
user.cpp:24:64: error: ‘D’ was not declared in this scope
if(G[i] <= tot) Dp[1-rs][tot] = max(Dp[1-rs][tot], D[rs][tot - G[i]] + P[i]);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !