随笔分类 -  1-4-动态规划-状压DP

摘要:看到20的数据量很容易想到状压dp。 开1<<20大小的数组来记录状态,枚举n个糖包,将其放入不同状态中(类似01背包思想) 时间复杂度O(n*(2^20))。 阅读全文
posted @ 2019-04-05 02:16 yzm10 阅读(2255) 评论(0) 推荐(0)
摘要:Balanced Numbers Balanced numbers have been used by mathematicians for centuries. A positive integer is considered a balanced number if: 1) Every even 阅读全文
posted @ 2019-01-28 03:00 yzm10 阅读(172) 评论(0) 推荐(0)
摘要:Campus Design Campus Design Nanjing University of Science and Technology is celebrating its 60th anniversary. In order to make room for student activi 阅读全文
posted @ 2018-09-21 17:21 yzm10 阅读(232) 评论(0) 推荐(0)
摘要:Travelling After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists o 阅读全文
posted @ 2018-09-11 17:00 yzm10 阅读(173) 评论(0) 推荐(0)
摘要:Travel PP loves travel. Her dream is to travel around country A which consists of N cities and M roads connecting them. PP has measured the money each 阅读全文
posted @ 2018-09-08 20:30 yzm10 阅读(195) 评论(0) 推荐(0)
摘要:AC Challenge 30.04% 1000ms 128536K Dlsj is competing in a contest with n (0 < n \le 20)n(0<n≤20) problems. And he knows the answer of all of these pro 阅读全文
posted @ 2018-09-01 18:32 yzm10 阅读(802) 评论(0) 推荐(0)
摘要:来自xjy的签到题 来自xjy的签到题 来自xjy的签到题 Description 爱丽丝冒险来到了红皇后一个n*n大小的花园,每个格子由'.'或'#'表示,'.'表示爱丽丝可以到达这个格子,‘#’表示爱丽丝不能到达这个格子,爱丽丝每1分钟可以移动到非'#'的相邻格子(与当前所在格子具有公共边)。花 阅读全文
posted @ 2018-08-31 21:37 yzm10 阅读(217) 评论(0) 推荐(0)
摘要:D. The Wu time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. The Wu time limit per test 阅读全文
posted @ 2018-08-09 19:57 yzm10 阅读(345) 评论(0) 推荐(0)
摘要:调查问卷 Accepts: 1289 Submissions: 5642 Time Limit: 6500/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) 调查问卷 Accepts: 1289 Submissions 阅读全文
posted @ 2018-08-05 17:31 yzm10 阅读(671) 评论(1) 推荐(1)
摘要:PACM Team 链接:https://www.nowcoder.com/acm/contest/141/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 阅读全文
posted @ 2018-07-26 20:35 yzm10 阅读(395) 评论(0) 推荐(0)
摘要:Simple String Problem Recently, you have found your interest in string theory. Here is an interesting question about strings. You are given a string S 阅读全文
posted @ 2018-04-15 19:42 yzm10 阅读(332) 评论(0) 推荐(0)