随笔分类 -  难度0

做题没有意义
摘要:题目 http://poj.org/problem?id=3267 题意 有长为L的字符串(L<=600),现在问最少去掉多少个字符,使得字符串由字典中的词不重叠地构成。 字典中含有k(k<=300)个词,每个词长度最多为25 思路 最粗暴的想法:假设当前已经匹配到i为第k个单词的结尾,向前找到第k 阅读全文
posted @ 2021-02-03 00:54 雪溯 阅读(42) 评论(0) 推荐(0) 编辑
摘要:题目 http://poj.org/problem?id=1276 题意 一台机器,里面有N种钱,第k种钱币值为Dk,共有Nk张。问不超过cash最多能取出多少钱。 思路 最最简单的可达性dp。 代码 Mem: 384K Time: 329MS #include <iostream> #includ 阅读全文
posted @ 2021-02-02 23:57 雪溯 阅读(52) 评论(0) 推荐(0) 编辑
摘要:题目: https://cryptopals.com/sets/1/challenges/5 解法: 阅读全文
posted @ 2019-12-07 00:55 雪溯 阅读(93) 评论(0) 推荐(0) 编辑
摘要:题目: https://cryptopals.com/sets/1/challenges/4 解法: 感想: 没有仔细读题,还以为就是S1-3的放大版 阅读全文
posted @ 2019-12-07 00:45 雪溯 阅读(209) 评论(0) 推荐(0) 编辑
摘要:题目地址: https://cryptopals.com/sets/1/challenges/3 解法: 感想: 还以为要把ETAOIN SHRDLU这句话当成答案 阅读全文
posted @ 2019-12-07 00:29 雪溯 阅读(117) 评论(0) 推荐(0) 编辑
摘要:题目地址: https://cryptopals.com/sets/1/challenges/2 解法: hex(x^y) python3 阅读全文
posted @ 2019-12-07 00:12 雪溯 阅读(154) 评论(0) 推荐(0) 编辑
摘要:题目: https://cryptopals.com/sets/1/challenges/1 转码,hex到base64 x = "0x49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d 阅读全文
posted @ 2019-12-07 00:06 雪溯 阅读(108) 评论(0) 推荐(0) 编辑
摘要:题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1668 题意 给n种距离di,现在要设计一个m刻度的赤字,使得每个di都可以直接量出来 阅读全文
posted @ 2019-06-09 16:05 雪溯 阅读(207) 评论(0) 推荐(0) 编辑
摘要:题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2637 题意 积木,有左视图和前视图,问最少几块积木 思路 明显,把前视图视作列,左视 阅读全文
posted @ 2019-04-12 22:21 雪溯 阅读(155) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2075 题意 n皇后类似的n(n<=5000)车,每个车所在的行列上不能有其它车,n*n棋盘放n个车 阅读全文
posted @ 2019-03-05 19:44 雪溯 阅读(129) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2674 题意 n个正整数,尽量均匀地把它们分成严格递增序列。要求序列个数最小 思路 明显,序列个数就 阅读全文
posted @ 2019-03-05 19:01 雪溯 阅读(112) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2674 题意 有严格下降的n条线段,长度都为w,第i条线段起点xi,终点xi + w,高度yi,现在 阅读全文
posted @ 2019-03-04 15:18 雪溯 阅读(173) 评论(0) 推荐(0) 编辑
摘要:题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2255 题意 n个任务,允许时间区间为[ri, di](ri , di <= 2000 阅读全文
posted @ 2019-03-03 22:19 雪溯 阅读(149) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1846 题意 n个数字按照字符串方式直接组合成大数字,问最大组合成多少 思路 排序 感想 1. 因为 阅读全文
posted @ 2019-03-03 20:50 雪溯 阅读(135) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1323 题意 长方形l * w,给出长方形中间那条线上n个圆的圆心c和半径r,选取最少数目的圆覆盖长 阅读全文
posted @ 2019-03-02 22:25 雪溯 阅读(107) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1281 题意 问字符串a能否是字符串b的子序列 思路 明显,计数对的上就行 感想 因为忘了break 阅读全文
posted @ 2019-03-02 21:31 雪溯 阅读(98) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=0&problem=1911 题意 m*n的矩形巧克力,要切成1*1,不能一次切两块,问多少下切完 阅读全文
posted @ 2019-03-02 21:17 雪溯 阅读(80) 评论(0) 推荐(0) 编辑
摘要:题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1603 题意 问使m个n长碱基序列汉明码最小的序列 思路 明显,取最频繁的 代码 #i 阅读全文
posted @ 2019-03-02 20:47 雪溯 阅读(81) 评论(0) 推荐(0) 编辑
摘要:题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1214 题意 问字符串a能否是字符串b经过某种替换+移位密码的密文 思路 明显,计数对 阅读全文
posted @ 2019-03-01 17:23 雪溯 阅读(105) 评论(0) 推荐(0) 编辑
摘要:题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1980 题意 n个数,要求正负相间,绝对值增长,问n个数能组成的这样数列最长多长 思路 明显,分成正 阅读全文
posted @ 2019-02-27 11:45 雪溯 阅读(80) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示