摘要:
题目链接:Link Problem Solution 暴力枚举边数,用传递闭包判断当前状态即可。 Code #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<cassert> using n 阅读全文
摘要:
题目链接:Link Problem Solution 不难发现单个邮局管理的一定是连续的一段,且P=1的情况就是中位数,暴力dp即可。 Code #include<cstdio> #include<cstring> #include<algorithm> using namespace std; c 阅读全文
摘要:
题目链接:Link Problem Solution 不难想出分7次dp的做法,此时转换后的问题就成了一个单调栈裸题。。。 Code #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const i 阅读全文