练习 – 找到报错原因

In file included from /home/lz/桌面/code/scheme/sys/boost/variant.hpp:17:0,
                 from /home/lz/桌面/code/scheme/types/all.hpp:18,
                 from /home/lz/桌面/code/scheme/types.hpp:4,
                 from /home/lz/桌面/code/scheme/tokenizer.hpp:6,
                 from /home/lz/桌面/code/scheme/cli.cpp:2:
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp: In instantiation of ‘int boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::convert_copy_into::internal_visit(T&, int) const [with T = const LambdaType; T0_ = Formatter<int>; T1 = Formatter<Wrapper<char> >; T2 = Formatter<Wrapper<bool> >; T3 = Formatter<int>; T4 = Formatter<int>; T5 = Formatter<int>; T6 = Formatter<int>; T7 = Formatter<ComplexType>; T8 = Formatter<int>; T9 = Formatter<int>; T10 = Formatter<int>; T11 = Formatter<int>; T12 = Formatter<std::basic_string<char> >; T13 = Formatter<int>; T14 = Formatter<int>; T15 = Formatter<std::basic_string<char> >; T16 = Formatter<int>; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_]’:
/home/lz/桌面/code/scheme/sys/boost/variant/detail/visitation_impl.hpp:130:9:   required from ‘typename Visitor::result_type boost::detail::variant::visitation_impl_invoke_impl(int, Visitor&, VoidPtrCV, T*, mpl_::true_) [with Visitor = boost::variant<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> >::convert_copy_into; VoidPtrCV = const void*; T = LambdaType; typename Visitor::result_type = int; mpl_::true_ = mpl_::bool_<true>]’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/visitation_impl.hpp:170:41:   required from ‘typename Visitor::result_type boost::detail::variant::visitation_impl_invoke(int, Visitor&, VoidPtrCV, T*, NoBackupFlag, int) [with Visitor = boost::variant<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> >::convert_copy_into; VoidPtrCV = const void*; T = LambdaType; NoBackupFlag = boost::variant<int, Wrapper<char>, Wrapper<bool>, int, int, int, int, ComplexType, int, int, int, int, std::basic_string<char>, int, int, std::basic_string<char>, LambdaType, int>::has_fallback_type_; typename Visitor::result_type = int]’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/visitation_impl.hpp:256:5:   required from ‘typename Visitor::result_type boost::detail::variant::visitation_impl(int, int, Visitor&, VoidPtrCV, mpl_::false_, NoBackupFlag, Which*, step0*) [with Which = mpl_::int_<0>; step0 = boost::detail::variant::visitation_impl_step<boost::mpl::l_iter<boost::mpl::l_item<mpl_::long_<18l>, int, boost::mpl::l_item<mpl_::long_<17l>, Wrapper<char>, boost::mpl::l_item<mpl_::long_<16l>, Wrapper<bool>, boost::mpl::l_item<mpl_::long_<15l>, int, boost::mpl::l_item<mpl_::long_<14l>, int, boost::mpl::l_item<mpl_::long_<13l>, int, boost::mpl::l_item<mpl_::long_<12l>, int, boost::mpl::l_item<mpl_::long_<11l>, ComplexType, boost::mpl::l_item<mpl_::long_<10l>, int, boost::mpl::l_item<mpl_::long_<9l>, int, boost::mpl::l_item<mpl_::long_<8l>, int, boost::mpl::l_item<mpl_::long_<7l>, int, boost::mpl::l_item<mpl_::long_<6l>, std::basic_string<char>, boost::mpl::l_item<mpl_::long_<5l>, int, boost::mpl::l_item<mpl_::long_<4l>, int, boost::mpl::l_item<mpl_::long_<3l>, std::basic_string<char>, boost::mpl::l_item<mpl_::long_<2l>, LambdaType, boost::mpl::l_item<mpl_::long_<1l>, int, boost::mpl::l_end> > > > > > > > > > > > > > > > > > >, boost::mpl::l_iter<boost::mpl::l_end> >; Visitor = boost::variant<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> >::convert_copy_into; VoidPtrCV = const void*; NoBackupFlag = boost::variant<int, Wrapper<char>, Wrapper<bool>, int, int, int, int, ComplexType, int, int, int, int, std::basic_string<char>, int, int, std::basic_string<char>, LambdaType, int>::has_fallback_type_; typename Visitor::result_type = int; mpl_::false_ = mpl_::bool_<false>]’
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:2362:48:   required from ‘static typename Visitor::result_type boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::internal_apply_visitor_impl(int, int, Visitor&, VoidPtrCV) [with Visitor = boost::variant<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> >::convert_copy_into; VoidPtrCV = const void*; T0_ = int; T1 = Wrapper<char>; T2 = Wrapper<bool>; T3 = int; T4 = int; T5 = int; T6 = int; T7 = ComplexType; T8 = int; T9 = int; T10 = int; T11 = int; T12 = std::basic_string<char>; T13 = int; T14 = int; T15 = std::basic_string<char>; T16 = LambdaType; T17 = int; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_; typename Visitor::result_type = int]’
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:2387:43:   required from ‘typename Visitor::result_type boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::internal_apply_visitor(Visitor&) const [with Visitor = boost::variant<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> >::convert_copy_into; T0_ = int; T1 = Wrapper<char>; T2 = Wrapper<bool>; T3 = int; T4 = int; T5 = int; T6 = int; T7 = ComplexType; T8 = int; T9 = int; T10 = int; T11 = int; T12 = std::basic_string<char>; T13 = int; T14 = int; T15 = std::basic_string<char>; T16 = LambdaType; T17 = int; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_; typename Visitor::result_type = int]’
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:1628:23:   required from ‘void boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::convert_construct(Variant&, long int, mpl_::true_) [with Variant = const boost::variant<int, Wrapper<char>, Wrapper<bool>, int, int, int, int, ComplexType, int, int, int, int, std::basic_string<char>, int, int, std::basic_string<char>, LambdaType, int>; T0_ = Formatter<int>; T1 = Formatter<Wrapper<char> >; T2 = Formatter<Wrapper<bool> >; T3 = Formatter<int>; T4 = Formatter<int>; T5 = Formatter<int>; T6 = Formatter<int>; T7 = Formatter<ComplexType>; T8 = Formatter<int>; T9 = Formatter<int>; T10 = Formatter<int>; T11 = Formatter<int>; T12 = Formatter<std::basic_string<char> >; T13 = Formatter<int>; T14 = Formatter<int>; T15 = Formatter<std::basic_string<char> >; T16 = Formatter<int>; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_; mpl_::true_ = mpl_::bool_<true>]’
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:1669:26:   required from ‘void boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::convert_construct_variant(Variant&) [with Variant = const boost::variant<int, Wrapper<char>, Wrapper<bool>, int, int, int, int, ComplexType, int, int, int, int, std::basic_string<char>, int, int, std::basic_string<char>, LambdaType, int>; T0_ = Formatter<int>; T1 = Formatter<Wrapper<char> >; T2 = Formatter<Wrapper<bool> >; T3 = Formatter<int>; T4 = Formatter<int>; T5 = Formatter<int>; T6 = Formatter<int>; T7 = Formatter<ComplexType>; T8 = Formatter<int>; T9 = Formatter<int>; T10 = Formatter<int>; T11 = Formatter<int>; T12 = Formatter<std::basic_string<char> >; T13 = Formatter<int>; T14 = Formatter<int>; T15 = Formatter<std::basic_string<char> >; T16 = Formatter<int>; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_]’
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:1719:34:   required from ‘void boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::convert_construct(const boost::variant<U0, U1, U2, U3, U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19>&, long int) [with U0 = int; U1 = Wrapper<char>; U2 = Wrapper<bool>; U3 = int; U4 = int; U5 = int; U6 = int; U7 = ComplexType; U8 = int; U9 = int; U10 = int; U11 = int; U12 = std::basic_string<char>; U13 = int; U14 = int; U15 = std::basic_string<char>; U16 = LambdaType; U17 = int; U18 = boost::detail::variant::void_; U19 = boost::detail::variant::void_; T0_ = Formatter<int>; T1 = Formatter<Wrapper<char> >; T2 = Formatter<Wrapper<bool> >; T3 = Formatter<int>; T4 = Formatter<int>; T5 = Formatter<int>; T6 = Formatter<int>; T7 = Formatter<ComplexType>; T8 = Formatter<int>; T9 = Formatter<int>; T10 = Formatter<int>; T11 = Formatter<int>; T12 = Formatter<std::basic_string<char> >; T13 = Formatter<int>; T14 = Formatter<int>; T15 = Formatter<std::basic_string<char> >; T16 = Formatter<int>; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_]’
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:1740:26:   required from ‘boost::variant<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>::variant(const T&) [with T = boost::variant<int, Wrapper<char>, Wrapper<bool>, int, int, int, int, ComplexType, int, int, int, int, std::basic_string<char>, int, int, std::basic_string<char>, LambdaType, int>; T0_ = Formatter<int>; T1 = Formatter<Wrapper<char> >; T2 = Formatter<Wrapper<bool> >; T3 = Formatter<int>; T4 = Formatter<int>; T5 = Formatter<int>; T6 = Formatter<int>; T7 = Formatter<ComplexType>; T8 = Formatter<int>; T9 = Formatter<int>; T10 = Formatter<int>; T11 = Formatter<int>; T12 = Formatter<std::basic_string<char> >; T13 = Formatter<int>; T14 = Formatter<int>; T15 = Formatter<std::basic_string<char> >; T16 = Formatter<int>; T17 = boost::detail::variant::void_; T18 = boost::detail::variant::void_; T19 = boost::detail::variant::void_]’
/home/lz/桌面/code/scheme/types/all.hpp:77:30:   required from ‘Formatter_type FMT(const T&) [with T = boost::variant<int, Wrapper<char>, Wrapper<bool>, int, int, int, int, ComplexType, int, int, int, int, std::basic_string<char>, int, int, std::basic_string<char>, LambdaType, int>; Formatter_type = boost::variant<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> >]’
/home/lz/桌面/code/scheme/cli.cpp:101:98:   required from here
/home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:1457:43: error: no matching function for call to ‘boost::variant<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> >::initializer::initialize(void* const&, const LambdaType&)’
             return initializer::initialize(storage_, operand);
                                           ^
In file included from /home/lz/桌面/code/scheme/sys/boost/variant/variant.hpp:33:0,
                 from /home/lz/桌面/code/scheme/sys/boost/variant.hpp:17,
                 from /home/lz/桌面/code/scheme/types/all.hpp:18,
                 from /home/lz/桌面/code/scheme/types.hpp:4,
                 from /home/lz/桌面/code/scheme/tokenizer.hpp:6,
                 from /home/lz/桌面/code/scheme/cli.cpp:2:
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<3> >, boost::mpl::l_iter<boost::mpl::list14<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<4> >, boost::mpl::l_iter<boost::mpl::list13<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<5> >, boost::mpl::l_iter<boost::mpl::list12<Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<6> >, boost::mpl::l_iter<boost::mpl::list11<Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<7> >, boost::mpl::l_iter<boost::mpl::list10<Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<8> >, boost::mpl::l_iter<boost::mpl::list9<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<9> >, boost::mpl::l_iter<boost::mpl::list8<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<10> >, boost::mpl::l_iter<boost::mpl::list7<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<11> >, boost::mpl::l_iter<boost::mpl::list6<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<12> >, boost::mpl::l_iter<boost::mpl::list5<Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<13> >, boost::mpl::l_iter<boost::mpl::list4<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<14> >, boost::mpl::l_iter<boost::mpl::list3<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<15> >, boost::mpl::l_iter<boost::mpl::list2<Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<16> >; Iterator = boost::mpl::l_iter<boost::mpl::list1<Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const Formatter<int>&]
             static int initialize(void* dest, param_T operand)
                        ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:104:24: note:   no known conversion for argument 2 from ‘const LambdaType’ to ‘boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<3> >, boost::mpl::l_iter<boost::mpl::list14<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<4> >, boost::mpl::l_iter<boost::mpl::list13<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<5> >, boost::mpl::l_iter<boost::mpl::list12<Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<6> >, boost::mpl::l_iter<boost::mpl::list11<Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<7> >, boost::mpl::l_iter<boost::mpl::list10<Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<8> >, boost::mpl::l_iter<boost::mpl::list9<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<9> >, boost::mpl::l_iter<boost::mpl::list8<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<10> >, boost::mpl::l_iter<boost::mpl::list7<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<11> >, boost::mpl::l_iter<boost::mpl::list6<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<12> >, boost::mpl::l_iter<boost::mpl::list5<Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<13> >, boost::mpl::l_iter<boost::mpl::list4<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<14> >, boost::mpl::l_iter<boost::mpl::list3<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<15> >, boost::mpl::l_iter<boost::mpl::list2<Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<16> >, boost::mpl::l_iter<boost::mpl::list1<Formatter<int> > > >::initializer_node::param_T {aka const Formatter<int>&}’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<3> >, boost::mpl::l_iter<boost::mpl::list14<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<4> >, boost::mpl::l_iter<boost::mpl::list13<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<5> >, boost::mpl::l_iter<boost::mpl::list12<Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<6> >, boost::mpl::l_iter<boost::mpl::list11<Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<7> >, boost::mpl::l_iter<boost::mpl::list10<Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<8> >, boost::mpl::l_iter<boost::mpl::list9<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<9> >, boost::mpl::l_iter<boost::mpl::list8<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<10> >, boost::mpl::l_iter<boost::mpl::list7<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<11> >, boost::mpl::l_iter<boost::mpl::list6<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<12> >, boost::mpl::l_iter<boost::mpl::list5<Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<13> >, boost::mpl::l_iter<boost::mpl::list4<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<14> >, boost::mpl::l_iter<boost::mpl::list3<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<15> >, boost::mpl::l_iter<boost::mpl::list2<Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<16> >; Iterator = boost::mpl::l_iter<boost::mpl::list1<Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = Formatter<int>&&]
             static int initialize(void* dest, param2_T operand)
                        ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note:   no known conversion for argument 2 from ‘const LambdaType’ to ‘boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<3> >, boost::mpl::l_iter<boost::mpl::list14<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<4> >, boost::mpl::l_iter<boost::mpl::list13<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<5> >, boost::mpl::l_iter<boost::mpl::list12<Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<6> >, boost::mpl::l_iter<boost::mpl::list11<Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<7> >, boost::mpl::l_iter<boost::mpl::list10<Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<8> >, boost::mpl::l_iter<boost::mpl::list9<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<9> >, boost::mpl::l_iter<boost::mpl::list8<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<10> >, boost::mpl::l_iter<boost::mpl::list7<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<11> >, boost::mpl::l_iter<boost::mpl::list6<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<12> >, boost::mpl::l_iter<boost::mpl::list5<Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<13> >, boost::mpl::l_iter<boost::mpl::list4<Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<14> >, boost::mpl::l_iter<boost::mpl::list3<Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<15> >, boost::mpl::l_iter<boost::mpl::list2<Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<16> >, boost::mpl::l_iter<boost::mpl::list1<Formatter<int> > > >::initializer_node::param2_T {aka Formatter<int>&&}’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >; Iterator = boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const Formatter<Wrapper<bool> >&]
             static int initialize(void* dest, param_T operand)
                        ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:104:24: note:   no known conversion for argument 2 from ‘const LambdaType’ to ‘boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node::param_T {aka const Formatter<Wrapper<bool> >&}’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >; Iterator = boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = Formatter<Wrapper<bool> >&&]
             static int initialize(void* dest, param2_T operand)
                        ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note:   no known conversion for argument 2 from ‘const LambdaType’ to ‘boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node::param2_T {aka Formatter<Wrapper<bool> >&&}’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:149:17: note: candidate: static void boost::detail::variant::initializer_root::initialize()
     static void initialize();
                 ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:149:17: note:   candidate expects 0 arguments, 2 provided
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = Formatter<Wrapper<char> >&&]
             static int initialize(void* dest, param2_T operand)
                        ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note:   no known conversion for argument 2 from ‘const LambdaType’ to ‘boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node::param2_T {aka Formatter<Wrapper<char> >&&}’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >; Iterator = boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const Formatter<Wrapper<char> >&]
             static int initialize(void* dest, param_T operand)
                        ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:104:24: note:   no known conversion for argument 2 from ‘const LambdaType’ to ‘boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node::param_T {aka const Formatter<Wrapper<char> >&}’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<3> >, boost::mpl::l_iter<boost::mpl::list14<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<4> >, boost::mpl::l_iter<boost::mpl::list13<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<5> >, boost::mpl::l_iter<boost::mpl::list12<Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<6> >, boost::mpl::l_iter<boost::mpl::list11<Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<7> >; Iterator = boost::mpl::l_iter<boost::mpl::list10<Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param2_T = Formatter<ComplexType>&&]
             static int initialize(void* dest, param2_T operand)
                        ^
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:115:24: note:   no known conversion for argument 2 from ‘const LambdaType’ to ‘boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<3> >, boost::mpl::l_iter<boost::mpl::list14<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<4> >, boost::mpl::l_iter<boost::mpl::list13<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<5> >, boost::mpl::l_iter<boost::mpl::list12<Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<6> >, boost::mpl::l_iter<boost::mpl::list11<Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<7> >, boost::mpl::l_iter<boost::mpl::list10<Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node::param2_T {aka Formatter<ComplexType>&&}’
/home/lz/桌面/code/scheme/sys/boost/variant/detail/initializer.hpp:104:24: note: candidate: static int boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::initialize(void*, boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T) [with BaseIndexPair = boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list17<Formatter<int>, Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list16<Formatter<Wrapper<char> >, Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<2> >, boost::mpl::l_iter<boost::mpl::list15<Formatter<Wrapper<bool> >, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<3> >, boost::mpl::l_iter<boost::mpl::list14<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<4> >, boost::mpl::l_iter<boost::mpl::list13<Formatter<int>, Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<5> >, boost::mpl::l_iter<boost::mpl::list12<Formatter<int>, Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<6> >, boost::mpl::l_iter<boost::mpl::list11<Formatter<int>, Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > > >::initializer_node, mpl_::int_<7> >; Iterator = boost::mpl::l_iter<boost::mpl::list10<Formatter<ComplexType>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int>, Formatter<int>, Formatter<std::basic_string<char> >, Formatter<int> > >; boost::detail::variant::make_initializer_node::apply<BaseIndexPair, Iterator>::initializer_node::param_T = const Formatter<ComplexType>&]
             static int initialize(void* dest, param_T operand)
                        ^

答案:
Formatter_type类是一个boost::variant< Formatter, Formatter , …>,FMT函数接受一个boost::variant<T1,T2,…>类型变量,生成一个Formatter_type对象。在Formatter_type中漏了一个LambdaType的参数,导致LambdaType无法专程Formatter

P1398 数学题3

Problem

http://acm.sjtu.edu.cn/OnlineJudge/problem/1398

题目描述

给定一个数字,他在十进制下从高位到低位一次是n0, n1, n2, n3,…
那么定义它的“差和”为n0-n1+n2-n3+…
如:十进制数字abcdefg,每个字母代表一个位,那么差和为a-b+c-d+e-f+g。

所以十进制数字1234567差和为1-2+3-4+5-6+7=4

现在给你们一个闭区间[m, n],请求出区间内差和为x的数字个数。

输入格式

输入只有一行,三个数字,m n x

30%: 0<= m <= n <=10^3, 50%: 0<= m <= n <=10^8, 100%: 0<= m <= n <=10^18

-100<= x <=100

输出格式

输出只有一个数字,表示区间内差和为x的数字的总和mod1000000007的结果。

Sample Input

100 111 1

Sample Output

211

Analysis

相当捉急的题目。

令F[i][first digit][j]
表示长度为i的数(包括010 这个3位数),第一位为first digit时,差和为j的个数

令g[i][first digit][j]
表示长度为i的数(包括010 这个3位数),第一位为first digit时,差和为j的数之和

之后可以利用简单dp推出f、g

主要难点在于如何把实际的一些数分拆出来。

简化,我们只考虑统计1~n之间满足条件数的和,之后利用减法就能得到区间结果。
(函数calc)这个是不包括有前导0的情况的。

比如说234。我们可以分拆成 0 + [00,99] , 100~199 , 2+[00,34]

如果知道[00,34]有k个数(如何求出这k个数见calcnum)满足我们对这个区间的需求,那么234在2+[00,34]内所有数之和就是[00,34]所有数之和 + 200 *k

然而,我们在去掉头一位时,不可避免地需要统计[00,99]区间内的情况,它是与calc函数不同的。因此我们使用了一个calc2函数来解决这个问题。

取余坑。

Code

    /* **********************************
     * 精简版头文件  修改自岛娘的头文件
     * By lz96@foxmail.com
     * 复制到你的代码头部即可使用
     * **********************************/
    #define T_ long long  //各种循环变量的类型,特殊情况可以改成long long
    #define fuck(s_) {cout<<s_<<endl;return 0;} //输出s_的内容并结束程序:fuck("NO");
    /*************************
     * 各种循环函数
     * re:3个参数:循环变量,起始值,终止值
     * rep: 2个参数:循环变量,终止值/初始值
     * 后缀2/3:二维、三维
     * 后缀0:有则初始值/终止值为0 否则为1
     * 前缀r:有则从大到小循环,否则从小到大循环
     * ***********************/
    #define printarr(a_,x_) rep(i_,x_)cout<<a_[i_]<<" ";cout<<endl; //输出一维数组 输出a[1] ~ a[5] printarr(a,5)
    #define printarr0(a_,x_) rep0(i_,x_)cout<<a_[i_]<<" ";cout<<endl; // 输出a[0] ~ a[4] printarr0(a,5)
    #define printarr2(a_,x_,y_) rep(i_,x_){rep(j_,y_)cout<<a_[i_][j_]<<' ';cout<<endl;} //输出二维数组
    #define printarr20(a_,x_,y_) rep0(i_,x_){rep0(j_,y_)cout<<a[i_][j_]<<' ';cout<<endl;} //输出二维数组,下标从0开始
    #define rep2o(a_,b_,n_) rep(a_,n_) re(b_,a_+1,n_) // for(T_ a_=1;a_<=n_;++a_) for(T_ b_=a_+1;b_<=n_;++b_)
    #define rep20o(a_,b_,n_) rep0(a_,n_) re0(b_,a_+1,n_) // for(T_ a_=0;a_<n_;++a_) for(T_ b_=a_+1;b_<n_;++b_)
    #define rep2(a_,b_,p_,q_) rep(a_,p_) rep(b_,q_)// for(T_ a_=1;a_<=n_;++a_) for(T_ b_=1;b_<=n_;++b_)
    #define rep20(a_,b_,p_,q_) rep0(a_,p_) rep0(b_,q_) // for(T_ a_=0;a_<n_;++a_) for(T_ b_=0;b_<n_;++b_)
    #define rrep2(a_,b_,p_,q_) rrep(a_,p_) rrep(b_,q_)
    #define rrep20(a_,b_,p_,q_) rrep0(a_,p_) rrep0(b_,q_)
    #define rep3(a_,b_,c_,p_,q_,r_) rep(a_,p_) rep(b_,q_) rep(c_,r_)
    #define rep30(a_,b_,c_,p_,q_,r_) rep0(a_,p_) rep0(b_,q_) rep0(c_,r_)
    #define rrep3(a_,b_,c_,p_,q_,r_) rrep(a_,p_) rrep(b_,q_) rrep(c_,r_)
    #define rrep30(a_,b_,c_,p_,q_,r_) rrep0(a_,p_) rrep0(b_,q_) rrep0(c_,r_)
    #define rep(a_,x_) re(a_,1,x_) //rep(i,5)   == for(T_ i=1;i<=5;++i)
    #define rep0(a_,x_) re0(a_,0,x_) //rep0(i,5)   == for(T_ i=0;i<5;++i)
    #define rrep(a_,x_) rre(a_,x_,1) //rrep(i,5)  ==  for(T_ i=5;i>=1;--i)
    #define rrep0(a_,x_) rre(a_,x_-1,0) //rrep0(i,5)  ==  for(T_ i=4;i>=0;--i)
    #define re(a_,s_,t_) for(T_ a_=s_;a_<=t_;++a_) // re(i,2,4)  ==   for(T_ i=2;i<=4;++i)
    #define re0(a_,s_,t_) for(T_ a_=s_;a_<t_;++a_) // re0(i,2,4)  ==   for(T_ i=2;i<4;++i)
    #define rre(a_,s_,t_) for(T_ a_=s_;a_>=t_;--a_)
    #define rre0(a_,s_,t_) for(T_ a_=s_;a_>t_;--a_)
    #define repit(a_,c_) for(__typeof__(a_.begin()) c_=a_.begin();c_!=a_.end();++c_) // 只在GCC上可用:repit(容器,迭代器)
    #define nosync std::ios::sync_with_stdio(false);std::cin.tie(0);ios_base::sync_with_stdio(0) //加在main的第一行,加快输入输出,但之后不能用scanf/printf
    #define DE false //是否在调试模式?
    #define de(s_) if(DE){s_ } //  de(仅仅想在调试时执行的语句)     de(cout<<n<<m<<endl;)
    #include <iostream>
    #include <cstdio>
    #include <cstdlib>
    #include <cstring>
    #include <string>
    #include <cmath>
    #include <algorithm>
    #include <map>
    #include <vector>
    #include <deque>
    #include <list>
    #include <set>
    #include <numeric>
    #include <bitset>
    #include <fstream>
    #include <iomanip>
    #include <sstream>
    #include <ctime>
    #include <stack>
    #include <queue>
    #pragma GCC optimize("O2")
    using namespace std;
    #define endl '\n'
    const int dx4[] = {-1, 0, 1, 0};
    const int dy4[] = {0, 1, 0, -1};  //十字方向的所有坐标 (basex+dx4[i] , basey+dy4[i])
    const long long modb=1000000007;  //取模的数  ModBase
    const long inf=0x3f3f3f3f;      //很大的整数
    const double oo=1e15;           //很大的实数
    const double eps=1e-8;          //很小的实数,计算几何用
    const double pi=acos(-1.0);     //pi
    template<typename T> void clr(T* a_,int n_=0,size_t s_=-1) {if (s_==-1) s_=sizeof(a_); memset(a_,n_,sizeof(a_[0])*s_); }  // clr(a):将a清空为0     clr(a,0xff)将a每个字节清成0xff      clr(a,0xff,4) 将a[0]~a[3]的每一个字节填成0xff
    template<typename T> T sqr(T a_) { return a_*a_; }  //平方
    template<typename T> T cub(T a_) { return a_*a_*a_; }  //立方
    inline T_ mf(T_ n_) {return ((n_<0)?n_+(modb<<2):n_)%modb; }  //mf(n) = n%modb,加上了负数判断,ModFunction
    template<typename T>T max(T a_,T b_,T c_) { return max(a_,max(b_,c_)); } //三个参数的max
    template<typename T>T min(T a_,T b_,T c_) { return min(a_,min(b_,c_)); } //三个参数的min
    inline int dbcmp(double a_, double b_) { return (fabs(a_-b_)<eps)?0:(a_<b_?-1:1); } //允许误差的cmp,< : -1    == : 0    > : 1
    inline double dbdiv(T_ a_, T_ b_) { return static_cast<double>(a_) / b_; } //实数除 dbdiv(3,5)=0.6
    inline double angle(double x_, double y_) { if (x_==0.0) return y_>0?pi/2:3*pi/2; else { double t_=atan2(y_,x_); return (t_<0.0?t_+pi:t_) + y_<0?pi:0.0; }} //计算(x_,y_)的幅角 [0,2*pi)
    /******************************************************************************************/
    long long f[20][11][202], g[20][11][202];

    long long m,n,x;

    long long l(long long d)
    {
        long long ans=0;
        while (d)
        {
            ++ans;
            d/=10;
        }
        return ans;
    }

    long long tenp(long long d)
    {
        long long ans=1;
        while (d--)
          ans *= 10;
        return ans;
    }

    long long calc2(long long len, long long nn, long long xx);
    long long calcnum(long long,long long nn, long long xx);
    long long calc(long long nn, long long xx)
    {
        //cout<<nn<<" "<<xx<<endl;
        //

        long long an =0;
        if (nn<10)
        {
         rep(i,nn)
         {
          an+= g[1][i][xx];
          an %= modb;
         }
         an %= modb;
         //cout<<"an="<<an<<endl;
         return an;
        }
        long long len = l(nn);
        long long first = nn / tenp(len-1);
        rep0(i, first)
        {
            //cout<<"len="<<len<<" i="<<i<<" xx="<<xx<<"  g=";
            //cout<<g[len][i][xx]<<endl;
            if (i>0)
            an += g[len][i][xx];
            else
            an += calc(tenp(len-1)-1,xx);
            an %= modb;
        }
        //cout<<" temp an="<<an<<endl;
        long long pre = xx-100;
        pre -= first;
        pre = -pre;
        pre += 100;
        long long t = tenp(len-1);
        //cout<<" nn="<<nn<<" t="<<t<<endl;
        long long w = nn%t;
        //cout<<" num="<<calcnum(len-1,w,pre)<<endl;
        an += mf(mf(calcnum(len-1,w,pre)*mf(t))*(first)) + mf(calc2(len-1, w,pre));
        //cout<<nn<<" "<<xx<<" "<<an<<" res"<<endl;
        an = mf(an);
        return an;
    }

    long long calcnum(long long len, long long nn, long long xx)
    {
        //cout<<"calcnum "<<len<<" "<<nn<<" "<<xx<<endl;
        //
        if (len<2)
        {
            long an=0;
            rep0(i,nn+1)
          an+= f[1][i][xx];
            an %= modb;
            return an;
        }
        long long an=0;
        long long first = nn / tenp(len-1);
        rep0(i, first)
        {
            if (i>0)
            an += f[len][i][xx];
            else
              an+= calcnum(len-1,tenp(len-1)-1,200-xx);
            an %= modb;
        }

        long long pre = xx-100;
        pre -= first;
        pre = -pre;
        pre += 100;
        long long t = tenp(len-1);
        long long w = nn%t;
        an += calcnum(len-1, w,pre);
        an %= modb;
        return an;

    }

    long long calc2(long long len, long long nn, long long xx)
    {
        //cout<<"calcnum "<<len<<" "<<nn<<" "<<xx<<endl;
        //
        if (len<2)

        {
            long an=0;
            rep0(i,nn+1)
            {
                an+= g[1][i][xx];
                an = mf(an);
            }
            an = mf(an);
            return an;
        }
        long long an=0;
        long long first = nn / tenp(len-1);
        rep0(i, first)
        {
            if (i>0)
              an += g[len][i][xx];
            else
              an+= calc2(len-1,tenp(len-1)-1,200-xx);
            an = mf(an);
        }

        long long pre = xx-100;
        pre -= first;
        pre = -pre;
        pre += 100;
        long long t = tenp(len-1);
        long long w = nn%t;
        an += mf(mf(first* tenp(len-1)) * mf(calcnum(len-1, w,pre)))+ mf(calc2(len-1,w,pre));
        an = mf(an);
        return an;

    }

    int main()
    {
        cin>>m>>n>>x;
        re(i,0,10)
        {
            f[1][i][i+100] += 1;
            g[1][i][i+100] += i;
        }
        re(l, 2, 18)
            rep0(i,10)
            rep0(j,201)
            {
                long long old = -((j-100)-i) + 100;
                rep0(k,10)
                {
                    g[l][i][j] += mf(mf(f[l-1][k][old] * mf((long long)(tenp(l-1)))) * i + g[l-1][k][old])  ;
                    f[l][i][j] += f[l-1][k][old];
                    f[l][i][j] = mf(f[l][i][j]);

                    g[l][i][j] = mf(g[l][i][j]);

                }
                //cout<<l<<" "<<i<<" "<<j<< " "<<f[l][i][j]<<endl;
            }
        //cout<<calc(111,x+100)<<endl;
        //cout<<calc(100,x+100)<<endl;
        //cout<<calc(99,x+100)<<endl;
        //cout<<g[2][1][1+100]<<endl;
        //cout<<g[2][2][100+1]<<endl;
        //cout<<g[2][3][1+100]<<endl;
        //cout<<"xxx"<<endl;
        //cout<<g[3][0][99]<<endl;
        //cout<<g[2][0][101]<<endl;
        //cout<<g[1][0][99]<<endl;
        //cout<<calc(99,x+100)<<endl;
        //cout<<"Xxx - ---------------------------"<<endl;
        //cout<<calc(n,x+100)<<endl;
        //cout<<"XXX ----------------------------------"<<endl;
        cout<< mf(calc(n,x+100) - calc(m-1,x+100)) <<endl;

    }

P1229 mine

Problem

http://acm.sjtu.edu.cn/OnlineJudge/problem/1229 Mine

Description

扫雷是一个很经典的小游戏,而一行数字一行雷的题目就更经典了。当然,这道题不能这么简单就算了。

问题是这样,有一个两行n列的格子,第一行里不会有雷,第二行里不会有数字。给定第一行的某些数字,数字代表该格子正下方与左右两个斜下方共三个格子里雷数目的总和。问下一行最多有多少个雷,并给出一个让雷尽可能靠后的方案(最后一个雷尽可能靠后,如果相同,倒数第二个雷尽可能靠后,以此类推)。保证一定存在一种合法的地雷安放方案。

Input Format

第一行一个整数n,表示格子的列数

第二行为一个长度为n的字符串,由‘0’、‘1’、‘2’、‘3’以及‘’组成。表示第一行的数字,‘’表示该格数字未定,保证不含其他字符(行末回车符除外)

Output Format

第一行为一个整数,表示最多的地雷数目

第二行为一个长度为n的字符串,由‘0’和‘1’组成,‘0’代表安全,‘1’代表有地雷。表示所要求的安放方案

Sample Input

2
1*

Sample Output

1
01

数据规模

10%数据 :1<=n<=10 40%数据 :1<=n<=100000,输入中不出现‘*’号 100%数据:1<=n<=100000

Analysis

dp一遍过。。。

用f[i][pre][now]表示前i位串,倒数第二位状态是pre,本位状态是now的最多地雷数。

f[i][pre][now] = 
max{ 
f[i-1][0][pre]+now    (if 0+pre+now == a[i-1] or a[i-1]=='*'),
f[i-1][1][pre]+now    (if 1+pre+now == a[i-1] or a[i-1]=='*')
}

初始

f[1][0][0]=0
f[1][0][1]=1

最后检验所有满足pre+now == a[n]的f[n][pre][now],取最大的一组。

注意,由于满足最右端最大,转移方程中应优先选择第二种情况,最后时候应优先选择01而不是10。

为了记录状态,开一个b[i][pre][now],表示在[i][pre][now]的情况下,f取得最大值时,i-2位应该取什么,这样在最后就能反向遍历了。

Code


/* **********************************
 * 精简版头文件  修改自岛娘的头文件
 * By lz96@foxmail.com
 * 复制到你的代码头部即可使用
 * **********************************/
#define T_ int  //各种循环变量的类型,特殊情况可以改成long long
#define fuck(s_) {cout<<s_<<endl;return 0;} //输出s_的内容并结束程序:fuck("NO");
/*************************
 * 各种循环函数
 * re:3个参数:循环变量,起始值,终止值
 * rep: 2个参数:循环变量,终止值/初始值
 * 后缀2/3:二维、三维
 * 后缀0:有则初始值/终止值为0 否则为1
 * 前缀r:有则从大到小循环,否则从小到大循环
 * ***********************/
#define printarr(a_,x_) rep(i_,x_)cout<<a_[i_]<<" ";cout<<endl; //输出一维数组 输出a[1] ~ a[5] printarr(a,5)
#define printarr0(a_,x_) rep0(i_,x_)cout<<a_[i_]<<" ";cout<<endl; // 输出a[0] ~ a[4] printarr0(a,5)
#define printarr2(a_,x_,y_) rep(i_,x_){rep(j_,y_)cout<<a_[i_][j_]<<' ';cout<<endl;} //输出二维数组
#define printarr20(a_,x_,y_) rep0(i_,x_){rep0(j_,y_)cout<<a[i_][j_]<<' ';cout<<endl;} //输出二维数组,下标从0开始
#define rep2o(a_,b_,n_) rep(a_,n_) re(b_,a_+1,n_) // for(T_ a_=1;a_<=n_;++a_) for(T_ b_=a_+1;b_<=n_;++b_)
#define rep20o(a_,b_,n_) rep0(a_,n_) re0(b_,a_+1,n_) // for(T_ a_=0;a_<n_;++a_) for(T_ b_=a_+1;b_<n_;++b_)
#define rep2(a_,b_,p_,q_) rep(a_,p_) rep(b_,q_)// for(T_ a_=1;a_<=n_;++a_) for(T_ b_=1;b_<=n_;++b_)
#define rep20(a_,b_,p_,q_) rep0(a_,p_) rep0(b_,q_) // for(T_ a_=0;a_<n_;++a_) for(T_ b_=0;b_<n_;++b_)
#define rrep2(a_,b_,p_,q_) rrep(a_,p_) rrep(b_,q_)
#define rrep20(a_,b_,p_,q_) rrep0(a_,p_) rrep0(b_,q_)
#define rep3(a_,b_,c_,p_,q_,r_) rep(a_,p_) rep(b_,q_) rep(c_,r_)
#define rep30(a_,b_,c_,p_,q_,r_) rep0(a_,p_) rep0(b_,q_) rep0(c_,r_)
#define rrep3(a_,b_,c_,p_,q_,r_) rrep(a_,p_) rrep(b_,q_) rrep(c_,r_)
#define rrep30(a_,b_,c_,p_,q_,r_) rrep0(a_,p_) rrep0(b_,q_) rrep0(c_,r_)
#define rep(a_,x_) re(a_,1,x_) //rep(i,5)   == for(T_ i=1;i<=5;++i)
#define rep0(a_,x_) re0(a_,0,x_) //rep0(i,5)   == for(T_ i=0;i<5;++i)
#define rrep(a_,x_) rre(a_,x_,1) //rrep(i,5)  ==  for(T_ i=5;i>=1;--i)
#define rrep0(a_,x_) rre(a_,x_-1,0) //rrep0(i,5)  ==  for(T_ i=4;i>=0;--i)
#define re(a_,s_,t_) for(T_ a_=s_;a_<=t_;++a_) // re(i,2,4)  ==   for(T_ i=2;i<=4;++i)
#define re0(a_,s_,t_) for(T_ a_=s_;a_<t_;++a_) // re0(i,2,4)  ==   for(T_ i=2;i<4;++i)
#define rre(a_,s_,t_) for(T_ a_=s_;a_>=t_;--a_)
#define rre0(a_,s_,t_) for(T_ a_=s_;a_>t_;--a_)
#define repit(a_,c_) for(__typeof__(a_.begin()) c_=a_.begin();c_!=a_.end();++c_) // 只在GCC上可用:repit(容器,迭代器)
#define nosync std::ios::sync_with_stdio(false);std::cin.tie(0);ios_base::sync_with_stdio(0) //加在main的第一行,加快输入输出,但之后不能用scanf/printf
#define DE false //是否在调试模式?
#define de(s_) if(DE){s_ } //  de(仅仅想在调试时执行的语句)     de(cout<<n<<m<<endl;)
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <numeric>
#include <bitset>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <ctime>
#include <stack>
#include <queue>
#pragma GCC optimize("O2")
using namespace std;
#define endl '
'
const int dx4[] = {-1, 0, 1, 0};
const int dy4[] = {0, 1, 0, -1};  //十字方向的所有坐标 (basex+dx4[i] , basey+dy4[i])
const long long modb=100000007;  //取模的数  ModBase
const long inf=0x3f3f3f3f;      //很大的整数
const double oo=1e15;           //很大的实数
const double eps=1e-8;          //很小的实数,计算几何用
const double pi=acos(-1.0);     //pi
template<typename T> void clr(T* a_,int n_=0,size_t s_=-1) {if (s_==-1) s_=sizeof(a_); memset(a_,n_,sizeof(a_[0])*s_); }  // clr(a):将a清空为0     clr(a,0xff)将a每个字节清成0xff      clr(a,0xff,4) 将a[0]~a[3]的每一个字节填成0xff
template<typename T> T sqr(T a_) { return a_*a_; }  //平方
template<typename T> T cub(T a_) { return a_*a_*a_; }  //立方
inline T_ mf(T_ n_) {return ((n_<0)?n_+(modb<<3):n_)%modb; }  //mf(n) = n%modb,加上了负数判断,ModFunction
template<typename T>T max(T a_,T b_,T c_) { return max(a_,max(b_,c_)); } //三个参数的max
template<typename T>T min(T a_,T b_,T c_) { return min(a_,min(b_,c_)); } //三个参数的min
inline int dbcmp(double a_, double b_) { return (fabs(a_-b_)<eps)?0:(a_<b_?-1:1); } //允许误差的cmp,< : -1    == : 0    > : 1
inline double dbdiv(T_ a_, T_ b_) { return static_cast<double>(a_) / b_; } //实数除 dbdiv(3,5)=0.6
inline double angle(double x_, double y_) { if (x_==0.0) return y_>0?pi/2:3*pi/2; else { double t_=atan2(y_,x_); return (t_<0.0?t_+pi:t_) + y_<0?pi:0.0; }} //计算(x_,y_)的幅角 [0,2*pi)
/******************************************************************************************/
char a[100006];
bool b[100006][2][2];
int f[100006][2][2];
int n;
int main()
{
    nosync;
    cin>>n;
    rep(i,n)
        cin>>a[i];
    a[0]='*';
    a[n+1]='*';
    memset(f,0x9f,sizeof(f));
    f[1][0][1]=1;
    f[1][0][0]=0;
    re(i,2,n)
        rep0(pre,2)
        rep0(now,2)
        rep0(prepre,2)
        {
            if (a[i-1]=='*' || ((a[i-1]-'0') == pre+now+prepre))
              if (f[i-1][prepre][pre] +now >= f[i][pre][now])
              {
                  b[i][pre][now]=prepre;
                  f[i][pre][now] = f[i-1][prepre][pre] + now;
              }
        }
    stringstream s;
    int ans = -inf;
    rep0(now,2)
        rep0(pre,2) // 00 10 01 11
        if (a[n]=='*' || a[n]-'0' == now+pre)
        {
            if (f[n][pre][now]>=ans)
            {
                ans = f[n][pre][now];
                s.str("");
                s<<now<<pre;
                int p=b[n][pre][now], q=pre, step=n-1;
                while (step>1)
                {
                    s<<p;
                    int oldq=q;
                    q=p;
                    p=b[step][p][oldq];
                    step--;
                }
            }
        }
    cout<<ans<<endl;
    string w=s.str();
    rrep0(i, w.size())
        cout<<w[i];
}