随笔分类 -  水题

摘要:链接:https://ac.nowcoder.com/acm/contest/331/A来源:牛客网 小希现在手里有一个连着的两块木条,长度分别为l1,l2,木条之间有一个无摩擦的连接点,木条之间可以相互转动,小希将其称之为双截棍。 现在小希把长为l1的木条的一端放在原点(0,0),任意转动这两根木 阅读全文
posted @ 2019-02-01 21:53 lu_nacy 阅读(148) 评论(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 阅读(232) 评论(0) 推荐(0)
摘要:给定一个完全由小写英文字母组成的字符串等差递增序列,该序列中的每个字符串的长度固定为 L,从 L 个 a 开始,以 1 为步长递增。例如当 L 为 3 时,序列为 { aaa, aab, aac, ..., aaz, aba, abb, ..., abz, ..., zzz }。这个序列的倒数第27 阅读全文
posted @ 2018-12-02 20:57 lu_nacy 阅读(1058) 评论(0) 推荐(0)
摘要:Problem Statement We have a sequence of length N consisting of non-negative integers. Consider performing the following operation on this sequence unt 阅读全文
posted @ 2018-11-24 22:11 lu_nacy 阅读(216) 评论(0) 推荐(0)
摘要:Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 阅读全文
posted @ 2018-11-16 23:16 lu_nacy 阅读(650) 评论(0) 推荐(0)
摘要:Vasiliy has an exam period which will continue for n days. He has to pass exams on m subjects. Subjects are numbered from 1 to m.About every day we kn 阅读全文
posted @ 2018-11-16 23:12 lu_nacy 阅读(187) 评论(0) 推荐(0)
摘要:A prime number (or a prime) is a natural number greater than 111 that cannot be formed by multiplying two smaller natural numbers. Now lets define a n 阅读全文
posted @ 2018-09-09 08:50 lu_nacy 阅读(242) 评论(0) 推荐(0)
摘要:Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT prob 阅读全文
posted @ 2018-08-18 18:18 lu_nacy 阅读(116) 评论(0) 推荐(0)