摘要: 标签(空格分隔): 数位DP 二分 "题目链接" 先算出答案1的个数,再二分查找 阅读全文
posted @ 2018-05-10 12:09 LJZ_C 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP "题目链接" 枚举作为枢纽的点,注意零的情况 cpp include include include using namespace std; typedef long long ll; ll read() { ll x=0,f=1;char ch=getchar(); 阅读全文
posted @ 2018-05-10 12:03 LJZ_C 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP "题目链接" 记录一下相邻位置的数字,前导零特殊处理 阅读全文
posted @ 2018-05-10 11:56 LJZ_C 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP "题目链接" 将ABCD拆成二进制位,则对于一个不等式,差大于2时一定成立,小于 2时一定不成立 cpp include include include using namespace std; typedef long long ll; ll read() { ll 阅读全文
posted @ 2018-05-10 11:52 LJZ_C 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP 背包DP 算出有i个幸运数字的方案,然后枚举上限做背包DP cpp include include include using namespace std; typedef long long ll; ll read() { ll x=0,f=1;char ch=get 阅读全文
posted @ 2018-05-10 11:48 LJZ_C 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP "题目链接" 开始递增后就不能递减了 cpp include include include using namespace std; typedef long long ll; ll read() { ll x=0,f=1;char ch=getchar(); whi 阅读全文
posted @ 2018-05-10 11:43 LJZ_C 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP "题目链接" 枚举第一位不为零的数 cpp include include include using namespace std; typedef long long ll; ll read() { ll x=0,f=1;char ch=getchar(); whil 阅读全文
posted @ 2018-05-10 11:39 LJZ_C 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP "题目链接" cpp include include include using namespace std; typedef long long ll; ll read() { ll x=0,f=1;char ch=getchar(); while(ch'9'){if 阅读全文
posted @ 2018-05-10 11:34 LJZ_C 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): 数位DP "題目链接" DP 显然每一位只有选一或选0的情况 cpp include include include using namespace std; typedef long long ll; ll read() { ll x=0,f=1;char ch=getchar 阅读全文
posted @ 2018-05-10 11:07 LJZ_C 阅读(83) 评论(0) 推荐(0) 编辑