上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int MAXN = 400; const int INF = 1e9; //代表绝对安全 //存储被流星砸中的最早时间 int grid[MAXN][MAXN]; //既存储步数又起 阅读全文
posted @ 2026-01-11 00:14 AnoSky 阅读(6) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef pair<int,int> PII; const int MAXN=1005; int n,m; char g[MAXN][MAXN]; int ans[MAXN][MAXN]; 阅读全文
posted @ 2026-01-10 23:21 AnoSky 阅读(32) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <iostream> #include <queue> #include <vector> using namespace std; const int MAXN = 105; int N, M; char grid[MAXN][MAXN]; // 存地图 bool 阅读全文
posted @ 2026-01-10 16:11 AnoSky 阅读(47) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=100005; int dist[N]; int t; int x,y; int bfs(int start, int target) { if(start>=target 阅读全文
posted @ 2026-01-10 15:27 AnoSky 阅读(11) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int MAXN = 205; // 题目说 N <= 200,稍微开大一点 int N, A, B; // 表示N层楼,起点和终点A和B int K[MAXN]; // K[i] 表 阅读全文
posted @ 2026-01-10 14:46 AnoSky 阅读(19) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int MAXN = 405; int ans[MAXN][MAXN]; // 存储结果,同时也充当 visited 数组 int n, m, sx, sy; // 马的8个方向 in 阅读全文
posted @ 2026-01-09 01:02 AnoSky 阅读(17) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <iostream> #include <algorithm> #include <vector> using namespace std; // 全局变量定义 int m = 0; // 碎片数量 int a[70]; // 存放碎片的数组 bool vis[70] 阅读全文
posted @ 2026-01-08 17:41 AnoSky 阅读(10) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int n; string words[25]; int g[25][25]; //记录每 阅读全文
posted @ 2026-01-08 16:12 AnoSky 阅读(5) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <bits/stdc++.h> using namespace std; int a[10][10]; // 存数独地图 bool row[10][10], col[10][10], block[3][3][10]; // 三个记账本,标记题目要求的三个状态 // 打 阅读全文
posted @ 2026-01-07 00:35 AnoSky 阅读(4) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <bits/stdc++.h> using namespace std; int n; double x[20], y[20];//记录多组坐标 double w[20][20]; // 【优化1】预处理距离矩阵 double ans = 1e9; bool vis[ 阅读全文
posted @ 2026-01-06 16:41 AnoSky 阅读(8) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页