Borderou de evaluare (job #3281082)
Utilizator | Data | 28 februarie 2025 12:21:43 | |
---|---|---|---|
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:10: error: 'n' was not declared in this scope
12 | fin>>n>>k;
| ^
main.cpp:12:13: error: 'k' was not declared in this scope
12 | fin>>n>>k;
| ^
main.cpp:19:16: error: 'q' was not declared in this scope
19 | while(!q.empty()&&v[qmax.back()]>= v[i])
| ^
main.cpp:22:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
22 | if(qmax.front()<i-k)
| ^~
main.cpp:24:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
24 | while(qmin.empty()&&qmin.back()>=a[i])
| ^~~~~
main.cpp:24:46: error: 'a' was not declared in this scope
24 | while(qmin.empty()&&qmin.back()>=a[i])
| ^
main.cpp:25:22: 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:27: 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:9: 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:13: 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,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !