摘要: 原题地址 又学会了骂人的新词语。 代码实现如下: #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (register int i = (a); i <= (b); i++) const int maxn = 阅读全文
posted @ 2019-06-11 20:36 雲裏霧裏沙 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 单源最短路: 堆优化的Dijkstra: #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (register int i = (a); i <= (b); i++) const int inf = 0x3f 阅读全文
posted @ 2019-06-11 17:01 雲裏霧裏沙 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 原题地址 不了解数位DP的建议先看一下这位大佬的文章。 然后这道模板题应该就能直接看懂代码了。 从最低位开始: #include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, a, b) for ( 阅读全文
posted @ 2019-06-11 10:31 雲裏霧裏沙 阅读(156) 评论(0) 推荐(0) 编辑