Ahuang1A

导航

2023年7月22日 #

7.22 Day 3

摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int n,m,ct,dir[4][2]={{0,1},{0,-1},{1,0},{-1,0}}; 5 char mp[101][101]; 6 bool vis[101][101]; 7 vo 阅读全文

posted @ 2023-07-22 21:51 黄奕钧 阅读(5) 评论(0) 推荐(0) 编辑

组合的输出 dfs

摘要: #include<bits/stdc++.h> using namespace std; int a[101]; int m,n; void s(int k){ int i; if(k>m){ for(i=1;i<=m;i++){ cout<<setw(3)<<a[i]; } cout<<endl; 阅读全文

posted @ 2023-07-22 15:31 黄奕钧 阅读(2) 评论(0) 推荐(0) 编辑

DP 动态规划 采药

摘要: #include<bits/stdc++.h> using namespace std; int t,m,w[105],v[105],f[105][1005]; int main() { cin>>t>>m; for(int i=1; i<=m; i++) cin>>w[i]>>v[i]; for( 阅读全文

posted @ 2023-07-22 10:01 黄奕钧 阅读(3) 评论(0) 推荐(0) 编辑

EG.9-2数字三角形 代码记录

摘要: #include<bits/stdc++.h> using namespace std; int a[1005][1005]; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=i;j++){ cin>>a[i][j]; 阅读全文

posted @ 2023-07-22 09:58 黄奕钧 阅读(5) 评论(0) 推荐(0) 编辑