上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 58 下一页
摘要: Problem Description 对于一个串S,当它同时满足如下条件时,它就是一个01偏串: 1、只由0和1两种符组成; 2、在S的每一个前缀中,0的个数不超过1的个数; 3、S中0的个数和1的个数相等。 现在给定01偏串S,请计算一下S在所有长度为n的01偏串中作为子串出现的次数的总和。 由 阅读全文
posted @ 2017-08-06 22:59 樱花落舞 阅读(429) 评论(0) 推荐(0)
摘要: 度度熊的王国战略 度度熊的王国战略 度度熊国王率领着喵哈哈族的勇士,准备进攻哗啦啦族。 哗啦啦族是一个强悍的民族,里面有充满智慧的谋士,拥有无穷力量的战士。 所以这一场战争,将会十分艰难。 为了更好的进攻哗啦啦族,度度熊决定首先应该从内部瓦解哗啦啦族。 第一步就是应该使得哗啦啦族内部不能同心齐力,需 阅读全文
posted @ 2017-08-05 17:05 樱花落舞 阅读(449) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-07-27 00:18 樱花落舞 阅读(224) 评论(0) 推荐(0)
摘要: The organizers of a programming contest have decided to present t-shirts to participants. There are six different t-shirts sizes in this problem: S,M, 阅读全文
posted @ 2017-07-26 23:15 樱花落舞 阅读(332) 评论(0) 推荐(0)
摘要: This is an interactive problem. You should use flush operation after each printed line. For example, in C++ you should usefflush(stdout), in Java you 阅读全文
posted @ 2017-07-26 23:04 樱花落舞 阅读(230) 评论(0) 推荐(0)
摘要: Vasily exited from a store and now he wants to recheck the total price of all purchases in his bill. The bill is a string in which the names of the pu 阅读全文
posted @ 2017-07-26 22:53 樱花落舞 阅读(289) 评论(2) 推荐(0)
摘要: Vasily has a number a, which he wants to turn into a number b. For this purpose, he can do two types of operations: multiply the current number by 2 ( 阅读全文
posted @ 2017-07-26 22:44 樱花落舞 阅读(269) 评论(0) 推荐(0)
摘要: Mahmoud and Ehab live in a country with n cities numbered from 1 to n and connected by n - 1 undirected roads. It's guaranteed that you can reach any 阅读全文
posted @ 2017-07-26 01:43 樱花落舞 阅读(241) 评论(0) 推荐(0)
摘要: Mahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of relations: synonymy (i. e. the two wo 阅读全文
posted @ 2017-07-26 01:32 樱花落舞 阅读(276) 评论(0) 推荐(0)
摘要: Mahmoud wrote a message s of length n. He wants to send it as a birthday present to his friend Moaz who likes strings. He wrote it on a magical paper 阅读全文
posted @ 2017-07-26 01:22 樱花落舞 阅读(162) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 58 下一页