随笔分类 -  题库—Codeforces比赛

上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要:You are given a rooted tree consisting of nn vertices numbered from 11 to nn . The root of the tree is a vertex number 11 . A tree is a connected undi 阅读全文
posted @ 2020-04-01 10:29 脂环 阅读(218) 评论(0) 推荐(0) 编辑
摘要:Vova had a pretty weird sleeping schedule. There are hh hours in a day. Vova will sleep exactly nn times. The ii -th time he will sleep exactly after 阅读全文
posted @ 2020-03-29 00:54 脂环 阅读(199) 评论(0) 推荐(0) 编辑
摘要:The next lecture in a high school requires two topics to be discussed. The ii -th topic is interesting by aiai units for the teacher and by bibi units 阅读全文
posted @ 2020-03-29 00:42 脂环 阅读(252) 评论(0) 推荐(0) 编辑
摘要:There is a frog staying to the left of the string s=s1s2…sns=s1s2…sn consisting of nn characters (to be more precise, the frog initially stays at the 阅读全文
posted @ 2020-03-29 00:35 脂环 阅读(373) 评论(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 脂环 阅读(197) 评论(0) 推荐(0) 编辑
摘要:A number is ternary if it contains only digits 00 , 11 and 22 . For example, the following numbers are ternary: 10221022 , 1111 , 2121 , 20022002 . Yo 阅读全文
posted @ 2020-03-27 08:45 脂环 阅读(205) 评论(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 脂环 阅读(241) 评论(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 脂环 阅读(208) 评论(0) 推荐(0) 编辑
摘要:E. Count The Blocks time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You wrote down all i 阅读全文
posted @ 2020-03-25 14:07 脂环 阅读(172) 评论(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 脂环 阅读(306) 评论(0) 推荐(0) 编辑
摘要:The King of Berland Polycarp LXXXIV has nn daughters. To establish his power to the neighbouring kingdoms he wants to marry his daughters to the princ 阅读全文
posted @ 2020-03-24 19:57 脂环 阅读(215) 评论(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 脂环 阅读(195) 评论(0) 推荐(0) 编辑
摘要:Once Petya read a problem about a bracket sequence. He gave it much thought but didn't find a solution. Today you will face it. You are given string s 阅读全文
posted @ 2020-03-18 20:44 脂环 阅读(284) 评论(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 脂环 阅读(193) 评论(0) 推荐(0) 编辑
摘要:Ehab has an array aa of length nn . He has just enough free time to make a new array consisting of nn copies of the old array, written back-to-back. W 阅读全文
posted @ 2020-03-15 18:04 脂环 阅读(213) 评论(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 脂环 阅读(283) 评论(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 脂环 阅读(207) 评论(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 脂环 阅读(222) 评论(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 form 阅读全文
posted @ 2020-03-08 15:53 脂环 阅读(218) 评论(0) 推荐(0) 编辑
摘要:You are given an array aa consisting of nn positive integers. Find a non-empty subset of its elements such that their sum is even (i.e. divisible by 2 阅读全文
posted @ 2020-03-08 14:39 脂环 阅读(198) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 下一页
点击右上角即可分享
微信分享提示
主题色彩