返回顶部
摘要: https://www.acwing.com/problem/content/369/ 一定要小心缩点之后只剩下一个强连通分量(一个孤立点)的时候,本身就是强连通的了。 cpp include using namespace std; typedef long long ll; const int 阅读全文
posted @ 2019-09-27 21:23 Inko 阅读(173) 评论(0) 推荐(0) 编辑
摘要: ```cpp include using namespace std; define ll long long int a[40]; ll dp[40][40][40]; ll dfs(int pos, int s1, int s2, bool lead, bool limit) { if(pos 阅读全文
posted @ 2019-09-27 20:57 Inko 阅读(151) 评论(0) 推荐(0) 编辑
摘要: https://www.acwing.com/problem/content/description/331/ 貌似只能够从下往上反推,从上往下不知道走哪个方向好。每次找出这个平台A下落到哪个平台B,再从B的左右端点向上转移。 include using namespace std; typedef 阅读全文
posted @ 2019-09-27 20:16 Inko 阅读(254) 评论(0) 推荐(0) 编辑
摘要: https://www.acwing.com/problem/content/341/ 求ab之间的二进制表示0的数量大于等于1的数量的数的个数,注意特判0也是合法。 cpp include using namespace std; define ll long long int a[40]; ll 阅读全文
posted @ 2019-09-27 17:11 Inko 阅读(158) 评论(0) 推荐(0) 编辑