随笔分类 -  codefores水题

摘要:You are given nn integer numbers a1,a2,…,ana1,a2,…,an. Consider graph on nn nodes, in which nodes ii, jj (i≠ji≠j) are connected if and only if, aiaiAN 阅读全文
posted @ 2019-08-19 20:54 black_hole6 阅读(391) 评论(0) 推荐(0)
摘要:output standard output Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0 阅读全文
posted @ 2019-07-15 17:50 black_hole6 阅读(356) 评论(0) 推荐(0)
摘要:A. Telephone Number A telephone number is a sequence of exactly 11 digits, where the first digit is 8. For example, the sequence 80011223388 is a tele 阅读全文
posted @ 2019-05-16 23:16 black_hole6 阅读(323) 评论(0) 推荐(0)
摘要:A. Remainder output standard output output standard output output You are given a huge decimal number consisting of nn digits. It is guaranteed that t 阅读全文
posted @ 2019-05-16 16:59 black_hole6 阅读(391) 评论(0) 推荐(0)
摘要:Simon has a prime number x and an array of non-negative integers a1, a2, ..., an. Simon loves fractions very much. Today he wrote out number on a piec 阅读全文
posted @ 2019-05-01 20:43 black_hole6 阅读(355) 评论(0) 推荐(0)
摘要:A. Stock Arbitraging 直接上代码: B. Tiling Challenge 找一下就行了 代码: C. Prefix Sum Primes 思维+构造也很好想 代码; 阅读全文
posted @ 2019-04-30 12:14 black_hole6 阅读(196) 评论(0) 推荐(0)
摘要:A. Reachable Numbers 题意:设f(x)为 x+1 这个数去掉后缀0的数,现在给出n,问经过无数次这种变换后,最多能得到多少个不同的数。 代码 #include<cstdio> #include<cstring> #include<iostream> #include<algori 阅读全文
posted @ 2019-04-29 22:21 black_hole6 阅读(211) 评论(0) 推荐(0)
摘要:The name of one small but proud corporation consists of n lowercase English letters. The Corporation has decided to try rebranding — a... 阅读全文
posted @ 2019-04-08 17:28 black_hole6 阅读(222) 评论(0) 推荐(0)
摘要:Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd.InputThe only... 阅读全文
posted @ 2019-03-12 16:18 black_hole6 阅读(207) 评论(0) 推荐(0)
摘要:The city of Fishtopia can be imagined as a grid of 44 rows and an odd number of columns. It has two main villages; the first is locate... 阅读全文
posted @ 2019-03-12 16:14 black_hole6 阅读(283) 评论(0) 推荐(0)
摘要:C - Arthur and Table Arthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table i... 阅读全文
posted @ 2019-03-01 10:57 black_hole6 阅读(158) 评论(0) 推荐(0)
摘要:Arkady plays Gardenscapes a lot. Arkady wants to build two new fountains. There are n available fountains, for each fountain its beaut... 阅读全文
posted @ 2019-02-25 21:26 black_hole6 阅读(288) 评论(0) 推荐(0)
摘要:Sasha likes programming. Once, during a very long contest, Sasha decided that he was a bit tired and needed to relax. So he did. But s... 阅读全文
posted @ 2019-02-17 14:47 black_hole6 阅读(333) 评论(0) 推荐(0)
摘要:After the fourth season Sherlock and Moriary have realized the whole foolishness of the battle between them and decided to continue th... 阅读全文
posted @ 2019-02-15 18:22 black_hole6 阅读(272) 评论(0) 推荐(0)
摘要:Grigory has nn magic stones, conveniently numbered from 11 to nn. The charge of the ii-th stone is equal to cici.Sometimes Grigory get... 阅读全文
posted @ 2019-02-08 11:43 black_hole6 阅读(260) 评论(0) 推荐(0)
摘要:Can the greatest common divisor and bitwise operations have anything in common? It is time to answer this question.Suppose you are giv... 阅读全文
posted @ 2019-02-08 11:40 black_hole6 阅读(184) 评论(0) 推荐(0)
摘要:Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies bo... 阅读全文
posted @ 2019-02-02 20:37 black_hole6 阅读(196) 评论(0) 推荐(0)
摘要:You are given n k-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the ... 阅读全文
posted @ 2019-01-25 18:30 black_hole6 阅读(268) 评论(0) 推荐(0)
摘要:You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('R', 'G' and ... 阅读全文
posted @ 2019-01-24 11:59 black_hole6 阅读(220) 评论(0) 推荐(0)
摘要:You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is sisi ('R', 'G' and ... 阅读全文
posted @ 2019-01-24 11:56 black_hole6 阅读(207) 评论(0) 推荐(0)