摘要: dp 然而我们可以使用前缀和+暴搜,而且更好理解,同时复杂度约O(n2),能过 #include<bits/stdc++.h> using namespace std; int n,m,a[2505][2505],x[2505][2505],y[2505][2505],z[2505][2505],a 阅读全文
posted @ 2024-10-08 20:12 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 赞美斯特勒(stl)。 #include <bits/stdc++.h> #define int long long using namespace std; priority_queue<int,vector<int>,greater<int> >q; signed main() { int n, 阅读全文
posted @ 2024-10-08 19:43 yzc_is_SadBee 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 终于想起来发博客了,呃呃呃呃呃呃 这题不难,但要看到 1≤L≤R<231和R−L≤106。 我们可以考虑先把<216的素数先筛出来,然后再把区间里的合数筛光。 然后……就没有然后了。 上代码: #include <bits/stdc++.h> #define int long long using 阅读全文
posted @ 2024-10-08 18:54 yzc_is_SadBee 阅读(3) 评论(0) 推荐(0) 编辑