随笔分类 - vjugde
摘要:题解: /*bfs: WA了n次,主要是考虑策略时想法错了。 其实每到一个点时就应该把改点以及该方向的点全都遍历一次,这样才能保证 到达改点时是最优策略,其次,因为交叉关系,vis[][]应该放在while判断里面。*/import java.util.LinkedList; import java
阅读全文
摘要:You want to perform the combo on your opponent in one popular fighting game. The combo is the string ss consisting of nn lowercase Latin letters. To p
阅读全文
摘要:There are nn points on a coordinate axis OXOX . The ii -th point is located at the integer point xixi and has a speed vivi . It is guaranteed that no
阅读全文
摘要:You are given two integers nn and dd . You need to construct a rooted binary tree consisting of nn vertices with a root at the vertex 11 and the sum o
阅读全文
摘要:You are given three integers a≤b≤ca≤b≤c . In one move, you can add +1+1 or −1−1 to any of these integers (i.e. increase or decrease any number by one)
阅读全文
摘要:Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For
阅读全文
摘要:During his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discove
阅读全文
摘要:Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs t
阅读全文
摘要:Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the stat
阅读全文

浙公网安备 33010602011771号