#define PROBLEM "https://judge.yosupo.jp/problem/vertex_set_path_composite"
#include<bits/stdc++.h>#include"library/algebra/group/Affine.hpp"
#include"library/mod/Modint.hpp"
#include"library/tree/Tree.hpp"
#include"library/tree/TreeMonoid.hpp"usingmint=Mint<longlong>;intmain(){std::ios::sync_with_stdio(false);std::cin.tie(nullptr);usingG=AlgebraReverse<GroupAffine<mint>>;usingF=G::value_type;intn,q;std::cin>>n>>q;std::vector<F>f(n);for(inti=0;i<n;i++)std::cin>>f[i];Treet(n);t.scan(0);TreeMonoid<Tree,G>TM(t,f);while(q--){intc;std::cin>>c;if(c){intu,v,x;std::cin>>u>>v>>x;Fg=TM.path_prod(u,v);std::cout<<g(x)<<std::endl;}else{intp;std::cin>>p;Ff;std::cin>>f;TM.set(p,f);}}}
Traceback(mostrecentcalllast):File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/documentation/build.py",line71,in_render_source_code_statbundled_code=language.bundle(stat.path,basedir=basedir,options={'include_paths':[basedir]}).decode()~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/languages/cplusplus.py",line187,inbundlebundler.update(path)~~~~~~~~~~~~~~^^^^^^File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py",line401,inupdateself.update(self._resolve(pathlib.Path(included),included_from=path))~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py",line401,inupdateself.update(self._resolve(pathlib.Path(included),included_from=path))~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py",line312,inupdateraiseBundleErrorAt(path,i+1,"#pragma once found in a non-first line")onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt:library/segtree/SegmentTree.hpp:line3:#pragmaoncefoundinanon-firstline