的 要手动转
不要在一个 里调用另一个
链的判定是每个点度不超过 ,不是编号连续!!而且顶端也要找到度为 的点
莫队先 add 再 sub!
用 log2 别用 log
用 pair 不如定义一个带 first 和 second 两个元素的结构体
矩阵乘法看好顺序!!
判断部分分要完全符合性质 没写正解就别判部分分了!
构树要判连通性
极值给 ,别给
一定要在 LOCAL 和非 LOCAL 的环境里都编一下
void ks() //切任务管理器看内存
{
#ifdef LOCAL
int tt = 1;
while(tt--)tt++;
#endif
}console.log(_feInstance.currentData.user.introduction) 主页
fetch('/api/blog/detail/' + BlogGlobals.blogID).then(res => res.json()).then(res => console.log(res.data.Content)) 博客紫名 :color: rgb(157, 61, 207)
红名 :color: rgb(254, 76, 97)
金钩 :#ffc116
棕名 :color:var(—lfe-color—user-color-Cheater)
个人纪录
2022.8.4(七夕) 晚 AC300
2022.8.8 橙名
2022.8.29 红名
2023.9.13 复红
2023.9.18 咕值264
2023.12.18 咕值294
2023.12.18 22:03:37
2023.12.25 咕值320 首破300
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <cstdio>
using namespace std;
const int N = 1e5 + 5;
int n, m, a[N];
float x; //must
static char buf[1000000],*p1 = buf,*p2 = buf;
#define mgetchar() p1==p2&&(p2=(p1=buf)+fread(buf,1,1000000,stdin),p1==p2)?EOF:*p1++
inline int read()
{
int x = 0;
char a = mgetchar();
while (a < '0' || a > '9')
a = mgetchar();
while (a >= '0' && a <= '9')
x = (x << 1) + (x << 3) + (a ^ 48), a = mgetchar();
return x;
}
int main()
{
n = read();
m = read();
for (int i = 1; i <= n; i++)
a[i] = read();
while (m--)
{
int opt, l, r, ans = 0;
opt = read();
l = read();
r = read();
x = read();
if (opt == 1)
for ( int i = l; i <= r; i++)
a[i] -= (a[i] > x) ? x : 0;
else
{
for ( int i = l; i <= r; i++)
ans += !(a[i] - x);
printf("%d\n", ans);
}
}
return 0;
}

