随笔分类 - 题
摘要:简单四维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
阅读全文
摘要:补交。 #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
阅读全文
摘要: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)
阅读全文
摘要:没切 这题恶心的点死多…… 首先,你这数据不能一次性让我把bug改完吗?浪费lg评测资源,该罚 然后 进入正题 我踩的坑 两种机用同一个编号 中间会爆int,要在过程中就判掉 开头可能出现.这种毒瘤玩楞 然后比2023 csp-j T3 好写多了 #include<bits/stdc++.h> us
阅读全文
摘要:交了锣鼓,但没交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
阅读全文
摘要: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
阅读全文
摘要:赞美斯特勒(stl)。 #include <bits/stdc++.h> #define int long long using namespace std; priority_queue<int,vector<int>,greater<int> >q; signed main() { int n,
阅读全文

浙公网安备 33010602011771号