codefores水题
文章平均质量分 62
black-hole6
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #555 (Div. 3) A B C1(很水的题目)
解析链接:https://www.cnblogs.com/Staceyacm/p/10793279.html原创 2019-04-29 22:22:04 · 337 阅读 · 0 评论 -
Codeforces Round #532 (Div. 2)- C(公式计算)
NN is an experienced internet user and that means he spends a lot of time on the social media. Once he found the following image on the Net, which asked him to compare the sizes of inner circles:I...原创 2019-01-14 23:10:58 · 744 阅读 · 0 评论 -
Codeforces Round #532 (Div. 2)- B(思维)
Arkady coordinates rounds on some not really famous competitive programming platform. Each round features nn problems of distinct difficulty, the difficulties are numbered from 11 to nn.To hold a ro...原创 2019-01-14 23:06:36 · 405 阅读 · 0 评论 -
Codeforces Round #532 (Div. 2)- A(思维)
This morning, Roman woke up and opened the browser with nn opened tabs numbered from 11 to nn. There are two kinds of tabs: those with the information required for the test and those with social netwo...原创 2019-01-14 23:03:53 · 394 阅读 · 0 评论 -
CodeForces - 476B -Dreamoon and WiFi(DFS+概率思维)
Dreamoon is standing at the position 0 on a number line. Drazil is sending a list of commands through Wi-Fi to Dreamoon's smartphone and Dreamoon follows them.Each command is one of the following tw...原创 2019-01-19 17:01:44 · 383 阅读 · 0 评论 -
CodeForces - 593A -2Char(思维+暴力枚举)
Andrew often reads articles in his favorite magazine 2Char. The main feature of these articles is that each of them uses at most two distinct letters. Andrew decided to send an article to the magazine...原创 2019-01-19 12:13:44 · 288 阅读 · 0 评论 -
Codeforces-D-Diverse Garland(思维)
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 'B' — colors of lamps in the garland).You have to recolor some l...原创 2019-01-24 11:59:00 · 590 阅读 · 0 评论 -
Codeforces-C-Nice Garland(枚举+暴力)
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 'B' — colors of lamps in the garland).You have to recolor some l...原创 2019-01-24 11:55:58 · 651 阅读 · 0 评论 -
Codeforces-B-Divisors of Two Integers(思维技巧)
Recently you have received two positive integer numbers xx and yy. You forgot them, but you remembered a shuffled list containing all divisors of xx (including 11 and xx) and all divisors of yy (inclu...原创 2019-01-24 11:53:04 · 745 阅读 · 2 评论 -
Codeforce-A-Two distinct points(暴力)
outputstandard outputYou are given two segments [l1;r1][l1;r1] and [l2;r2][l2;r2] on the xx-axis. It is guaranteed that l1<r1l1<r1 and l2<r2l2<r2. Segments may intersect, overlap or ev...原创 2019-01-24 11:49:13 · 405 阅读 · 0 评论 -
Codeforces Round #528-A. Right-Left Cipher(字符串模拟)
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp loves ciphers. He has invented his own cipher called Right-Left.Right-Le...原创 2018-12-24 09:33:50 · 346 阅读 · 0 评论 -
CodeForces - 851B -Arpa and an exam about geometry(计算几何)
Arpa is taking a geometry exam. Here is the last problem of the exam.You are given three points a, b, c.Find a point and an angle such that if we rotate the page around the point by the angle, the...原创 2018-12-18 09:54:46 · 310 阅读 · 0 评论 -
CodeForces - 608A-Saitama Destroys Hotel(模拟)
Saitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one of its other hotels. The elevator is special — it starts on the top floor,...原创 2018-12-18 09:13:51 · 355 阅读 · 0 评论 -
Codeforces-Salem and Sticks(枚举+思维)
Salem gave you nn sticks with integer positive lengths a1,a2,…,ana1,a2,…,an.For every stick, you can change its length to any other positive integer length (that is, either shrink or stretch it). Th...原创 2019-01-21 10:39:52 · 594 阅读 · 0 评论 -
CodeForces-Zuhair and Strings(思维+枚举)
Given a string ss of length nn and integer kk (1≤k≤n1≤k≤n). The string ss has a level xx, if xx is largest non-negative integer, such that it's possible to find in ss:xx non-intersecting (non-overla...原创 2019-01-21 10:43:00 · 607 阅读 · 0 评论 -
CodeForces - 124B-Permutations(DFS)
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 smallest number was minimum. Digits should be rearranged by the sa...原创 2019-01-25 18:29:55 · 467 阅读 · 0 评论 -
Rebranding(模拟+思维)
The name of one small but proud corporation consists ofnlowercase English letters. The Corporation has decided to try rebranding— an active marketing strategy, that includes a set of measures to ch...原创 2019-04-08 17:27:33 · 395 阅读 · 0 评论 -
Magic Odd Square (思维+构造)
Find ann × nmatrix with different numbers from1ton2, so the sum in each row, column and both main diagonals are odd.InputThe only line contains odd integern(1 ≤ n ≤ 49).OutputPrintnli...原创 2019-03-12 16:17:51 · 448 阅读 · 0 评论 -
Marlin (思维)
The city of Fishtopia can be imagined as a grid of44rows and anoddnumber of columns. It has two main villages; the first is located at the top-left cell(1,1)(1,1), people who stay there love fish...原创 2019-03-12 16:14:05 · 415 阅读 · 0 评论 -
Fountains(非线段树版(主要是不太会用))
Arkady plays Gardenscapes a lot. Arkady wants to build two new fountains. There are n available fountains, for each fountain its beauty and cost are known. There are two types of money in the game: co...原创 2019-02-25 21:25:32 · 616 阅读 · 0 评论 -
QDU_CEF(补)
C - Arthur and TableArthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table is unstable.In total the table Arthur bought hasnlegs, the ...原创 2019-03-01 10:56:49 · 392 阅读 · 0 评论 -
Sasha and a Bit of Relax(前缀异或和+二维数组+思维)
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 since Sasha isn't an ordinary guy, he prefers to relax unusually. D...原创 2019-02-17 14:47:29 · 428 阅读 · 0 评论 -
CodeForces - 1110E-Magic Stones(差分+思维)
Grigory has nn magic stones, conveniently numbered from 11 to nn. The charge of the ii-th stone is equal to cici.Sometimes Grigory gets bored and selects some inner stone (that is, some stone with i...原创 2019-02-08 11:42:36 · 527 阅读 · 0 评论 -
CodeForces - 1110C-Meaningless Operation(打表找规律)
Can the greatest common divisor and bitwise operations have anything in common? It is time to answer this question.Suppose you are given a positive integer aa. You want to choose some integer bb fro...原创 2019-02-08 11:40:18 · 401 阅读 · 0 评论 -
Game of Credit Cards(贪心+思维)
After the fourth season Sherlock and Moriary have realized the whole foolishness of the battle between them and decided to continue their competitions in peaceful game of Credit Cards.Rules of this ...原创 2019-02-15 18:22:10 · 296 阅读 · 0 评论 -
Codeforces-C-Grid game(思维)
You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile...原创 2019-01-23 13:06:05 · 1030 阅读 · 0 评论 -
Codeforces-B-Game with string(模拟栈)
Two people are playing a game with a string ss, consisting of lowercase latin letters.On a player's turn, he should choose two consecutive equal letters in the string and delete them.For example, ...原创 2019-01-23 13:00:27 · 462 阅读 · 0 评论 -
Olesya and Rodion (思维)
Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them.Your task is: given the n and t print an integer stri...原创 2019-02-02 20:37:13 · 387 阅读 · 0 评论 -
Codeforces Round #529 -C- Powers Of Two(二进制拆分)
A positive integer xx is called a power of two if it can be represented as x=2yx=2y, where yy is a non-negative integer. So, the powers of two are 1,2,4,8,16,…1,2,4,8,16,….You are given two positive...原创 2018-12-28 16:30:50 · 812 阅读 · 0 评论 -
Chinese Zodiac (水题)
The Chinese Zodiac, known as Sheng Xiao, is based on a twelve-year cycle, each year in the cycle related to an animal sign. These signs are the rat, ox, tiger, rabbit, dragon, snake, horse, sheep, mon...原创 2018-12-11 23:19:00 · 1724 阅读 · 0 评论 -
CodeForces - 500A-New Year Transportation(模拟)
New Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n board. People live in cells. However, it was hard to move between distinct cells, becaus...原创 2018-12-20 15:56:19 · 295 阅读 · 0 评论 -
CodeForces - 296A-Yaroslav and Permutations(思维)
Yaroslav has an array that consists of n integers. In one second Yaroslav can swap two neighboring array elements. Now Yaroslav is wondering if he can obtain an array where any two neighboring element...原创 2018-12-20 15:13:48 · 342 阅读 · 0 评论 -
Polycarp's Pockets(思维)
Polycarp has nn coins, the value of the ii-th coin is aiai. Polycarp wants to distribute all the coins between his pockets, but he cannot put two coins with the same value into the same pocket.For e...原创 2018-12-14 18:02:00 · 258 阅读 · 0 评论 -
Duff and Meat(贪心)
Duff is addicted to meat! Malek wants to keep her happy for n days. In order to be happy in i-th day, she needs to eat exactly ai kilograms of meat.There is a big shop uptown and Malek wants to bu...原创 2018-12-14 11:12:56 · 269 阅读 · 0 评论 -
Eugeny and Array(水题,注意题目描述即可)
Eugeny has array a = a1, a2, ..., an, consisting of n integers. Each integer ai equals to -1, or to 1. Also, he has m queries:Query number i is given as a pair of integers li, ri (1 ≤ li ≤ ri ≤ n)....原创 2018-12-14 10:49:20 · 241 阅读 · 0 评论 -
Codeforces Round #527-D1. Great Vova Wall (Version 1)(思维+栈)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVova's family is building the Great Vova Wall (named by Vova himself). Vova's pare...原创 2018-12-19 16:31:36 · 695 阅读 · 2 评论 -
Codeforces Round #527-B. Teams Forming(贪心)
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn students in a university. The number of students is even. The ii-th st...原创 2018-12-19 16:10:49 · 451 阅读 · 0 评论 -
Codeforces Round #527 -A. Uniform String(思维)
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two integers n and k.Your task is to construct such a string ss of ...原创 2018-12-19 16:06:50 · 467 阅读 · 0 评论 -
A. The Fair Nut and Elevator(暴力)
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Fair Nut lives in nn story house. aiai people live on the ii-th floor of the ho...原创 2018-12-12 23:47:04 · 621 阅读 · 0 评论 -
Codehorses T-shirts (map+遍历)
Codehorses has just hosted the second Codehorses Cup. This year, the same as the previous one, organizers are giving T-shirts for the winners.The valid sizes of T-shirts are either "M" or from 00 to...原创 2018-12-07 18:51:38 · 17172 阅读 · 0 评论