11 2024 档案
摘要:#include<bits/stdc++.h> using namespace std; char G[105][105]; int vis[105][105]; //方向数组,上右下左 int dx[8] = {0,1,1,1,0,-1,-1,-1}; int dy[8] = {1,1,0,-1,
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int G[105][105],vis[105][105]; //方向数组,上右下左 int dx[5] = {-1,0,1,0},dy[5] = {0,1,0,-1}; int n,m,cnt=0; void
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int G[105][105],vis[105][105]; //方向数组,上右下左 int dx[8] = {0,1,1,1,0,-1,-1,-1},dy[8] = {1,1,0,-1,-1,-1,0,1};
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; char G[25][25]; int vis[25][25]; //方向数组,上右下左 int dx[5] = {-1,0,1,0},dy[5] = {0,1,0,-1}; int ans=0,n,m,nx,
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; //地图数组,标记数组 int G[105][105],vis[105][105]; //方向数组:上右下左 int dx[5]={-1,0,1,0},dy[5]={0,1,0,-1}; int n,cnt=0
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int G[105][105],vis[105][105]; //方向数组,上右下左 int dx[8] = {0,1,1,1,0,-1,-1,-1},dy[8] = {1,1,0,-1,-1,-1,0,1};
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int G[25][25],vis[25][25]; //方向数组,上右下左 int dx[5] = {-1,0,1,0},dy[5] = {0,1,0,-1}; bool f = false; int n,m
阅读全文
摘要:#include<iostream> using namespace std; //4个方向的数组:上 右 下 左 int dx[4]={-1,0,1,0} ,dy[4]={0,1,0,-1}; //创建地图数组 char G[105][105]; //标记数组,对应地图数组的每一个点,1代表被搜索
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; /* 二维数组:地图、标记数组 递归:搜索方法dfs(),通过一个坐标搜索四个方向 其他:二维数组中的上右下左方向数组 */ int G[15][15]; //地图 bool vis[15][15];//标记数
阅读全文
摘要:#include<bits/stdc++.h> #define ll long long using namespace std; int dp[1001][1001]; void init(int n, int m) { for (int i = 1; i <= n; i++) { for (in
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; const int N = 1e3+5; int a[N],dp[N]; int n,ans; int main() { cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; dp
阅读全文