随笔分类 -  算法基础—思维题

摘要: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 11:04 脂环 阅读(477) 评论(2) 推荐(1) 编辑
摘要: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-16 23:22 脂环 阅读(315) 评论(0) 推荐(1) 编辑
摘要:You are given two integers nn and mm . You have to construct the array aa of length nn consisting of non-negative integers (i.e. integers greater than 阅读全文
posted @ 2020-05-15 14:18 脂环 阅读(353) 评论(0) 推荐(0) 编辑
摘要:Phoenix has decided to become a scientist! He is currently investigating the growth of bacteria. Initially, on day 11, there is one bacterium with mas 阅读全文
posted @ 2020-05-02 16:55 脂环 阅读(325) 评论(0) 推荐(1) 编辑
摘要:Phoenix has nn coins with weights 21,22,…,2n21,22,…,2n. He knows that nn is even. He wants to split the coins into two piles such that each pile has e 阅读全文
posted @ 2020-05-02 14:48 脂环 阅读(297) 评论(0) 推荐(0) 编辑
摘要:题目描述 You are given a correct solution of the sudoku puzzle. If you don't know what is the sudoku, you can read about it here. The picture showing the 阅读全文
posted @ 2020-04-14 11:52 脂环 阅读(379) 评论(0) 推荐(0) 编辑
摘要:You have integer nn. Calculate how many ways are there to fully cover belt-like area of 4n−24n−2 triangles with diamond shapes. Diamond shape consists 阅读全文
posted @ 2020-04-13 10:41 脂环 阅读(423) 评论(0) 推荐(0) 编辑
摘要:You are given a complete directed graph KnKn with nn vertices: each pair of vertices u≠vu≠v in KnKn have both directed edges (u,v)(u,v) and (v,u)(v,u) 阅读全文
posted @ 2020-04-12 16:32 脂环 阅读(265) 评论(0) 推荐(1) 编辑
摘要:output standard output Polycarp has recently created a new level in this cool new game Berlio Maker 85 and uploaded it online. Now players from all ov 阅读全文
posted @ 2020-04-11 11:11 脂环 阅读(233) 评论(0) 推荐(0) 编辑
摘要:Alice has a cute cat. To keep her cat fit, Alice wants to design an exercising walk for her cat! Initially, Alice's cat is located in a cell (x,y)(x,y 阅读全文
posted @ 2020-04-01 19:45 脂环 阅读(360) 评论(0) 推荐(0) 编辑
摘要:Problem Statement Snuke has decided to play a game using cards. He has a deck consisting of NN cards. On the ii -th card from the top, an integer AiAi 阅读全文
posted @ 2020-03-29 00:30 脂环 阅读(248) 评论(0) 推荐(0) 编辑
摘要:The round carousel consists of nn figures of animals. Figures are numbered from 11 to nn in order of the carousel moving. Thus, after the nn -th figur 阅读全文
posted @ 2020-03-27 23:56 脂环 阅读(196) 评论(0) 推荐(0) 编辑
摘要:For the given integer nn (n>2n>2 ) let's write down all the strings of length nn which contain n−2n−2 letters 'a' and two letters 'b' in lexicographic 阅读全文
posted @ 2020-03-27 08:33 脂环 阅读(240) 评论(0) 推荐(0) 编辑
摘要:You are given two positive integers aa and bb. In one move you can increase aa by 11 (replace aa with a+1a+1). Your task is to find the minimum number 阅读全文
posted @ 2020-03-27 08:28 脂环 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Petya has a rectangular Board of size n×mn×m . Initially, kk chips are placed on the board, ii -th chip is located in the cell at the intersection of 阅读全文
posted @ 2020-03-25 00:40 脂环 阅读(305) 评论(0) 推荐(0) 编辑
摘要:You are given two integers nn and kk. Your task is to find if nn can be represented as a sum of kk distinct positive odd (not divisible by 22) integer 阅读全文
posted @ 2020-03-24 16:22 脂环 阅读(194) 评论(0) 推荐(0) 编辑
摘要:You are given a tree consisting of nn nodes. You want to write some labels on the tree's edges such that the following conditions hold: Every label is 阅读全文
posted @ 2020-03-15 23:08 脂环 阅读(192) 评论(0) 推荐(0) 编辑
摘要:You are given a positive integer xx . Find any such 22 positive integers aa and bb such that GCD(a,b)+LCM(a,b)=xGCD(a,b)+LCM(a,b)=x . As a reminder, G 阅读全文
posted @ 2020-03-15 17:54 脂环 阅读(282) 评论(0) 推荐(0) 编辑
摘要:You are given an array a1,a2,…,ana1,a2,…,an . Array is good if for each pair of indexes i<ji<j the condition j−aj≠i−aij−aj≠i−ai holds. Can you shuffle 阅读全文
posted @ 2020-03-10 01:48 脂环 阅读(205) 评论(0) 推荐(0) 编辑
摘要:You are given two integers nn and mm (m<nm<n). Consider a convex regular polygon of nn vertices. Recall that a regular polygon is a polygon that is eq 阅读全文
posted @ 2020-03-10 01:44 脂环 阅读(221) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩