随笔分类 - CF
摘要:1249E - By Elevator or Stairs? #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <
阅读全文
摘要:You play a computer game. In this game, you lead a party of mm heroes, and you have to clear a dungeon with nn monsters. Each monster is characterized
阅读全文
摘要:1283E - New Year Parties #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <map> #
阅读全文
摘要:1286A - Garland 玄学特判+贪心 #include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <map> #i
阅读全文
摘要:1296E1 - String Coloring (easy version) 因为只有两种颜色,只要可以排成两组非递减序列即可 #include <iostream> #include <vector> #include <algorithm> #include <string> #include
阅读全文
摘要:You wrote down all integers from 00 to 10n−110n−1, padding them with leading zeroes so their lengths are exactly nn. For example, if n=3n=3 then you w
阅读全文
摘要:原题 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 fig
阅读全文
摘要:You are given a tree consisting of nn vertices. A tree is a connected undirected graph with n−1n−1 edges. Each vertex vv of this tree has a color assi
阅读全文
摘要:恢复内容开始 D. Grid-00100 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A mad scientist Dr.J
阅读全文
摘要:You have unweighted tree of nn vertices. You have to assign a positive weight to each edge so that the following condition would hold: For every two d
阅读全文
摘要:Like any unknown mathematician, Yuri has favourite numbers: AA, BB, CC, and DD, where A≤B≤C≤DA≤B≤C≤D. Yuri also likes triangles and once he thought: h
阅读全文
摘要:You are given an array aa consisting of nn integers. Indices of the array start from zero (i. e. the first element is a0a0, the second one is a1a1, an
阅读全文
摘要:You have a given picture with size w×hw×h. Determine if the given picture has a single "+" shape or not. A "+" shape is described below: A "+" shape h
阅读全文
摘要:The only difference between easy and hard versions is constraints. You are given a sequence aa consisting of nn positive integers. Let's define a thre
阅读全文
摘要:Karl likes Codeforces and subsequences. He wants to find a string of lowercase English letters that contains at least kk subsequences codeforces. Out
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <map> #include <sstream> #includ
阅读全文
摘要:You are given nn strings a1,a2,…,ana1,a2,…,an: all of them have the same length mm. The strings consist of lowercase English letters. Find any string
阅读全文
摘要:Polycarp wrote on the board a string ss containing only lowercase Latin letters ('a'-'z'). This string is known for you and given in the input. After
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> #include <string> #include <set> #include <queue> #include <map> #include <sstream> #includ
阅读全文
摘要:Every person likes prime numbers. Alice is a person, thus she also shares the love for them. Bob wanted to give her an affectionate gift but couldn't
阅读全文

浙公网安备 33010602011771号