F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_38810934_19666.cpp:13:21: error: template argument 1 is invalid
   13 | priority_queue <data> q[N],Q;
      |                     ^
0_0_38810934_19666.cpp:13:21: error: template argument 2 is invalid
0_0_38810934_19666.cpp:13:21: error: template argument 3 is invalid
0_0_38810934_19666.cpp: In function 'int main()':
0_0_38810934_19666.cpp:21:29: error: request for member 'empty' in 'q[i]', which is of non-class type 'int'
   21 |                 while(!q[i].empty()) q[i].pop();
      |                             ^~~~~
0_0_38810934_19666.cpp:21:43: error: request for member 'pop' in 'q[i]', which is of non-class type 'int'
   21 |                 while(!q[i].empty()) q[i].pop();
      |                                           ^~~
0_0_38810934_19666.cpp:22:26: error: request for member 'empty' in 'Q', which is of non-class type 'int'
   22 |                 while(!Q.empty()) Q.pop();
      |                          ^~~~~
0_0_38810934_19666.cpp:22:37: error: request for member 'pop' in 'Q', which is of non-class type 'int'
   22 |                 while(!Q.empty()) Q.pop();
      |                                     ^~~
0_0_38810934_19666.cpp:28:53: error: request for member 'push' in 'q[i]', which is of non-class type 'int'
   28 |                                 scanf("%d",&a);q[i].push({a,i});
      |                                                     ^~~~
0_0_38810934_19666.cpp:35:25: error: reference to 'data' is ambiguous
   35 |                         data x=q[i].top();q[i].pop();
      |                         ^~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:53,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bitset:52,
                 from .\stdc++.h:52:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:346:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  346 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:336:5: note:                 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  336 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:325:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  325 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:314:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  314 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
0_0_38810934_19666.cpp:5:8: note:                 'struct data'
    5 | struct data
      |        ^~~~
0_0_38810934_19666.cpp:35:48: error: request for member 'pop' in 'q[i]', which is of non-class type 'int'
   35 |                         data x=q[i].top();q[i].pop();
      |                                                ^~~
0_0_38810934_19666.cpp:36:39: error: 'x' was not declared in this scope
   36 |                         minn=min(minn,x.v);
      |                                       ^
0_0_38810934_19666.cpp:37:27: error: request for member 'push' in 'Q', which is of non-class type 'int'
   37 |                         Q.push(x);
      |                           ^~~~
0_0_38810934_19666.cpp:41:25: error: reference to 'data' is ambiguous
   41 |                         data x=Q.top();Q.pop();
      |                         ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:346:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  346 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:336:5: note:                 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  336 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:325:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  325 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:314:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  314 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
0_0_38810934_19666.cpp:5:8: note:                 'struct data'
    5 | struct data
      |        ^~~~
0_0_38810934_19666.cpp:41:42: error: request for member 'pop' in 'Q', which is of non-class type 'int'
   41 |                         data x=Q.top();Q.pop();
      |                                          ^~~
0_0_38810934_19666.cpp:42:33: error: 'x' was not declared in this scope
   42 |                         ans=min(x.v-minn,ans);
      |                                 ^
0_0_38810934_19666.cpp:44:25: error: reference to 'data' is ambiguous
   44 |                         data y=q[x.id].top();q[x.id].pop();
      |                         ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:346:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  346 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:336:5: note:                 'template<class _Tp, long long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  336 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:325:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  325 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/range_access.h:314:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  314 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
0_0_38810934_19666.cpp:5:8: note:                 'struct data'
    5 | struct data
      |        ^~~~
0_0_38810934_19666.cpp:45:39: error: 'y' was not declared in this scope
   45 |                         minn=min(minn,y.v);
      |                                       ^
0_0_38810934_19666.cpp:46:27: error: request for member 'push' in 'Q', which is of non-class type 'int'
   46 |                         Q.push(y);
      |                           ^~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-06-26 15:57:21, Gzip enabled