摘要: Problem Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The second problem i 阅读全文
posted @ 2019-02-09 23:18 lu_nacy 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目描述 链接:https://ac.nowcoder.com/acm/contest/317/G来源:牛客网 思路:观察发现区间内l-r的长度与区间内最大值和最小值的差相等时,区间是‘萌’的 如果长度不相等的话,我们就要寻找l--,r++的数,并且在区间内的数加入要求的区间内; 代码如下: 阅读全文
posted @ 2019-02-06 22:42 lu_nacy 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Every superhero has been given a power value by the Felicity Committee. The avengers crew wants to maximize the average power of the superheroes 阅读全文
posted @ 2019-02-06 00:49 lu_nacy 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 题目描述 题目描述 We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A sup 阅读全文
posted @ 2019-02-04 23:38 lu_nacy 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 链接:https://ac.nowcoder.com/acm/contest/317/C来源:牛客网 思路:dp找到1——n星球的最大耐久度 代码如下: 阅读全文
posted @ 2019-02-02 22:45 lu_nacy 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/331/J来源:牛客网小希最近想知道一个东西,就是A+B=A|B(其中|为按位或)的二元组有多少个。 当然,直接做这个式子对小希来说太难了,所以小希改变了一些条件,她仅想知道其中A,B<NA,B<N的情况,其中N为2的幂次 阅读全文
posted @ 2019-02-01 23:30 lu_nacy 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/331/A来源:牛客网 小希现在手里有一个连着的两块木条,长度分别为l1,l2,木条之间有一个无摩擦的连接点,木条之间可以相互转动,小希将其称之为双截棍。 现在小希把长为l1的木条的一端放在原点(0,0),任意转动这两根木 阅读全文
posted @ 2019-02-01 21:53 lu_nacy 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Consider a positive integer N written in standard notation with k+1 digits a​i​​ as a​k​​⋯a​1​​a​0​​ with 0≤a​i​​<10 for all i and a​k​​>0. Then N is 阅读全文
posted @ 2018-12-08 19:23 lu_nacy 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)s 阅读全文
posted @ 2018-12-07 20:20 lu_nacy 阅读(221) 评论(0) 推荐(0) 编辑
摘要: The "travelling salesman problem" asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shor 阅读全文
posted @ 2018-12-06 09:29 lu_nacy 阅读(376) 评论(0) 推荐(0) 编辑