Borderou de evaluare (job #3281084)
Utilizator | Data | 28 februarie 2025 12:23:21 | |
---|---|---|---|
Problema | Vila 2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:1: error: expected ',' or ';' before 'int'
6 | int n,k,i;
| ^~~
main.cpp: In function 'int main()':
main.cpp:12:14: error: 'n' was not declared in this scope
12 | fin>>n>>k;
| ^
main.cpp:12:17: error: 'k' was not declared in this scope
12 | fin>>n>>k;
| ^
main.cpp:19:24: error: 'q' was not declared in this scope
19 | while(!q.empty()&&v[qmax.back()]>= v[i])
| ^
main.cpp:24:37: error: 'a' was not declared in this scope
24 | while(qmin.empty()&&a[qmin.back]()>=a[i])
| ^
main.cpp:25:30: error: invalid use of non-static member function 'void std::deque<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]'
25 | qmin.pop_back;
| ~~~~~^~~~~~~~
In file included from /usr/include/c++/12.2.1/deque:64,
from main.cpp:2:
/usr/include/c++/12.2.1/bits/stl_deque.h:1597:7: note: declared here
1597 | pop_back() _GLIBCXX_NOEXCEPT
| ^~~~~~~~
main.cpp:26:31: error: no matching function for call to 'std::deque<int>::push_back()'
26 | qmin.push_back();
| ~~~~~~~~~~~~~~^~
/usr/include/c++/12.2.1/bits/stl_deque.h:1538:7: note: candidate: 'void std::deque<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1538 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_deque.h:1538:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/12.2.1/bits/stl_deque.h:1553:7: note: candidate: 'void std::deque<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
1553 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_deque.h:1553:7: note: candidate expects 1 argument, 0 provided
main.cpp:29:17: error: 'Max' was not declared in this scope; did you mean 'max'?
29 | Max=max(Max,v[qmax.front()]-v[qmin.front()])
| ^~~
| max
main.cpp:29:21: error: reference to 'max' is ambiguous
29 | Max=max(Max,v[qmax.front()]-v[qmin.front()])
| ^~~
In file included from /usr/include/c++/12.2.1/string:50,
from /usr/include/c++/12.2.1/bits/locale_classes.h:40,
from /usr/include/c++/12.2.1/bits/ios_base.h:41,
from /usr/include/c++/12.2.1/ios:42,
from /usr/include/c++/12.2.1/istream:38,
from /usr/include/c++/12.2.1/fstream:38,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_algobase.h:300:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !