![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforces
名字在哪啊
没有简介
展开
-
Codeforces1342D - Multiple Testcases(后缀\思维)
DescriptionSo you decided to hold a contest on Codeforces. You prepared the problems: statements, solutions, checkers, validators, tests… Suddenly, your coordinator asks you to change all your tests to multiple testcases in the easiest problem!Initially,原创 2020-05-13 13:31:15 · 364 阅读 · 0 评论 -
Codeforces1335F - Robots on a Grid(倍增)
DescriptionThere is a rectangular grid of size n×m. Each cell of the grid is colored black (‘0’) or white (‘1’). The color of the cell (i,j) is ci,j. You are also given a map of directions: for each cell, there is a direction si,j which is one of the four原创 2020-05-12 12:13:23 · 325 阅读 · 0 评论 -
Codeforces1334E - Divisor Paths
DescriptionYou are given a positive integer D. Let’s build the following graph from it:each vertex is a divisor of D (not necessarily prime, 1 and D itself are also included);two vertices x and y (x>y) have an undirected edge between them if x is div原创 2020-05-12 09:46:59 · 295 阅读 · 0 评论 -
Codeforces1334D. Minimum Euler Cycle(贪心\模拟)
DescriptionYou are given a complete directed graph Kn with n vertices: each pair of vertices u≠v in Kn have both directed edges (u,v) and (v,u); there are no self-loops.You should find such a cycle in Kn that visits every directed edge exactly once (allo原创 2020-05-11 18:17:09 · 242 阅读 · 0 评论 -
Codeforces1332D. Walk on Matrix(构造/详解)
DescriptionBob is playing a game named “Walk on Matrix”.In this game, player is given an n×m matrix A=(ai,j), i.e. the element in the i-th row in the j-th column is ai,j. Initially, player is locate...原创 2020-04-27 14:46:44 · 196 阅读 · 0 评论 -
Codeforces1328F. Make k Equal(思维/前缀后缀)
DescriptionYou are given the array a consisting of n elements and the integer k≤n.You want to obtain at least k equal elements in the array a. In one move, you can make one of the following two oper...原创 2020-04-23 14:39:55 · 246 阅读 · 0 评论 -
CodeforcesE. Tree Queries(LCA)
DescriptionYou are given a rooted tree consisting of n vertices numbered from 1 to n. The root of the tree is a vertex number 1.A tree is a connected undirected graph with n−1 edges.You are given m...原创 2020-04-23 00:51:03 · 242 阅读 · 0 评论 -
Codeforces1327E - Count The Blocks(找规律/思维)
DescriptionYou wrote down all integers from 0 to 10n−1, padding them with leading zeroes so their lengths are exactly n. For example, if n=3 then you wrote out 000, 001, …, 998, 999.A block in an in...原创 2020-04-22 15:42:23 · 221 阅读 · 0 评论 -
Codeforces1327D. Infinite Path (图论/思维)
DescriptionYou are given a colored permutation p1,p2,…,pn. The i-th element of the permutation has color ci.Let’s define an infinite path as infinite sequence i,p[i],p[p[i]],p[p[p[i]]]… where all el...原创 2020-04-22 13:46:43 · 210 阅读 · 0 评论 -
Codeforces1327C - Game with Chips(思维/构造)
DescriptionPetya has a rectangular Board of size n×m. Initially, k chips are placed on the board, i-th chip is located in the cell at the intersection of sxi-th row and syi-th column.In one action, ...原创 2020-04-20 19:59:16 · 209 阅读 · 0 评论 -
Codeforces 1326D1/D2. Prefix-Suffix Palindrome (Easy version/Hard version)
DescriptionThis is the easy version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test cases. You can make hacks only if you solve all versions o...原创 2020-04-19 18:30:34 · 364 阅读 · 0 评论 -
Codeforces 1326C. Permutation Partitions
DescriptionYou are given a permutation p1,p2,…,pn of integers from 1 to n and an integer k, such that 1≤k≤n. A permutation means that every number from 1 to n is contained in p exactly once.Let’s co...原创 2020-04-19 12:35:38 · 1108 阅读 · 0 评论 -
Codeforces 1325D. Ehab the Xorcist(思维/构造)
DescriptionGiven 2 integers u and v, find the shortest array such that bitwise-xor of its elements is u, and the sum of its elements is v.InputThe only line contains 2 integers u and v (0≤u,v≤1018)...原创 2020-04-18 22:52:37 · 200 阅读 · 0 评论 -
Codeforces 1325C. Ehab and Path-etic MEXs(构造)
DescriptionYou are given a tree consisting of n nodes. You want to write some labels on the tree’s edges such that the following conditions hold:Every label is an integer between 0 and n−2 inclusive...原创 2020-04-18 21:59:18 · 231 阅读 · 0 评论 -
Codeforces 1324F. Maximum White Subtree(树形DP)
DescriptionYou are given a tree consisting of n vertices. A tree is a connected undirected graph with n−1 edges. Each vertex v of this tree has a color assigned to it (av=1 if the vertex v is white a...原创 2020-04-18 19:32:13 · 195 阅读 · 0 评论 -
Codeforces 1324E. Sleeping Schedule(DP)
DescriptionVova had a pretty weird sleeping schedule. There are h hours in a day. Vova will sleep exactly n times. The i-th time he will sleep exactly after ai hours from the time he woke up. You can...原创 2020-04-18 19:13:23 · 198 阅读 · 0 评论 -
Codeforces 1324D. Pair of Topics
DescriptionThe next lecture in a high school requires two topics to be discussed. The i-th topic is interesting by ai units for the teacher and by bi units for the students.The pair of topics i and ...原创 2020-04-18 18:57:22 · 220 阅读 · 0 评论