07 2017 档案
摘要: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,
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 (
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Mahmoud has n line segments, the i-th of them has length ai. Ehab challenged him to use exactly 3 line segments to form a non-degenerate triangle. Mah
阅读全文
摘要:While Mahmoud and Ehab were practicing for IOI, they found a problem which name was Longest common subsequence. They solved it, and then Ehab challeng
阅读全文
摘要:Problem Description KazaQ wears socks everyday.At the beginning, he has n pairs of socks numbered from 1 to n in his closets. Every morning, he puts o
阅读全文
摘要:Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ran
阅读全文
摘要:Problem Description There is a youngster known for amateur propositions concerning several mathematical hard problems.Nowadays, he is preparing a thou
阅读全文
摘要:All our characters have hobbies. The same is true for Fedor. He enjoys shopping in the neighboring supermarket. The goods in the supermarket have uniq
阅读全文
摘要:Ilya is an experienced player in tic-tac-toe on the 4 × 4 field. He always starts and plays with Xs. He played a lot of games today with his friend Ar
阅读全文
摘要:One spring day on his way to university Lesha found an array A. Lesha likes to split arrays into several parts. This time Lesha decided to split the a
阅读全文
摘要:Moriarty has trapped n people in n distinct rooms in a hotel. Some rooms are locked, others are unlocked. But, there is a condition that the people in
阅读全文
摘要:Molly Hooper has n different kinds of chemicals arranged in a line. Each of the chemicals has an affection value, The i-th of them has affection value
阅读全文
摘要:Sherlock has a new girlfriend (so unlike him!). Valentine's day is coming and he wants to gift her some jewelry. He bought n pieces of jewelry. The i-
阅读全文
摘要:Our beloved detective, Sherlock is currently trying to catch a serial killer who kills a person each day. Using his powers of deduction, he came to kn
阅读全文
摘要:There are n people taking part in auction today. The rules of auction are classical. There were n bids made, though it's not guaranteed they were from
阅读全文
摘要:There are n employees in Alternative Cake Manufacturing (ACM). They are now voting on some very important question and the leading world media are try
阅读全文
摘要:Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian
阅读全文
摘要:Bachgold problem is very easy to formulate. Given a positive integer n represent it as a sum of maximum possible number of prime numbers. One can prov
阅读全文
摘要:D - Fennec VS. Snuke Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement Fennec and Snuke are playing a board game. On the b
阅读全文
摘要:C - Splitting Pile Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement Snuke and Raccoon have a heap of N cards. The i-th ca
阅读全文
摘要:最近盛大的一款游戏传奇世界极其火爆。游戏玩家John,想购买游戏中的装备。已知游戏的商店里有n 件装备,第i 件装备具有属性值a i ,购买需要花费b i 个金币。John想去购买这些装备,但是账号中只有m 个金币,John是个很贪婪的家伙,他想购买尽可能多的装备。并且在保证购买到最多件装备的情况下
阅读全文
摘要:有一天,空和白很无聊,决定玩盛大游戏,考虑到两个人玩,他们随便掏了一个游戏出来:在一个n∗m 的棋盘上,首先把史蒂芬妮·多拉放在左上角(1,1) 的位置。每次一个人可以将她往下,往右,往右下丢一格。当前回合,谁不能丢史蒂芬妮,谁就输了。(注意,不可以把活人丢出棋盘啦!)游戏总是空先手。 白说,这是一
阅读全文
摘要:给定一个长度为n 的非负整数序列,下标为0 ,1 ,…,n−1 . 定义:sequence(K) : 由下标为K 的倍数组成的子序列,即下标为0 ,K ,2K ,...,[n−1/k]∗k query(K,S) : 询问sequence(K) 中的第S 大的数字 给定一个长度为n 的非负整数序列,下
阅读全文
摘要:最近,盛大计划开发一款手游,以下是简化版。系统和我方各有n 头怪兽,每一头怪兽都有生命值和攻击力,并且当怪兽A攻击怪兽B,如果怪兽B的生命值高于怪兽A的攻击力,则怪兽B的生命力减少A的攻击力的数值,否则怪兽B将死亡。我方已经通过一些手段得知了系统怪兽的出战序列,我方想要知道,我方是否可以合理安排怪兽
阅读全文
摘要:如果一个序列有奇数个正整数组成,不妨令此序列为a 1 ,a 2 ,a 3 ,...,a 2∗k+1 (0<=k ),并且a 1 ,a 2 ...a k+1 是一个严格递增的序列,a k+1 ,a k+2 ,...,a 2∗k+1 ,是一个严格递减的序列,则称此序列是A序列。 比如1 2 5 4 3就
阅读全文
摘要:Claire Redfield在龙之谷游戏的一次任务中获得了一个上了锁的宝箱,上面刻了一串由小写字母构成的字符串A和一个数字m 。 经过Claire长时间研究,他发现密码是和a ,m 有关的。字符串A相当于一个26进制的数字,a 相当于0 ,b 相当于1 …….z 相当于25 。然后要将这个26进制
阅读全文
摘要:Tony最近喜欢上了龙之谷游戏,所以他想叫上他的好友组建一个公会来一起享受这款游戏。 Tony一共有n 个好友,他可以叫上任意k (1<=k<=n )个好友来组建公会,并且所有好友都会答应他的请求。问Tony一共可以有多少种方案组建这个公会? 只要不是完全相同的人组建的方案视为不同方案,并且Tony
阅读全文
摘要:《神无月》作为盛大游戏2017年的全新原创大作,其开发团队在自研实力强大的传世工作室基础之上,还有美树本晴彦等日本一线知名画师及日本游戏音乐大师崎元仁加盟参与制作。目前正在不限号内测中,有很多玩家进入到神无月的世界中。 在神无月中,有着玩家之间切磋的排位赛,其段位主要分为五大段位,从低到高依次为:新
阅读全文
摘要:在一个矩形的灰度图像上,每个像素点或者是黑色的或者是白色的。黑色像素点用1 表示,白色像素点用0 表示。现在要求你编写一个程序,计算每列上黑色像素点的个数并输出。如下图所示是一个6∗8 的黑板图像。 1 1 0 0 1 1 1 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0
阅读全文
摘要:B - Moderate Differences Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement There are N squares in a row. The leftmost squa
阅读全文
摘要:Problem Statement There are N bags of biscuits. The i-th bag contains Ai biscuits. Takaki will select some of these bags and eat all of the biscuits i
阅读全文
摘要:Vova again tries to play some computer card game. The rules of deck creation in this game are simple. Vova is given an existing deck of n cards and a
阅读全文
摘要:Alice and Bob got very bored during a long car trip so they decided to play a game. From the window they can see cars of different colors running past
阅读全文
摘要:n children are standing in a circle and playing a game. Children's numbers in clockwise order form a permutation a1, a2, ..., an of length n. It is an
阅读全文
摘要:There are n students who have taken part in an olympiad. Now it's time to award the students. Some of them will receive diplomas, some wiil get certif
阅读全文