上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: "贪心 牛客wannafly挑战赛7F" 链接: https://ac.nowcoder.com/acm/contest/56/F 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描 阅读全文
posted @ 2019-08-11 13:53 谁知道你啊啊啊 阅读(322) 评论(0) 推荐(0) 编辑
摘要: "状压dp P2704" 题目描述 司令部的将军们打算在N M的网格地图上部署他们的炮兵部队。一个N M的地图由N行M列组成,地图的每一格可能是山地(用“H” 表示),也可能是平原(用“P”表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的 阅读全文
posted @ 2019-08-02 18:59 谁知道你啊啊啊 阅读(133) 评论(0) 推荐(0) 编辑
摘要: "状压dp 洛谷P2622" 题目描述 现有n盏灯,以及m个按钮。每个按钮可以同时控制这n盏灯——按下了第i个按钮,对于所有的灯都有一个效果。按下i按钮对于第j盏灯,是下面3中效果之一:如果a[i][j]为1,那么当这盏灯开了的时候,把它关上,否则不管;如果为 1的话,如果这盏灯是关的,那么把它打开 阅读全文
posted @ 2019-07-30 11:23 谁知道你啊啊啊 阅读(88) 评论(0) 推荐(0) 编辑
摘要: "动态规划 牛客多校number" 题意:计算字符串中能被300整除的子串个数 思路:能被3整除的数,各位和能被3整除。算包含‘00’前一位数的前缀%3的个数,就是除0外能被300整除的个数 c++ LL a[5]; int main() { string s;cin s; int len = s. 阅读全文
posted @ 2019-07-28 12:56 谁知道你啊啊啊 阅读(159) 评论(0) 推荐(0) 编辑
摘要: hdu 1248 水题额 c++ int dp[N], v[] = {150, 200, 350}; void Init() { for(int i = 1;i = v[j]) dp[i] = max(dp[i], dp[i v[j]]+v[j]); } int main() { Init(); i 阅读全文
posted @ 2019-05-25 21:49 谁知道你啊啊啊 阅读(262) 评论(0) 推荐(0) 编辑
摘要: hdu1203 思路:计算一个offer都没有的概率,容斥一下 hdu 2602 经典01背包 c++ include include include include include include include include include include include include in 阅读全文
posted @ 2019-05-23 23:05 谁知道你啊啊啊 阅读(265) 评论(0) 推荐(0) 编辑
摘要: "莫比乌斯反演模板 Gym 101982B" 题意 给你a,b,c,d四个数,求[a,b]与[c,d],互质的数的对数 代码 c++ include include include include include include include include include include inc 阅读全文
posted @ 2019-05-23 22:04 谁知道你啊啊啊 阅读(182) 评论(0) 推荐(0) 编辑
摘要: "二维树状数组 hdu1892" 题意 二维书架上原本有1本书 T组样例,四种操作,search,add,del,move 书架上的书小于del的值时,取完该格子的书即可 查询操作用二维的容斥推 由于格子取值可以等于0,故下标都+1 阅读全文
posted @ 2019-05-13 21:22 谁知道你啊啊啊 阅读(175) 评论(0) 推荐(0) 编辑
摘要: "思维题 CF1119D" D. Frets On Fire time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input output standard output Miyako 阅读全文
posted @ 2019-05-11 11:05 谁知道你啊啊啊 阅读(222) 评论(0) 推荐(0) 编辑
摘要: "牛客练习赛37 C 筱玛的迷阵探险" "参考博客" 链接: https://ac.nowcoder.com/acm/contest/342/C 来源:牛客网 题目描述 筱玛是个快乐的男孩子。 寒假终于到了,筱玛决定请他的朋友们一起来玩迷阵探险。 迷阵可以看做一个n×nn×n的矩阵A,每个格子上有一 阅读全文
posted @ 2019-05-02 18:21 谁知道你啊啊啊 阅读(178) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页