05 2020 档案

摘要:Problem Statement Given is a string SS consisting of digits from 1 through 9. Find the number of pairs of integers (i,j)(i,j) (1≤i≤j≤|S|1≤i≤j≤|S|) tha 阅读全文
posted @ 2020-05-30 15:53 DeaL57 阅读(239) 评论(0) 推荐(0)
摘要:Time Limit: 2 sec / Memory Limit: 1024 MB Score : 300300 points Problem Statement Given are positive integers NN, MM, QQ, and QQ quadruples of integer 阅读全文
posted @ 2020-05-30 15:04 DeaL57 阅读(181) 评论(0) 推荐(0)
摘要:Today, Osama gave Fadi an integer XX, and Fadi was wondering about the minimum possible value of max(a,b)max(a,b) such that LCM(a,b)LCM(a,b) equals XX 阅读全文
posted @ 2020-05-29 22:59 DeaL57 阅读(189) 评论(0) 推荐(0)
摘要:During the quarantine, Sicromoft has more free time to create the new functions in "Celex-2021". The developers made a new function GAZ-GIZ, which inf 阅读全文
posted @ 2020-05-27 07:44 DeaL57 阅读(619) 评论(0) 推荐(0)
摘要:Anu has created her own function ff: f(x,y)=(x|y)−yf(x,y)=(x|y)−y where || denotes the bitwise OR operation. For example, f(11,6)=(11|6)−6=15−6=9f(11, 阅读全文
posted @ 2020-05-26 12:05 DeaL57 阅读(171) 评论(0) 推荐(0)
摘要:Your company was appointed to lay new asphalt on the highway of length nn. You know that every day you can either repair one unit of the highway (lay 阅读全文
posted @ 2020-05-26 10:57 DeaL57 阅读(190) 评论(0) 推荐(0)
摘要:Bessie the cow has just intercepted a text that Farmer John sent to Burger Queen! However, Bessie is sure that there is a secret message hidden inside 阅读全文
posted @ 2020-05-26 09:05 DeaL57 阅读(215) 评论(0) 推荐(0)
摘要:Suppose you are performing the following algorithm. There is an array v1,v2,…,vnv1,v2,…,vn filled with zeroes at start. The following operation is app 阅读全文
posted @ 2020-05-26 00:33 DeaL57 阅读(156) 评论(0) 推荐(0)
摘要:There are nn models in the shop numbered from 11 to nn, with sizes s1,s2,…,sns1,s2,…,sn. Orac will buy some of the models and will arrange them in the 阅读全文
posted @ 2020-05-25 12:17 DeaL57 阅读(242) 评论(0) 推荐(0)
摘要:Skier rides on a snowy field. Its movements can be described by a string of characters 'S', 'N', 'W', 'E' (which correspond to 11 meter movement in th 阅读全文
posted @ 2020-05-25 10:05 DeaL57 阅读(219) 评论(0) 推荐(0)
摘要:Petya and Vasya are competing with each other in a new interesting game as they always do. At the beginning of the game Petya has to come up with an a 阅读全文
posted @ 2020-05-25 09:23 DeaL57 阅读(143) 评论(0) 推荐(0)
摘要:You are given an array aa of length nn and array bb of length mm both consisting of only integers 00 and 11. Consider a matrix cc of size n×mn×m forme 阅读全文
posted @ 2020-05-24 11:02 DeaL57 阅读(225) 评论(0) 推荐(0)
摘要:Polycarp wants to assemble his own keyboard. Layouts with multiple rows are too complicated for him — his keyboard will consist of only one row, where 阅读全文
posted @ 2020-05-22 20:14 DeaL57 阅读(218) 评论(0) 推荐(0)
摘要:output standard output You are given a tree consisting of nn nodes. You want to write some labels on the tree's edges such that the following conditio 阅读全文
posted @ 2020-05-20 11:54 DeaL57 阅读(137) 评论(0) 推荐(0)
摘要:This is the easy version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test cases. You can make 阅读全文
posted @ 2020-05-19 23:19 DeaL57 阅读(283) 评论(0) 推荐(0)
摘要:You have an array aa of length nn. For every positive integer xx you are going to perform the following operation during the xx-th second: Select some 阅读全文
posted @ 2020-05-19 09:43 DeaL57 阅读(167) 评论(0) 推荐(0)
摘要:For the multiset of positive integers s={s1,s2,…,sk}s={s1,s2,…,sk}, define the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of ss as 阅读全文
posted @ 2020-05-18 21:04 DeaL57 阅读(296) 评论(0) 推荐(0)
摘要:Denis was very sad after Nastya rejected him. So he decided to walk through the gateways to have some fun. And luck smiled at him! When he entered the 阅读全文
posted @ 2020-05-18 09:13 DeaL57 阅读(192) 评论(0) 推荐(0)
摘要:Modern cellular phones have a small chip, called a SIM card, that allows the phone to interface with the carrier's network. SIM cards also have a smal 阅读全文
posted @ 2020-05-17 14:37 DeaL57 阅读(170) 评论(0) 推荐(0)
摘要:As a huge fan of the popular collectible card game Numinous Wilds: the Elven Reign Chronicles (NWERC), you have a large collection of cards which you 阅读全文
posted @ 2020-05-16 23:03 DeaL57 阅读(230) 评论(0) 推荐(0)
摘要:Pay attention to the non-standard memory limit in this problem. In order to cut off efficient solutions from inefficient ones in this problem, the tim 阅读全文
posted @ 2020-05-15 18:12 DeaL57 阅读(231) 评论(0) 推荐(0)
摘要:For some binary string ss (i.e. each character sisi is either '0' or '1'), all pairs of consecutive (adjacent) characters were written. In other words 阅读全文
posted @ 2020-05-15 12:10 DeaL57 阅读(278) 评论(0) 推荐(0)
摘要:You are given an array aa of length nn consisting of zeros. You perform nn actions with this array: during the ii-th action, the following sequence of 阅读全文
posted @ 2020-05-15 09:11 DeaL57 阅读(282) 评论(0) 推荐(0)
摘要:The map of Bertown can be represented as a set of nn intersections, numbered from 11 to nn and connected by mm one-way roads. It is possible to move a 阅读全文
posted @ 2020-05-13 09:31 DeaL57 阅读(233) 评论(0) 推荐(0)
摘要:Dreamoon likes sequences very much. So he created a problem about the sequence that you can't find in OEIS: You are given two integers d,md,m, find th 阅读全文
posted @ 2020-05-12 00:54 DeaL57 阅读(152) 评论(0) 推荐(0)
摘要:Writing light novels is the most important thing in Linova's life. Last night, Linova dreamed about a fantastic kingdom. She began to write a light no 阅读全文
posted @ 2020-05-11 20:22 DeaL57 阅读(317) 评论(0) 推荐(0)
摘要:A permutation of length nn is an array p=[p1,p2,…,pn]p=[p1,p2,…,pn], which contains every integer from 11 to nn (inclusive) and, moreover, each number 阅读全文
posted @ 2020-05-11 16:35 DeaL57 阅读(219) 评论(0) 推荐(0)
摘要:Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself. Recently Xenia 阅读全文
posted @ 2020-05-10 11:10 DeaL57 阅读(213) 评论(0) 推荐(0)
摘要:Lily is fascinated by numbers. She believes the whole world revolves around them, and that everything is connected by numbers. Her friends, Alice, Bob 阅读全文
posted @ 2020-05-09 20:31 DeaL57 阅读(536) 评论(0) 推荐(0)
摘要:Denis, after buying flowers and sweets (you will learn about this story in the next task), went to a date with Nastya to ask her to become a couple. N 阅读全文
posted @ 2020-05-09 11:37 DeaL57 阅读(182) 评论(0) 推荐(0)
摘要:Hilbert's Hotel is a very unusual hotel since the number of rooms is infinite! In fact, there is exactly one room for every integer, including zero an 阅读全文
posted @ 2020-05-08 17:05 DeaL57 阅读(219) 评论(0) 推荐(0)
摘要:You are given two integers aa and bb, and qq queries. The ii-th query consists of two numbers lili and riri, and the answer to it is the number of int 阅读全文
posted @ 2020-05-06 23:03 DeaL57 阅读(171) 评论(0) 推荐(0)
摘要:Phoenix has a string ss consisting of lowercase Latin letters. He wants to distribute all the letters of his string into kk non-empty strings a1,a2,…, 阅读全文
posted @ 2020-05-06 16:59 DeaL57 阅读(226) 评论(0) 推荐(0)
摘要:Santa Claus has received letters from nn different kids throughout this year. Of course, each kid wants to get some presents from Santa: in particular 阅读全文
posted @ 2020-05-05 18:46 DeaL57 阅读(187) 评论(0) 推荐(0)
摘要:We start with a string ss consisting only of the digits 11, 22, or 33. The length of ss is denoted by |s||s|. For each ii from 11 to |s||s|, the ii-th 阅读全文
posted @ 2020-05-05 17:24 DeaL57 阅读(126) 评论(0) 推荐(0)
摘要:Your friend Jeff Zebos has been trying to run his new online company, but it's not going very well. He's not getting a lot of sales on his website whi 阅读全文
posted @ 2020-05-05 16:18 DeaL57 阅读(181) 评论(0) 推荐(0)
摘要:This is the hard version of this problem. The only difference is the constraint on kk — the number of gifts in the offer. In this version: 2≤k≤n2≤k≤n. 阅读全文
posted @ 2020-05-04 00:16 DeaL57 阅读(188) 评论(0) 推荐(0)
摘要:Recall that the permutation is an array consisting of nn distinct integers from 11 to nn in arbitrary order. For example, [2,3,1,5,4][2,3,1,5,4] is a 阅读全文
posted @ 2020-05-03 23:21 DeaL57 阅读(156) 评论(0) 推荐(0)