Borderou de evaluare (job #3130378)

Utilizator BranckhiusIon Dragos-Constantin Branckhius Data 17 mai 2023 17:12:45
Problema Proc2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:10:32: error: 'int' is not a class, struct, or union type 10 | priority_queue<int, int> s; | ^ main.cpp:10:32: error: template argument 3 is invalid main.cpp:11:32: error: 'int' is not a class, struct, or union type 11 | priority_queue<int, int> copy; | ^ main.cpp:11:32: error: template argument 3 is invalid main.cpp:14:19: error: request for member 'push' in 's', which is of non-class type 'int' 14 | s.push(i); | ^~~~ main.cpp:19:27: error: request for member 'push' in 's', which is of non-class type 'int' 19 | s.push(d.top().second); | ^~~~ main.cpp:22:26: error: request for member 'size' in 's', which is of non-class type 'int' 22 | while (s.size() > 1) { | ^~~~ main.cpp:23:30: error: request for member 'push' in 'copy', which is of non-class type 'int' 23 | copy.push(s.top().first.second); | ^~~~ main.cpp:23:37: error: request for member 'top' in 's', which is of non-class type 'int' 23 | copy.push(s.top().first.second); | ^~~ main.cpp:24:27: error: request for member 'pop' in 's', which is of non-class type 'int' 24 | s.pop(); | ^~~ main.cpp:26:24: error: request for member 'top' in 's', which is of non-class type 'int' 26 | g << s.top()<< endl; | ^~~ main.cpp:27:29: error: request for member 'size' in 'copy', which is of non-class type 'int' 27 | while (copy.size() != 0) { | ^~~~ main.cpp:28:27: error: request for member 'push' in 's', which is of non-class type 'int' 28 | s.push(copy.top().first.second); | ^~~~ main.cpp:28:37: error: request for member 'top' in 'copy', which is of non-class type 'int' 28 | s.push(copy.top().first.second); | ^~~ main.cpp:29:30: error: request for member 'pop' in 'copy', which is of non-class type 'int' 29 | copy.pop(); | ^~~ main.cpp:32:35: error: request for member 'top' in 's', which is of non-class type 'int' 32 | d.push({ S + D, s.top() }); | ^~~ main.cpp:32:23: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<void> >::push(<brace-enclosed initializer list>)' 32 | d.push({ S + D, s.top() }); | ~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/queue:64, from main.cpp:2: Non zero exit status: 1

Ceva nu functioneaza?