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_39427082_11888.cpp:5:1: error: reference to 'data' is ambiguous
    5 | data operator + (data x,data y){if(x.l > y.l)swap(x,y);
      | ^~~~
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_39427082_11888.cpp:4:8: note:                 'struct data'
    4 | struct data{ll l,r,vl,vr,s;}t[400005];
      |        ^~~~
0_0_39427082_11888.cpp: In function 'void build(long long int, long long int, long long int)':
0_0_39427082_11888.cpp:14:52: error: no match for 'operator+' (operand types are 'data' and 'data')
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                           ~~~~~~~~ ^ ~~~~~~~~~~~~
      |                                                  |              |
      |                                                  data           data
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algobase.h:67,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:60,
                 from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:634:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_IteratorL> std::operator+(typename reverse_iterator<_IteratorL>::difference_type, const reverse_iterator<_IteratorL>&)'
  634 |     operator+(typename reverse_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:634:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'const std::reverse_iterator<_IteratorL>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:1808:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)'
 1808 |     operator+(typename move_iterator<_Iterator>::difference_type __n,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_iterator.h:1808:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'const std::move_iterator<_IteratorL>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:54:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3552:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3552 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3552:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3570:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3570 |     operator+(const _CharT* __lhs,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3570:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   mismatched types 'const _CharT*' and 'data'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3589:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3589 |     operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs)
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3589:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3606:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
 3606 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3606:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3624:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
 3624 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3624:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3636:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3636 |     operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3636:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p * 2] + t[p * 2 + 1];
      |                                                                 ^
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3643:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
 3643 |     operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:3643:5: note:   template argument deduction/substitution failed:
0_0_39427082_11888.cpp:14:65: note:   'data' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
   14 |         build(mid + 1,r,p * 2 + 1);t[p] = t[p *


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-09-28 15:26:55, Gzip enabled