Borderou de evaluare (job #1856173)
Utilizator | Data | 24 ianuarie 2017 16:56:49 | |
---|---|---|---|
Problema | Zebughil | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:15:15: error: conflicting declaration ‘int g [20]’
int g[NMAX + 3];
^
user.cpp:12:10: error: ‘g’ has a previous declaration as ‘std::ofstream g’
ofstream g("zebughil.out");
^
user.cpp: In function ‘void solve()’:
user.cpp:22:15: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
f >> g[i];
^
user.cpp:29:31: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
if (d[p].y + g[i] <= 0) {
^
user.cpp:30:57: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
d[j] = min(d[j], {d[p].x, d[p].y + g[i]});
^
user.cpp:30:61: error: no matching function for call to ‘min(std::pair<int, int>&, <brace-enclosed initializer list>)’
d[j] = min(d[j], {d[p].x, d[p].y + g[i]});
^
user.cpp:30:61: note: candidates are:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = std::pair<int, int>]
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: no known conversion for argument 2 from ‘<brace-enclosed initializer list>’ to ‘const std::pair<int, int>&’
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed:
user.cpp:30:61: note: candidate expects 3 arguments, 2 provided
d[j] = min(d[j], {d[p].x, d[p].y + g[i]});
^
user.cpp:32:23: error: ‘conf’ was not declared in this scope
d[conf] = min(d[j], {d[p].x + 1, -G + g[i]});
^
user.cpp:32:60: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
d[conf] = min(d[j], {d[p].x + 1, -G + g[i]});
^
user.cpp:32:64: error: no matching function for call to ‘min(std::pair<int, int>&, <brace-enclosed initializer list>)’
d[conf] = min(d[j], {d[p].x + 1, -G + g[i]});
^
user.cpp:32:64: note: candidates are:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !