摘要:
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 阅读全文
摘要:
题目描述 链接:https://ac.nowcoder.com/acm/contest/317/G来源:牛客网 思路:观察发现区间内l-r的长度与区间内最大值和最小值的差相等时,区间是‘萌’的 如果长度不相等的话,我们就要寻找l--,r++的数,并且在区间内的数加入要求的区间内; 代码如下: 阅读全文
摘要:
题目描述: Every superhero has been given a power value by the Felicity Committee. The avengers crew wants to maximize the average power of the superheroes 阅读全文
摘要:
题目描述 题目描述 We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A sup 阅读全文
摘要:
题目描述: 链接:https://ac.nowcoder.com/acm/contest/317/C来源:牛客网 思路:dp找到1——n星球的最大耐久度 代码如下: 阅读全文
摘要:
链接:https://ac.nowcoder.com/acm/contest/331/J来源:牛客网小希最近想知道一个东西,就是A+B=A|B(其中|为按位或)的二元组有多少个。 当然,直接做这个式子对小希来说太难了,所以小希改变了一些条件,她仅想知道其中A,B<NA,B<N的情况,其中N为2的幂次 阅读全文
摘要:
链接:https://ac.nowcoder.com/acm/contest/331/A来源:牛客网 小希现在手里有一个连着的两块木条,长度分别为l1,l2,木条之间有一个无摩擦的连接点,木条之间可以相互转动,小希将其称之为双截棍。 现在小希把长为l1的木条的一端放在原点(0,0),任意转动这两根木 阅读全文
摘要:
Consider a positive integer N written in standard notation with k+1 digits ai as ak⋯a1a0 with 0≤ai<10 for all i and ak>0. Then N is 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文