07 2023 档案
摘要://注意边界判断,调了好久#include <iostream> #include <queue> using namespace std; #define check(x,y)(x<wx&&x>=0&&y<hy&&y>=0) struct node { int x, y; }; char room
阅读全文
摘要:#include <iostream> #include <string> #include <queue> #include <stack> using namespace std; int t, n, m; int main() { cin >> t; while (t--) { queue<i
阅读全文
摘要:朴素的约瑟夫问题,用vector处理即可 #include <iostream> #include <vector> using namespace std; //AHOI1999 圆桌问题 类似于约瑟夫问题 vector<int>table; int n, m; int main() { whil
阅读全文
摘要:UVA10702 Travelling Salesman 题解 题面: 有个旅行的商人,他每到一个的新城市,便卖掉所有东西再购买新东西,从而获得利润。从某城市 A 到某城市 B 有固定利润(B 到 A 的利润可能不同)。已知城市可以重复到达,从 S 点出发,经过 T 个城市,有 E 个城市能作为终点
阅读全文