上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 补交。 #include<iostream> #include<cstdio> using namespace std; int g[105],f[105],a[105],s[105]; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a 阅读全文
posted @ 2024-10-11 18:29 yzc_is_SadBee 阅读(13) 评论(0) 推荐(0)
摘要: 4维dp(因为n<=10) 就是二维dp+判断是否重复取 #include<bits/stdc++.h> using namespace std; int dp[15][15][15][15],a[15][15],x,y,z; int main() { ios::sync_with_stdio(0) 阅读全文
posted @ 2024-10-09 20:16 yzc_is_SadBee 阅读(11) 评论(0) 推荐(0)
摘要: 没切 这题恶心的点死多…… 首先,你这数据不能一次性让我把bug改完吗?浪费lg评测资源,该罚 然后 进入正题 我踩的坑 两种机用同一个编号 中间会爆int,要在过程中就判掉 开头可能出现.这种毒瘤玩楞 然后比2023 csp-j T3 好写多了 #include<bits/stdc++.h> us 阅读全文
posted @ 2024-10-09 19:40 yzc_is_SadBee 阅读(10) 评论(0) 推荐(0)
摘要: 交了锣鼓,但没交vjudge。 补交一下。 #include <iostream> using namespace std; void solve2(int n, int &y, int &m, int &d, bool flag) { static int todate[366][2]={{0,0 阅读全文
posted @ 2024-10-09 18:38 yzc_is_SadBee 阅读(9) 评论(0) 推荐(0)
摘要: 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 阅读(16) 评论(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 阅读(9) 评论(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 阅读(11) 评论(0) 推荐(0)
摘要: 又忘发博客了啊啊啊啊啊啊啊 马的遍历竟然现在才写…… 模板bfs。 #include<bits/stdc++.h> using namespace std; queue<int> _x,_y; int ma[405][405],dx,dy; int qx[8]={1,1,2,2,-1,-1,-2,- 阅读全文
posted @ 2024-10-07 20:03 yzc_is_SadBee 阅读(14) 评论(0) 推荐(0)
摘要: 还好有题解,公式不用自己推了 #include<bits/stdc++.h> using namespace std; const int _G=3,mod=1004535809,Maxn=135000,MaxNum=10000500; long long powM(long long a,int 阅读全文
posted @ 2024-10-02 20:47 yzc_is_SadBee 阅读(13) 评论(1) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int n,m,t,p,b[310000],tr[310000],d[310000],e[310000],g[310000],kk; char ch[100]; struct sth { int x,y,z,w 阅读全文
posted @ 2024-10-02 19:47 yzc_is_SadBee 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页