{"raw_statement":[{"iden":"background","content":"智利在修机场。  "},{"iden":"statement","content":"有 $n$ 个城市排成一列，最开始是互不连通的。  \n每个城市初始都没有人口。  \n会出现以下操作 / 查询共 $m$ 个：  \n\n1. `1 x y` 开通城市 $x$ 和城市 $y$ 之间的双向航班。  \n2. `2 l r a` 城市 $[l, r]$ 的人口数都 $+a$。  \n3. `3 x` **如果**所有能够到达城市 $x$ 的人都来到城市 $x$，城市 $x$ 有多少人。  "},{"iden":"input","content":"第一行两个数 $n, m$。  \n接下来 $m$ 行，每行一个操作。  "},{"iden":"output","content":"对于所有的操作 $3$ ，输出答案。  "},{"iden":"note","content":"**本题捆绑测试。**  \n- Easy（5pts）：$1 \\le n, m \\le 2 \\times 10^5$，且不存在操作 $1$。  \n- Normal（10pts）：$1 \\le n, m \\le 1000$。  \n- Hard（20pts）：$1 \\le n, m \\le 10^5$，且操作 $3$ 之后不存在操作 $2$。  \n- Lunatic（30pts）：$1 \\le n, m \\le 5 \\times 10^4$。 \n- Overdrive（35pts）：$1 \\le n, m \\le 2 \\times 10^5$。  \n\n对于 $100\\%$ 的数据，$1\\le n,m\\le 2\\times 10^5$，$0 \\le a \\le 10^9$。保证答案在 64 位有符号整形表示的范围内。\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/dgqoqa8d.png)  \n出于某些原因，给了较多的部分分。  "}],"translated_statement":null,"sample_group":[["5 5\n1 2 4\n2 3 5 2\n3 2\n1 2 5\n3 2","2\n4"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}