Borderou de evaluare (job #2812449)
| Utilizator | Data | 4 decembrie 2021 15:49:16 | |
|---|---|---|---|
| Problema | Deque | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:12:22: error: 'INT_MAX' was not declared in this scope
12 | int n, v[1001], mi = INT_MAX, s, I, k, i;
| ^~~~~~~
main.cpp:4:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
3 | #include<deque>
+++ |+#include <climits>
4 | using namespace std;
main.cpp: In function 'int main()':
main.cpp:17:24: error: 'k' was not declared in this scope
17 | scanf("%d%d", &n, &k);
| ^
main.cpp:18:10: error: 'i' was not declared in this scope; did you mean 'mi'?
18 | for( i = 1; i <= n; i++)
| ^
| mi
main.cpp:20:10: error: 'i' was not declared in this scope; did you mean 'mi'?
20 | for( i = 1; i <= k; i++)
| ^
| mi
main.cpp:23:33: error: 'I' was not declared in this scope
23 | mi = min(mi, v[i]), I = i;
| ^
main.cpp:27:32: error: no matching function for call to 'std::deque<ij>::push_front(<brace-enclosed initializer list>)'
27 | st.push_front({v[i], i});
| ^
In file included from /usr/include/c++/10/deque:67,
from main.cpp:3:
/usr/include/c++/10/bits/stl_deque.h:1456:7: note: candidate: 'void std::deque<_Tp, _Alloc>::push_front(const value_type&) [with _Tp = ij; _Alloc = std::allocator<ij>; std::deque<_Tp, _Alloc>::value_type = ij]'
1456 | push_front(const value_type& __x)
| ^~~~~~~~~~
/usr/include/c++/10/bits/stl_deque.h:1456:36: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const ij&'}
1456 | push_front(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_deque.h:1471:7: note: candidate: 'void std::deque<_Tp, _Alloc>::push_front(std::deque<_Tp, _Alloc>::value_type&&) [with _Tp = ij; _Alloc = std::allocator<ij>; std::deque<_Tp, _Alloc>::value_type = ij]'
1471 | push_front(value_type&& __x)
| ^~~~~~~~~~
/usr/include/c++/10/bits/stl_deque.h:1471:31: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::deque<ij>::value_type&&' {aka 'ij&&'}
1471 | push_front(value_type&& __x)
| ~~~~~~~~~~~~~^~~
main.cpp:29:5: error: 's' was not declared in this scope
29 | s += mi;
| ^
main.cpp:30:10: error: 'i' was not declared in this scope; did you mean 'mi'?
30 | for( i = k + 1; i <= n; i++)
| ^
| mi
main.cpp:36:32: error: no matching function for call to 'std::deque<ij>::push_front(<brace-enclosed initializer list>)'
36 | st.push_front({v[i], i});
| ^
In file included from /usr/include/c++/10/deque:67,
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
