随笔分类 -  Codeforces

上一页 1 ··· 6 7 8 9 10 11 下一页
摘要:D. Range = √Sum You are given an integer $n$. Find a sequence of $n$ distinct integers $a_1, a_2, \dots, a_n$ such that $1 \leq a_i \leq 10^9$ for all 阅读全文
posted @ 2022-11-28 20:55 onlyblues 阅读(186) 评论(0) 推荐(1)
摘要:C. Almost All Multiples Given two integers $n$ and $x$, a permutation$^{\dagger}$ $p$ of length $n$ is called funny if $p_i$ is a multiple of $i$ for 阅读全文
posted @ 2022-11-26 16:50 onlyblues 阅读(140) 评论(0) 推荐(0)
摘要:E. Binary Inversions You are given a binary array$^{\dagger}$ of length $n$. You are allowed to perform one operation on it at most once. In an operat 阅读全文
posted @ 2022-11-23 09:56 onlyblues 阅读(125) 评论(0) 推荐(0)
摘要:B. Elimination of a Ring Define a cyclic sequence of size $n$ as an array $s$ of length $n$, in which $s_n$ is adjacent to $s_1$. Muxii has a ring rep 阅读全文
posted @ 2022-11-21 16:33 onlyblues 阅读(126) 评论(0) 推荐(0)
摘要:G. Restore the Permutation A sequence of $n$ numbers is called permutation if it contains all numbers from $1$ to $n$ exactly once. For example, the s 阅读全文
posted @ 2022-11-20 16:59 onlyblues 阅读(139) 评论(0) 推荐(0)
摘要:E. Hanging Hearts Pak Chanek has $n$ blank heart-shaped cards. Card $1$ is attached directly to the wall while each of the other cards is hanging onto 阅读全文
posted @ 2022-11-18 20:31 onlyblues 阅读(67) 评论(0) 推荐(0)
摘要:D. Count GCD You are given two integers $n$ and $m$ and an array $a$ of $n$ integers. For each $1 \le i \le n$ it holds that $1 \le a_i \le m$. Your t 阅读全文
posted @ 2022-11-18 11:42 onlyblues 阅读(113) 评论(4) 推荐(1)
摘要:D. Knowledge Cards Pak Chanek, a renowned scholar, invented a card puzzle using his knowledge. In the puzzle, you are given a board with $n$ rows and 阅读全文
posted @ 2022-11-17 21:07 onlyblues 阅读(141) 评论(2) 推荐(0)
摘要:E. Cactus Wall Monocarp is playing Minecraft and wants to build a wall of cacti. He wants to build it on a field of sand of the size of $n \times m$ c 阅读全文
posted @ 2022-11-16 10:10 onlyblues 阅读(78) 评论(0) 推荐(0)
摘要:D. ConstructOR You are given three integers $a$, $b$, and $d$. Your task is to find any integer $x$ which satisfies all of the following conditions, o 阅读全文
posted @ 2022-11-15 20:02 onlyblues 阅读(113) 评论(4) 推荐(0)
摘要:B. Diverse Substrings A non-empty digit string is diverse if the number of occurrences of each character in it doesn't exceed the number of distinct c 阅读全文
posted @ 2022-11-14 21:21 onlyblues 阅读(174) 评论(0) 推荐(0)
摘要:D. Yet Another Problem You are given an array $a$ of $n$ integers $a_1,a_2,a_3, \ldots, a_n$. You have to answer $q$ independent queries, each consist 阅读全文
posted @ 2022-11-13 15:00 onlyblues 阅读(38) 评论(0) 推荐(0)
摘要:C. Swap Game Alice and Bob are playing a game on an array $a$ of $n$ positive integers. Alice and Bob make alternating moves with Alice going first. I 阅读全文
posted @ 2022-11-12 18:09 onlyblues 阅读(166) 评论(0) 推荐(0)
摘要:C1. Sheikh (Easy version) This is the easy version of the problem. The only difference is that in this version $q=1$. You are given an array of intege 阅读全文
posted @ 2022-10-28 14:31 onlyblues 阅读(89) 评论(0) 推荐(0)
摘要:D. Factorial Divisibility You are given an integer $x$ and an array of integers $a_1,a_2, \dots ,a_n$. You have to determine if the number $a_1!+a_2!+ 阅读全文
posted @ 2022-10-27 23:16 onlyblues 阅读(161) 评论(0) 推荐(1)
摘要:F. MEX vs MED You are given a permutation $p_1,p_2, \dots ,p_n$ of length $n$ of numbers $0, \dots ,n−1$. Count the number of subsegments $1 \leq l \l 阅读全文
posted @ 2022-10-26 11:35 onlyblues 阅读(144) 评论(0) 推荐(0)
摘要:E. FTL Monocarp is playing a video game. In the game, he controls a spaceship and has to destroy an enemy spaceship. Monocarp has two lasers installed 阅读全文
posted @ 2022-10-25 17:32 onlyblues 阅读(61) 评论(0) 推荐(0)
摘要:C1. Make Nonzero Sum (easy version) This is the easy version of the problem. The difference is that in this version the array can not contain zeros. Y 阅读全文
posted @ 2022-10-24 23:22 onlyblues 阅读(106) 评论(0) 推荐(0)
摘要:D1. Balance (Easy version) This is the easy version of the problem. The only difference is that in this version there are no "remove" queries. Initial 阅读全文
posted @ 2022-10-24 16:53 onlyblues 阅读(222) 评论(0) 推荐(0)
摘要:B. Ugu A binary string is a string consisting only of the characters $0$ and $1$. You are given a binary string $s_1 s_2 \dots s_n$. It is necessary t 阅读全文
posted @ 2022-10-24 15:32 onlyblues 阅读(121) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10 11 下一页
Web Analytics