Borderou de evaluare (job #3139069)
Utilizator | Data | 24 iunie 2023 18:17:56 | |
---|---|---|---|
Problema | Heapuri | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:5:20: error: 'array' in namespace 'std' does not name a template type
5 | using Array = std::array<int, 200011>;
| ^~~~~
main.cpp:4:1: note: 'std::array' is defined in header '<array>'; did you forget to '#include <array>'?
3 | #include <vector>
+++ |+#include <array>
4 |
main.cpp:8:1: error: 'Array' does not name a type
8 | Array heap, values, position;
| ^~~~~
main.cpp: In function 'void push(int)':
main.cpp:20:22: error: 'values' was not declared in this scope
20 | while (node > 1 && values[heap[node]] < values[heap[fatherNode]]) {
| ^~~~~~
main.cpp:20:29: error: 'heap' was not declared in this scope
20 | while (node > 1 && values[heap[node]] < values[heap[fatherNode]]) {
| ^~~~
main.cpp:22:5: error: 'position' was not declared in this scope
22 | position[heap[node]] = node;
| ^~~~~~~~
main.cpp: In function 'void pop(int, int)':
main.cpp:32:18: error: 'values' was not declared in this scope
32 | int chosen = values[heap[leftSon(node)]] <= values[heap[rightSon(node)]] ? leftSon(node) : rightSon(node);
| ^~~~~~
main.cpp:32:25: error: 'heap' was not declared in this scope
32 | int chosen = values[heap[leftSon(node)]] <= values[heap[rightSon(node)]] ? leftSon(node) : rightSon(node);
| ^~~~
main.cpp:35:5: error: 'position' was not declared in this scope
35 | position[heap[node]] = node;
| ^~~~~~~~
main.cpp: In function 'int main()':
main.cpp:54:14: error: 'values' was not declared in this scope
54 | out << values[heap[1]] << '\n';
| ^~~~~~
main.cpp:54:21: error: 'heap' was not declared in this scope
54 | out << values[heap[1]] << '\n';
| ^~~~
main.cpp:60:9: error: 'values' was not declared in this scope; did you mean 'value'?
60 | values[NumElements] = value;
| ^~~~~~
| value
main.cpp:61:9: error: 'heap' was not declared in this scope
61 | heap[HeapSize] = NumElements ;
| ^~~~
main.cpp:62:9: error: 'position' was not declared in this scope
62 | position[NumElements ] = HeapSize ;
| ^~~~~~~~
main.cpp:66:9: error: 'values' was not declared in this scope; did you mean 'value'?
66 | values[value] = -1;
| ^~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !