Borderou de evaluare (job #3266585)
Utilizator | Data | 9 ianuarie 2025 16:13:57 | |
---|---|---|---|
Problema | Muncitori | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:11:24: error: 'std::vector<std::pair<int, int> > select' redeclared as different kind of entity
11 | vector <pair<int,int>> select;
| ^~~~~~
In file included from /usr/include/sys/types.h:179,
from /usr/include/stdlib.h:395,
from /usr/include/c++/12.2.1/bits/std_abs.h:38,
from /usr/include/c++/12.2.1/cmath:47,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:41,
from main.cpp:1:
/usr/include/sys/select.h:102:12: note: previous declaration 'int select(int, fd_set*, fd_set*, fd_set*, timeval*)'
102 | extern int select (int __nfds, fd_set *__restrict __readfds,
| ^~~~~~
main.cpp: In function 'int main()':
main.cpp:25:16: error: request for member 'clear' in 'select', which is of non-class type 'int(int, fd_set*, fd_set*, fd_set*, timeval*)'
25 | select.clear();
| ^~~~~
main.cpp:27:20: error: request for member 'push_back' in 'select', which is of non-class type 'int(int, fd_set*, fd_set*, fd_set*, timeval*)'
27 | select.push_back(heap.top());
| ^~~~~~~~~
main.cpp:30:33: warning: pointer to a function used in arithmetic [-Wpointer-arith]
30 | int mom_lib = select[k-1].first,nr_munc = select[k-1].second;
| ^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
main.cpp:30:35: error: request for member 'first' in '*(select + (((sizetype)k) + 18446744073709551615))', which is of non-class type 'int(int, fd_set*, fd_set*, fd_set*, timeval*)'
30 | int mom_lib = select[k-1].first,nr_munc = select[k-1].second;
| ^~~~~
main.cpp:33:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
33 | heap.push(select[i]);
| ^
main.cpp:33:22: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(int (&)(int, fd_set*, fd_set*, fd_set*, timeval*))'
33 | heap.push(select[i]);
| ~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/queue:64,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:86:
/usr/include/c++/12.2.1/bits/stl_queue.h:738: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::greater<std::pair<int, int> >; value_type = std::pair<int, int>]'
738 | push(const value_type& __x)
| ^~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:738:30: note: no known conversion for argument 1 from 'int(int, fd_set*, fd_set*, fd_set*, timeval*)' to 'const std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&' {aka 'const std::pair<int, int>&'}
738 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/12.2.1/bits/stl_queue.h:746:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; value_type = std::pair<int, int>]'
746 | push(value_type&& __x)
| ^~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:746:25: note: no known conversion for argument 1 from 'int(int, fd_set*, fd_set*, fd_set*, timeval*)' to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&&' {aka 'std::pair<int, int>&&'}
746 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:35:28: error: 'nr_munc' was not declared in this scope; did you mean 'trunc'?
35 | heap.push({mom_lib,nr_munc});
| ^~~~~~~
| trunc
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !