/* #include void self::main(){ LL(N,X,Q);--X; dd ans=0; FO(Q){ LL(M); VL(M,a);--a; unordered_mapcnt; ll state=-1; fe(a,e){ if(e==X){ state=0; break; } if(cnt.contains(e)){ state=1; } cnt[e]++; } if(state==0)ans++; else if(state==1)ans+=0.5; } pp(ans); } */ #include using namespace std; namespace self{void main();void sub();templatevoid pp(const auto&...a);void epp(const auto&...a);} int main(){cin.tie(nullptr)->sync_with_stdio(0);cout<__VA_ARGS__;fe(refs(__VA_ARGS__),e)e.get().resizes(n);lin(__VA_ARGS__) #define VL(n,...) RDVL(ll,n,__VA_ARGS__) #define FO(n) for(ll IJK=n;IJK-->0;) #define fe(a,e,...) for(auto&&__VA_OPT__([)e __VA_OPT__(,__VA_ARGS__]):a) namespace self{ using dd=double; using ll=long long; constexpr auto refs(auto&...a){return array{ref(a)...};} void lin(auto&...a){(cin>>...>>a);} templateusing pack_back_t=tuple_element_t>; } namespace self{ templateistream&operator>>(istream&i,vector&v){fe(v,e)i>>e;return i;} templateconstexpr int depth=0; templatestruct core_t_helper{using type=T;}; templateusing core_t=core_t_helper::type; templatestruct vec; templatestruct hvec_helper{using type=vec::type>;}; templatestruct hvec_helper<0,T>{using type=T;}; templateusing hvec=hvec_helper::type; templatestruct vec:vector{ static constexpr int D=depth+1; using C=core_t; using vector::vector; void resizes(const auto&...a){if constexpr(sizeof...(a)==D)*this=make(a...,C{});else{ }} static auto make(ll n,const auto&...a){ if constexpr(sizeof...(a)==1)return vec(n,array{a...}[0]); else { } } vec&operator--(){fe(*this,e)--e;return*this;} }; templaterequires(sizeof...(A)>=2)vec(const A&...a)->vec>>; } templatevoid self::pp(const auto&...a){const char*c="";((o<cnt; ll state=-1; fe(a,e){ if(e==X){ state=0; break; } if(cnt.contains(e)){ state=1; } cnt[e]++; } if(state==0)ans++; else if(state==1)ans+=0.5; } pp(ans); }