上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 59 下一页
摘要: C、Coolest Ski Route 题意:n个点,m条边组成的有向图,求任意两点之间的最长路径 dfs记忆化搜索 Gym - 102021D:Down the Pyramid题意:给你一层数,让你求出它下面的一层数,上面的每一个数都是下层相邻两个数的和。(就像图中的数字金字塔一样)。问你下面一层 阅读全文
posted @ 2019-08-15 21:25 知道了呀~ 阅读(416) 评论(0) 推荐(0)
摘要: Chenchen, Tangtang and ZengZeng are starting a game of tic-tac-toe, played on a 3 × 3 board. Initially, all squares on the board are empty and they ta 阅读全文
posted @ 2019-08-14 18:33 知道了呀~ 阅读(466) 评论(0) 推荐(0)
摘要: #1636 : Pangu and Stones #1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the first living being and the 阅读全文
posted @ 2019-08-14 15:50 知道了呀~ 阅读(332) 评论(0) 推荐(0)
摘要: #1632 : Secret Poems #1632 : Secret Poems 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 The Yongzheng Emperor (13 December 1678 – 8 October 1735), was the fif 阅读全文
posted @ 2019-08-14 11:05 知道了呀~ 阅读(336) 评论(0) 推荐(0)
摘要: Cats and Fish 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are many homeless cats in PKU campus. They are all happy because the students in the cat clu 阅读全文
posted @ 2019-08-13 21:36 知道了呀~ 阅读(314) 评论(0) 推荐(0)
摘要: A. MP3 A. MP3 题意:给你n个数,一个大小为8*I的容量,保存一个数需要多少容量取决于给定n个数的种类k,用公式 log2 k 计算,如果给定的容量不能保存所有数,选择减少数的种类来降低保存一个数需要的单位容量(通过替换来减少数的种类,数据的总量不变),问最少需要替换多少个数 题解:根据 阅读全文
posted @ 2019-08-13 17:59 知道了呀~ 阅读(310) 评论(0) 推荐(0)
摘要: 一. 巴什博奕(Bash Game): A和B一块报数,每人每次报最少1个,最多报4个,看谁先报到30。这应该是最古老的关于巴什博奕的游戏了吧。 其实如果知道原理,这游戏一点运气成分都没有,只和先手后手有关,比如第一次报数,A报k个数,那么B报5-k个数,那么B报数之后问题就变为,A和B一块报数,看 阅读全文
posted @ 2019-08-13 09:45 知道了呀~ 阅读(387) 评论(0) 推荐(0)
摘要: A. Coffee Break 题意:每天有m小时,你喝咖啡需要花一小时,你想在n个时刻都喝过一次咖啡,老板规定连续喝咖啡的间隔必须是d以上,求最少需要多少天才能喝够n次咖啡,并输出每个时刻第几天喝。 题解:map+优先队列,用map将愿意喝咖啡的时间喝在第几天喝咖啡映射起来,优先队列遍历每个时刻和 阅读全文
posted @ 2019-08-11 22:19 知道了呀~ 阅读(345) 评论(0) 推荐(0)
摘要: 一、迭代器iterator 迭代器是容器的一种遍历方式,每种容器都定义了自己的迭代器类型 声明一个迭代器: 容器名称<数据类型>::iterator 迭代器名称 vector<int>::iterator it; map<int,int>::iterator it; set<int>::iterat 阅读全文
posted @ 2019-08-11 18:41 知道了呀~ 阅读(324) 评论(0) 推荐(0)
摘要: Dining Description Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John h 阅读全文
posted @ 2019-08-11 15:19 知道了呀~ 阅读(329) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 59 下一页