摘要: HDU 3038 How Many Answers Are Wrong 带权并查集:路径压缩真巧妙 #include"stdio.h" #include"string.h" #include"math.h" #include<algorithm> #include<vector> using nam 阅读全文
posted @ 2021-03-27 11:52 JhengWei 阅读(35) 评论(0) 推荐(0) 编辑
摘要: POJ 2253 Frogger | POJ 1797 Heavy Transportation | POJ 3268 Silver Cow Party Dijkstra使用链式前向星实现的G=(V,E) https://malash.me/200910/linked-forward-star/#c 阅读全文
posted @ 2021-03-27 11:50 JhengWei 阅读(55) 评论(0) 推荐(0) 编辑
摘要: POJ 3660 Cow Contest Floyd-Washall const int MAX_N = 103; const int INF = 0x3fffffff; int N,M; int W[MAX_N][MAX_N]; int D[MAX_N][MAX_N]; int tmpD[MAX_ 阅读全文
posted @ 2021-03-27 11:49 JhengWei 阅读(49) 评论(0) 推荐(0) 编辑
摘要: POJ 1860 Currency Exchange | POJ 3259 Wormholes | LightOJ 1074 Extended Traffic SPFA (Bellman Ford) POJ 1860 Currency Exchange #include"stdio.h" #incl 阅读全文
posted @ 2021-03-27 11:48 JhengWei 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 参考https://zhuanlan.zhihu.com/p/77666245 快速打开配置文件文件夹所在位置 Preference - Browse Packages 代码模板片段snippets Tools - Developer - New Snippets 编译运行配置 build: Too 阅读全文
posted @ 2021-03-17 22:14 JhengWei 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 1426 ”但是由于数据等其他方面的原因,导致某些题目可以暴力的通过,所以,建议大家在比赛时也要勇于尝试,说不定就能过。“ 本题数据给的都是可直接用long long求解的。下面给出不钻空子的算法: #include"stdio.h" #include"limits.h" int mod_b[100 阅读全文
posted @ 2021-03-16 20:15 JhengWei 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 3279 非常规DFS/BFS:若不考虑约束条件搜索,算法复杂度指数级 #include<iostream> #include<algorithm> #include<queue> #include<vector> #include<string.h> #include"limits.h" usin 阅读全文
posted @ 2021-03-16 12:09 JhengWei 阅读(25) 评论(0) 推荐(0) 编辑
摘要: DFS #include<iostream> #include<algorithm> using namespace std; const int MAX_N=10; int n,k; int k_; char cb[MAX_N][MAX_N]; bool has[MAX_N]; int ans; 阅读全文
posted @ 2021-03-15 10:36 JhengWei 阅读(27) 评论(0) 推荐(0) 编辑
摘要: BFS(1) BFS(2):queue中状态结构体类型不止不止当前val BFS(3):多源BFS BFS(1) 2251 #include"stdio.h" #include"limits.h" #include"string.h" #include<queue> using namespace 阅读全文
posted @ 2021-03-15 10:31 JhengWei 阅读(51) 评论(0) 推荐(0) 编辑
摘要: Emacs教程 http://ergoemacs.org/emacs/emacs.html 补全 # Emacs ELPA源 # https://ipv4.mirrors.ustc.edu.cn/help/elpa.html M-x customize-variable [RET] package- 阅读全文
posted @ 2021-03-13 22:06 JhengWei 阅读(26) 评论(0) 推荐(0) 编辑