#include #include #include using namespace std; using namespace atcoder; #include #include #include #include templateusing pbds=__gnu_pbds::tree,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>; templateusing pbds_map=__gnu_pbds::tree,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>; templateusing hash_map=__gnu_pbds::gp_hash_table; templateusing pqueue =__gnu_pbds::priority_queue,__gnu_pbds::rc_binomial_heap_tag>; using lint=long long; #define rep(i,n) for(int i=0;i>s; int n=s.size(); segtree seg(n+1); pbds st; vector>v(n+1); auto z=z_algorithm(s); for(int i=0;in)break; // cerr<