随笔分类 - 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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:A. Stock Arbitraging 直接上代码: B. Tiling Challenge 找一下就行了 代码: C. Prefix Sum Primes 思维+构造也很好想 代码;
阅读全文
摘要:A. Reachable Numbers 题意:设f(x)为 x+1 这个数去掉后缀0的数,现在给出n,问经过无数次这种变换后,最多能得到多少个不同的数。 代码 #include<cstdio> #include<cstring> #include<iostream> #include<algori
阅读全文
摘要:The name of one small but proud corporation consists of n lowercase English letters. The Corporation has decided to try rebranding — a...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要: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...
阅读全文
摘要:Arkady plays Gardenscapes a lot. Arkady wants to build two new fountains. There are n available fountains, for each fountain its beaut...
阅读全文
摘要: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...
阅读全文
摘要:After the fourth season Sherlock and Moriary have realized the whole foolishness of the battle between them and decided to continue th...
阅读全文
摘要: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...
阅读全文
摘要:Can the greatest common divisor and bitwise operations have anything in common? It is time to answer this question.Suppose you are giv...
阅读全文
摘要:Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies bo...
阅读全文
摘要: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 ...
阅读全文
摘要: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 ...
阅读全文
摘要: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 ...
阅读全文

浙公网安备 33010602011771号