摘要:
Part 1.图论 1.分层图最短路 P6100 [USACO19FEB] Painting the Barn G #include<bits/stdc++.h> using namespace std; const int N=1e5+5,M=205,K=1e5+5; int n,m=200,k, 阅读全文
摘要:
#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 个城市能作为终点 阅读全文