Borderou de evaluare (job #3271764)

Utilizator BiceaToader David Stefan Bicea Data 27 ianuarie 2025 11:47:59
Problema Dragoni Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:11:28: error: 'PPI' was not declared in this scope; did you mean 'PPi'? 11 | priority_queue <PPi,vector<PPI>,greater <PPi> >h; | ^~~ | PPi main.cpp:11:31: error: template argument 1 is invalid 11 | priority_queue <PPi,vector<PPI>,greater <PPi> >h; | ^ main.cpp:11:31: error: template argument 2 is invalid main.cpp:11:47: error: template argument 2 is invalid 11 | priority_queue <PPi,vector<PPI>,greater <PPi> >h; | ^ main.cpp: In function 'void dijkstra(int)': main.cpp:28:3: error: request for member 'push' in 'h', which is of non-class type 'int' 28 | h.push(make_pair({pw[s],{0,s}})); | ^~~~ main.cpp:28:21: error: invalid types 'int[int]' for array subscript 28 | h.push(make_pair({pw[s],{0,s}})); | ^ main.cpp:28:17: error: no matching function for call to 'make_pair(<brace-enclosed initializer list>)' 28 | h.push(make_pair({pw[s],{0,s}})); | ~~~~~~~~~^~~~~~~~~~~~~~~ In file included from /usr/include/c++/12.2.1/bits/stl_algobase.h:64, from /usr/include/c++/12.2.1/string:50, from /usr/include/c++/12.2.1/bits/locale_classes.h:40, from /usr/include/c++/12.2.1/bits/ios_base.h:41, from /usr/include/c++/12.2.1/ios:42, from /usr/include/c++/12.2.1/ostream:38, from /usr/include/c++/12.2.1/iostream:39, from main.cpp:1: /usr/include/c++/12.2.1/bits/stl_pair.h:741:5: note: candidate: 'template<class _T1, class _T2> constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&)' 741 | make_pair(_T1&& __x, _T2&& __y) | ^~~~~~~~~ /usr/include/c++/12.2.1/bits/stl_pair.h:741:5: note: template argument deduction/substitution failed: main.cpp:28:17: note: candidate expects 2 arguments, 1 provided 28 | h.push(make_pair({pw[s],{0,s}})); | ~~~~~~~~~^~~~~~~~~~~~~~~ main.cpp:29:10: error: request for member 'empty' in 'h', which is of non-class type 'int' 29 | while(!h.empty()) | ^~~~~ main.cpp:30:12: error: request for member 'top' in 'h', which is of non-class type 'int' 30 | {nod=h.top().second; | ^~~ main.cpp:31:12: error: request for member 'top' in 'h', which is of non-class type 'int' 31 | cost=h.top().first; | ^~~ main.cpp:32:7: error: request for member 'pop' in 'h', which is of non-class type 'int' 32 | h.pop(); | ^~~ main.cpp:34:20: error: conversion from 'pair<int,[...]>' to non-scalar type 'pair<std::pair<int, int>,[...]>' requested 34 | for(PPi i:v[nod]) Non zero exit status: 1

Ceva nu functioneaza?