Borderou de evaluare (job #2682677)
Utilizator | Data | 9 decembrie 2020 11:41:22 | |
---|---|---|---|
Problema | Catun | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:10:50: error: conflicting declaration 'int f [36001]'
int n, m, k, x, y, c, d[36001], r[36001], f[36001];
^
main.cpp:7:10: note: previous declaration as 'std::ifstream f'
ifstream f ("catun.in");
^
main.cpp:13:27: warning: integer overflow in expression [-Woverflow]
const int inf = (1 << 31) - 1;
~~~~~~~~~~^~~
main.cpp: In function 'void dijkstra()':
main.cpp:23:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < v[nc].size (); i++)
~~^~~~~~~~~~~~~~~
main.cpp:40:8: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
r[f[i]] = 0;
^
main.cpp:18:21: warning: unused variable 't' [-Wunused-variable]
int nc, nv, cost, t;
^
main.cpp: In function 'int main()':
main.cpp:45:3: error: 'fin' was not declared in this scope
fin >> n >> m >> k;
^~~
main.cpp:50:11: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
f >> f[i];
^
main.cpp:51:18: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
q.push ({0, f[i]});
^
main.cpp:51:22: error: no matching function for call to 'std::priority_queue<std::pair<int, int> >::push(<brace-enclosed initializer list>)'
q.push ({0, f[i]});
^
In file included from /usr/include/c++/6/queue:64:0,
from main.cpp:2:
/usr/include/c++/6/bits/stl_queue.h:558:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(const value_type& __x)
^~~~
/usr/include/c++/6/bits/stl_queue.h:558:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
/usr/include/c++/6/bits/stl_queue.h:566:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(value_type&& __x)
^~~~
/usr/include/c++/6/bits/stl_queue.h:566:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}'
main.cpp:52:8: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
d[f[i]] = 0;
^
main.cpp:53:8: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
r[f[i]] = f[i];
^
main.cpp:53:16: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int')
r[f[i]] = f[i];
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !