QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#678321#559. 原力yellowbirdCompile Error//C++201.4kb2024-10-26 14:38:172024-10-26 14:38:18

详细

answer.code:14:12: error: template argument 1 is invalid
   14 | map<data,ll> mp;
      |            ^
answer.code:14:12: error: template argument 3 is invalid
answer.code:14:12: error: template argument 4 is invalid
answer.code: In function ‘void add(int, int, int, int)’:
answer.code:18:70: error: reference to ‘next’ is ambiguous
   18 | void add(int x,int y,int v,int c){ to[++cnt]=y,val[cnt]=v,opt[cnt]=c,next[cnt]=head[x],head[x]=cnt; }
      |                                                                      ^~~~
In file included from /usr/include/c++/13/bits/stl_algobase.h:66,
                 from /usr/include/c++/13/bits/stl_tree.h:63,
                 from /usr/include/c++/13/map:62,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)’
  232 |     next(_InputIterator __x, typename
      |     ^~~~
answer.code:15:63: note:                 ‘int next [200400]’
   15 | int n,m,si,x,y,z,t,head[N],to[N << 2],val[N << 2],opt[N << 2],next[N << 2],cnt,d[N],id[350],tot;
      |                                                               ^~~~
answer.code: In function ‘int main()’:
answer.code:26:13: error: reference to ‘data’ is ambiguous
   26 |         (mp[data(x,y,t)] += z) %= mod,(mp[data(y,x,t)] += z) %= mod;
      |             ^~~~
In file included from /usr/include/c++/13/map:65:
/usr/include/c++/13/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
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:336:5: note:                 ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
  336 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/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()))
      |     ^~~~
/usr/include/c++/13/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()))
      |     ^~~~
answer.code:9:8: note:                 ‘struct data’
    9 | struct data{
      |        ^~~~
answer.code:26:43: error: reference to ‘data’ is ambiguous
   26 |         (mp[data(x,y,t)] += z) %= mod,(mp[data(y,x,t)] += z) %= mod;
      |                                           ^~~~
/usr/include/c++/13/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
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:336:5: note:                 ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
  336 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/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()))
      |     ^~~~
/usr/include/c++/13/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()))
      |     ^~~~
answer.code:9:8: note:                 ‘struct data’
    9 | struct data{
      |        ^~~~
answer.code:30:21: error: reference to ‘data’ is ambiguous
   30 |         ans=(ans+mp[data(id[i],id[j],1)]*mp[data(id[i],id[k],2)]%mod*mp[data(id[j],id[k],3)])%mod;
      |                     ^~~~
/usr/include/c++/13/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
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:336:5: note:                 ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
  336 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/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()))
      |     ^~~~
/usr/include/c++/13/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()))
      |     ^~~~
answer.code:9:8: note:                 ‘struct data’
    9 | struct data{
      |        ^~~~
answer.code:30:45: er...