随笔分类 - 初期文章
摘要:题意:倒序输出句子中的单词 代码:
阅读全文
摘要:Polycarp likes to play with numbers. He takes some integer number xx, writes it down on the board, and then performs with it n−1n−1operations of the t
阅读全文
摘要:Two-gram is an ordered pair (i.e. string of length two) of capital Latin letters. For example, "AZ", "AA", "ZA" — three distinct two-grams. You are gi
阅读全文
摘要:CS Course Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 430 Accepted Submission(s): 222 Problem
阅读全文
摘要:Problem Description A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are
阅读全文
摘要:Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is gues
阅读全文
摘要:才四月份,上半年的比赛就告一段落了。。 天梯赛混子,三十个人分最低,把队友拖到了国三,蓝桥杯省二滚粗,止步京城,旅游选拔赛成功选为替补二队,啊! 不过既然已经过去,我们说些乐观的一面,积累了大赛经验是肯定的,明年是肯定要继续的,放弃是不可能放弃的。挨个分析一下这几场比赛的总结: 1.天梯赛。模拟赛的
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/80/B 题目描述 在文某路学车中学高一新生军训中,Jxc正站在太阳下站着军姿,对于这样的酷热的阳光,Jxc 表示非常不爽。 Jxc将天空看做一个n*n的矩阵,此时天上有m朵云,这些云会随机分布在m个不同的位置,同时太阳
阅读全文
摘要:题目链接:点击打开链接 Magnus decided to play a classic chess game. Though what he saw in his locker shocked him! His favourite chessboard got broken into 4piece
阅读全文
摘要:7-10 树的遍历(25 分) 给定一棵二叉树的后序遍历和中序遍历,请你输出其层序遍历的序列。这里假设键值都是互不相等的正整数。 输入格式: 输入第一行给出一个正整数N(≤30),是二叉树中结点的个数。第二行给出其后序遍历序列。第三行给出其中序遍历序列。数字间以空格分隔。 输出格式: 在一行中输出该
阅读全文
摘要:7-9 集合相似度(25 分) 给定两个整数集合,它们的相似度定义为:Nc/Nt×100%。其中Nc是两个集合都有的不相等整数的个数,Nt是两个集合一共有的不相等整数的个数。你的任务就是计算任意一对给定集合的相似度。 输入格式: 输入第一行给出一个正整数N(≤50),是集合的
阅读全文
摘要:题目链接:点击打开链接 Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatop
阅读全文
摘要:题目链接:点击打开链接 There is a rectangular grid of n rows of m initially-white cells each. Arkady performed a certain number (possibly zero) of operations on
阅读全文
摘要:Description Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bri
阅读全文
摘要:网页链接:点击打开链接 Apart from plush toys, Imp is a huge fan of little yellow birds! To summon birds, Imp needs strong magic. There are n trees in a row on an
阅读全文
摘要:题目链接:点击打开链接 Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的
阅读全文
摘要:题目链接:点击打开链接 Imp is in a magic forest, where xorangles grow (wut?) A xorangle of order n is such a non-degenerate triangle, that lengths of its sides a
阅读全文
摘要:题目链接:点击打开链接 Pushok the dog has been chasing Imp for a few hours already. Fortunately, Imp knows that Pushok is afraid of a robot vacuum cleaner. While
阅读全文
摘要:Problem Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input 输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S两组ca
阅读全文
摘要:Bob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shepher
阅读全文

浙公网安备 33010602011771号