답안 #754394

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
754394 2023-06-07T16:31:24 Z Piokemon Two Transportations (JOI19_transportations) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "Azer.h"
using namespace std;
typedef long long int ll;

namespace {
int n;
vector<pair<int,int>> graf[2009];
priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
int poprz=0;
int dst[2009];
int wczyt=0,ter=0,o;
pair<int,int> cel;

}  // namespace

void napisz(int x){
    for (int i=0;i<11;i++) SendA(x & (1<<i));
}

void nast(int v, int d){
    dst[v] = d;
    for (pair<int,int> x:graf[v]){
        if (dst[x.first] > d+x.second){
            dst[x.first] = d+x.second;
            djikstra.push({x.first,dst[x.first]});
        }
    }
    napisz(djikstra.top().first);
    o = true;
}

void InitA(int N, int A, vector<int> U, vector<int> V,
           vector<int> C) {
    n = N;
    for (int x=0;x<A;x++){
        graf[U[x]].push_back({V[x],C[x]});
        graf[V[x]].push_back({U[x],C[x]});
    }
    for (int x=0;x<=n;x++) dst[x] = 1e9+9;
    nast(0,0);
}

void ReceiveA(bool x) {
    wczyt += (1<<ter) * x;
    ter++;
    if (ter==11){
        while(dst[djikstra.top().second] < djikstra.top().first) djikstra.pop();
        ter = 0;
        if (o){
            cel.first = min(wczyt,djikstra.top().first);
            if (wczyt > djikstra.top().first){
                napisz(djikstra.top().second);
                cel.second = djikstra.top().second;
                djikstra.pop();
                nast(cel.first,cel.second);
            }
        }
        else{
            cel.second = wczyt;
            djikstra.pop();
            nast(cel.first,cel.second);
        }
        wczyt = 0;
    }
}

vector<int> Answer() {
    vector<int> odp;
    for (int x=0;x<n;x++) odp.push_back(dst[x]);
    return odp;
}
#include <bits/stdc++.h>
#include "Baijan.h"
using namespace std;
typedef long long int ll;

namespace {
int n;
vector<pair<int,int>> graf[2009];
priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
int poprz=0;
int dst[2009];
int wczyt=0,ter=0,o;
pair<int,int> cel;
}  // namespace


void napisz(int x){
    for (int i=0;i<11;i++) SendB(x & (1<<i));
}

void nast(int v, int d){
    dst[v] = d;
    for (pair<int,int> x:graf[v]){
        if (dst[x.first] > d+x.second){
            dst[x.first] = d+x.second;
            djikstra.push({x.first,dst[x.first]});
        }
    }
    napisz(djikstra.top().first);
    o = true;
}

void InitB(int N, int B, vector<int> S, vector<int> T,
           vector<int> D) {
    n = N;
    for (int x=0;x<B;x++){
        graf[T[x]].push_back({S[x],D[x]});
        graf[S[x]].push_back({T[x],D[x]});
    }
    for (int x=0;x<=n;x++) dst[x] = 1e9+9;
    nast(0,0);
}

void ReceiveB(bool y) {
    wczyt += (1<<ter) * y;
    ter++;
    if (ter==11){
        while(dst[djikstra.top().second] < djikstra.top().first) djikstra.pop();
        ter = 0;
        if (o){
            cel.first = min(wczyt,djikstra.top().first);
            if (wczyt > djikstra.top().first){
                napisz(djikstra.top().second);
                cel.second = djikstra.top().second;
                djikstra.pop();
                nast(cel.first,cel.second);
            }
        }
        else{
            cel.second = wczyt;
            djikstra.pop();
            nast(cel.first,cel.second);
        }
        wczyt = 0;
    }
}

Compilation message

In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h: In instantiation of 'class std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>':
Azer.cpp:9:78:   required from here
/usr/include/c++/10/bits/stl_queue.h:498:18: error: data member 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::comp' invalidly declared function type
  498 |       _Compare   comp;
      |                  ^~~~
Azer.cpp:9:78: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::priority_queue()'
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:597:2: note: candidate: 'template<class _InputIterator> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(_InputIterator, _InputIterator, const _Compare&, _Sequence&&) [with _InputIterator = _InputIterator; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  597 |  priority_queue(_InputIterator __first, _InputIterator __last,
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:597:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 4 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:586:2: note: candidate: 'template<class _InputIterator> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(_InputIterator, _InputIterator, const _Compare&, const _Sequence&) [with _InputIterator = _InputIterator; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  586 |  priority_queue(_InputIterator __first, _InputIterator __last,
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:586:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 4 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:554:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(std::priority_queue<_Tp, _Sequence, _Compare>&&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  554 |  priority_queue(priority_queue&& __q, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:554:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 2 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:550:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const std::priority_queue<_Tp, _Sequence, _Compare>&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  550 |  priority_queue(const priority_queue& __q, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:550:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 2 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:545:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, _Sequence&&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  545 |  priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:545:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 3 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:539:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, const _Sequence&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  539 |  priority_queue(const _Compare& __x, const _Sequence& __c,
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:539:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 3 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:533:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  533 |  priority_queue(const _Compare& __x, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:533:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 2 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:529:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  529 |  priority_queue(const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:529:2: note:   template argument deduction/substitution failed:
Azer.cpp:9:78: note:   candidate expects 1 argument, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:523:7: note: candidate: 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, _Sequence&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  523 |       priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence())
      |       ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:523:7: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/10/bits/stl_queue.h:518:7: note: candidate: 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, const _Sequence&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  518 |       priority_queue(const _Compare& __x, const _Sequence& __s)
      |       ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:518:7: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/10/bits/stl_queue.h:514:2: note: candidate: 'template<class _Seq, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue() [with _Seq = _Seq; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  514 |  priority_queue()
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:514:2: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_queue.h:511:43: error: no type named 'type' in 'struct std::enable_if<false, void>'
  511 |       template<typename _Seq = _Sequence, typename _Requires = typename
      |                                           ^~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:456:11: note: candidate: 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::priority_queue(const std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>&)'
  456 |     class priority_queue
      |           ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:456:11: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/10/bits/stl_queue.h:456:11: note: candidate: 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::priority_queue(std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>&&)'
/usr/include/c++/10/bits/stl_queue.h:456:11: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Azer.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Value = std::pair<int, int>; _Compare = std::greater<std::pair<int, int> > (*)()]':
/usr/include/c++/10/bits/stl_heap.h:139:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Distance = long int; _Tp = std::pair<int, int>; _Compare = __gnu_cxx::__ops::_Iter_comp_val<std::greater<std::pair<int, int> > (*)()>]'
/usr/include/c++/10/bits/stl_heap.h:215:23:   required from 'void std::push_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> > (*)()]'
/usr/include/c++/10/bits/stl_queue.h:651:16:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >(); std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]'
Azer.cpp:26:49:   required from here
/usr/include/c++/10/bits/predefined_ops.h:194:23: error: too many arguments to function
  194 |  { return bool(_M_comp(*__it, __val)); }
      |                ~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/10/bits/predefined_ops.h:194:11: error: invalid cast from type 'std::greater<std::pair<int, int> >' to type 'bool'
  194 |  { return bool(_M_comp(*__it, __val)); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> > (*)()]':
/usr/include/c++/10/bits/stl_heap.h:231:14:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Distance = long int; _Tp = std::pair<int, int>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<std::pair<int, int> > (*)()>]'
/usr/include/c++/10/bits/stl_heap.h:263:25:   required from 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<std::pair<int, int> > (*)()>]'
/usr/include/c++/10/bits/stl_heap.h:332:19:   required from 'void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> > (*)()]'
/usr/include/c++/10/bits/stl_queue.h:678:15:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
Azer.cpp:48:79:   required from here
/usr/include/c++/10/bits/predefined_ops.h:156:30: error: too many arguments to function
  156 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/predefined_ops.h:156:18: error: invalid cast from type 'std::greater<std::pair<int, int> >' to type 'bool'
  156 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Azer.cpp:10:5: warning: '{anonymous}::poprz' defined but not used [-Wunused-variable]
   10 | int poprz=0;
      |     ^~~~~

In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h: In instantiation of 'class std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>':
Baijan.cpp:9:78:   required from here
/usr/include/c++/10/bits/stl_queue.h:498:18: error: data member 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::comp' invalidly declared function type
  498 |       _Compare   comp;
      |                  ^~~~
Baijan.cpp:9:78: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::priority_queue()'
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:597:2: note: candidate: 'template<class _InputIterator> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(_InputIterator, _InputIterator, const _Compare&, _Sequence&&) [with _InputIterator = _InputIterator; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  597 |  priority_queue(_InputIterator __first, _InputIterator __last,
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:597:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 4 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:586:2: note: candidate: 'template<class _InputIterator> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(_InputIterator, _InputIterator, const _Compare&, const _Sequence&) [with _InputIterator = _InputIterator; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  586 |  priority_queue(_InputIterator __first, _InputIterator __last,
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:586:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 4 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:554:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(std::priority_queue<_Tp, _Sequence, _Compare>&&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  554 |  priority_queue(priority_queue&& __q, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:554:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 2 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:550:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const std::priority_queue<_Tp, _Sequence, _Compare>&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  550 |  priority_queue(const priority_queue& __q, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:550:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 2 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:545:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, _Sequence&&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  545 |  priority_queue(const _Compare& __x, _Sequence&& __c, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:545:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 3 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:539:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, const _Sequence&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  539 |  priority_queue(const _Compare& __x, const _Sequence& __c,
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:539:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 3 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:533:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  533 |  priority_queue(const _Compare& __x, const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:533:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 2 arguments, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:529:2: note: candidate: 'template<class _Alloc, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Alloc&) [with _Alloc = _Alloc; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  529 |  priority_queue(const _Alloc& __a)
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:529:2: note:   template argument deduction/substitution failed:
Baijan.cpp:9:78: note:   candidate expects 1 argument, 0 provided
    9 | priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>()> djikstra;
      |                                                                              ^~~~~~~~
In file included from /usr/include/c++/10/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:86,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/stl_queue.h:523:7: note: candidate: 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, _Sequence&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  523 |       priority_queue(const _Compare& __x, _Sequence&& __s = _Sequence())
      |       ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:523:7: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/10/bits/stl_queue.h:518:7: note: candidate: 'std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue(const _Compare&, const _Sequence&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  518 |       priority_queue(const _Compare& __x, const _Sequence& __s)
      |       ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:518:7: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/10/bits/stl_queue.h:514:2: note: candidate: 'template<class _Seq, class _Requires> std::priority_queue<_Tp, _Sequence, _Compare>::priority_queue() [with _Seq = _Seq; _Requires = _Requires; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
  514 |  priority_queue()
      |  ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:514:2: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_queue.h:511:43: error: no type named 'type' in 'struct std::enable_if<false, void>'
  511 |       template<typename _Seq = _Sequence, typename _Requires = typename
      |                                           ^~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:456:11: note: candidate: 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::priority_queue(const std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>&)'
  456 |     class priority_queue
      |           ^~~~~~~~~~~~~~
/usr/include/c++/10/bits/stl_queue.h:456:11: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/10/bits/stl_queue.h:456:11: note: candidate: 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>::priority_queue(std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> >()>&&)'
/usr/include/c++/10/bits/stl_queue.h:456:11: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Baijan.cpp:1:
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Value = std::pair<int, int>; _Compare = std::greater<std::pair<int, int> > (*)()]':
/usr/include/c++/10/bits/stl_heap.h:139:48:   required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Distance = long int; _Tp = std::pair<int, int>; _Compare = __gnu_cxx::__ops::_Iter_comp_val<std::greater<std::pair<int, int> > (*)()>]'
/usr/include/c++/10/bits/stl_heap.h:215:23:   required from 'void std::push_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> > (*)()]'
/usr/include/c++/10/bits/stl_queue.h:651:16:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >(); std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]'
Baijan.cpp:26:49:   required from here
/usr/include/c++/10/bits/predefined_ops.h:194:23: error: too many arguments to function
  194 |  { return bool(_M_comp(*__it, __val)); }
      |                ~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/10/bits/predefined_ops.h:194:11: error: invalid cast from type 'std::greater<std::pair<int, int> >' to type 'bool'
  194 |  { return bool(_M_comp(*__it, __val)); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> > (*)()]':
/usr/include/c++/10/bits/stl_heap.h:231:14:   required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Distance = long int; _Tp = std::pair<int, int>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<std::pair<int, int> > (*)()>]'
/usr/include/c++/10/bits/stl_heap.h:263:25:   required from 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<std::pair<int, int> > (*)()>]'
/usr/include/c++/10/bits/stl_heap.h:332:19:   required from 'void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> > (*)()]'
/usr/include/c++/10/bits/stl_queue.h:678:15:   required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >()]'
Baijan.cpp:48:79:   required from here
/usr/include/c++/10/bits/predefined_ops.h:156:30: error: too many arguments to function
  156 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                       ~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/predefined_ops.h:156:18: error: invalid cast from type 'std::greater<std::pair<int, int> >' to type 'bool'
  156 |         { return bool(_M_comp(*__it1, *__it2)); }
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Baijan.cpp:10:5: warning: '{anonymous}::poprz' defined but not used [-Wunused-variable]
   10 | int poprz=0;
      |     ^~~~~