随笔分类 - 

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要:简单四维dp。 #include<bits/stdc++.h> using namespace std; int a[355],b,t[5],dp[45][45][45][45]; int main(){ ios::sync_with_stdio(0); cin.tie(NULL); cout.ti 阅读全文
posted @ 2024-10-11 19:13 yzc_is_SadBee 阅读(8) 评论(0) 推荐(0)
摘要:补交。 #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 阅读(12) 评论(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 阅读(10) 评论(0) 推荐(0)
摘要:没切 这题恶心的点死多…… 首先,你这数据不能一次性让我把bug改完吗?浪费lg评测资源,该罚 然后 进入正题 我踩的坑 两种机用同一个编号 中间会爆int,要在过程中就判掉 开头可能出现.这种毒瘤玩楞 然后比2023 csp-j T3 好写多了 #include<bits/stdc++.h> us 阅读全文
posted @ 2024-10-09 19:40 yzc_is_SadBee 阅读(9) 评论(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 阅读(7) 评论(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 阅读(15) 评论(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 阅读(8) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页