Borderou de evaluare (job #3348296)
| Utilizator | Data | 20 martie 2026 16:19:23 | |
|---|---|---|---|
| Problema | Deque | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:13:5: error: 'vector' was not declared in this scope
13 | vector<long long> arr(n);
| ^~~~~~
main.cpp:4:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
3 | #include<deque>
+++ |+#include <vector>
4 | using namespace std;
main.cpp:13:12: error: expected primary-expression before 'long'
13 | vector<long long> arr(n);
| ^~~~
main.cpp:15:16: error: 'arr' was not declared in this scope
15 | fin >> arr[i];
| ^~~
main.cpp:18:19: error: 'arr' was not declared in this scope
18 | dq.push_back({arr[0], 0});
| ^~~
main.cpp:18:17: error: no matching function for call to 'std::deque<Node>::push_back(<brace-enclosed initializer list>)'
18 | dq.push_back({arr[0], 0});
| ~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/deque:64,
from main.cpp:3:
/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 = Node; _Alloc = std::allocator<Node>; value_type = Node]'
1538 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_deque.h:1538:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::deque<Node>::value_type&' {aka 'const Node&'}
1538 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/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 = Node; _Alloc = std::allocator<Node>; value_type = Node]'
1553 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_deque.h:1553:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::deque<Node>::value_type&&' {aka 'Node&&'}
1553 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:26:29: error: no matching function for call to 'std::deque<Node>::push_back(<brace-enclosed initializer list>)'
26 | dq.push_back({arr[i], i});
| ~~~~~~~~~~~~^~~~~~~~~~~~~
/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 = Node; _Alloc = std::allocator<Node>; value_type = Node]'
1538 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_deque.h:1538:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::deque<Node>::value_type&' {aka 'const Node&'}
1538 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/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 = Node; _Alloc = std::allocator<Node>; value_type = Node]'
1553 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_deque.h:1553:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::deque<Node>::value_type&&' {aka 'Node&&'}
1553 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:31:25: error: no matching function for call to 'std::deque<Node>::push_back(<brace-enclosed initializer list>)'
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
