摘要: 题目链接:http://codeforces.com/contest/1157/problem/C2 当左右两边数字相同时,需要判断一下取哪边能得到更长的递增序列 #include <iostream> #include <cstring> #include <algorithm> #include 阅读全文
posted @ 2019-06-01 16:17 html_11 阅读(119) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=6026 拓扑排序判断环是否存在,DFS搜1~n大于/小于i的元素数量 #include <iostream> #include <cstdio> #include <al 阅读全文
posted @ 2019-06-01 11:24 html_11 阅读(182) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4110 两个字符串不相同时的情况比较简单: 只需要分别找到两个字符串左右两边第一个不相同字符的下标,然后开始对称匹配两个字符串,判断出是否有可能翻转一次使得s1->s 阅读全文
posted @ 2019-06-01 11:22 html_11 阅读(104) 评论(0) 推荐(0)
摘要: 题目链接:http://codeforces.com/contest/1165/problem/F2 题意:n种物品需要购买,每种物品需要购买a[i]件,每件物品价格为2bourle,有m次优惠活动(di,ti):第di天物品ti价值优惠为1bourle 每天可以得到1bourle,求买完所有物品的 阅读全文
posted @ 2019-06-01 11:14 html_11 阅读(137) 评论(0) 推荐(0)