CF1394C-Boboniu and String 题目: 题目描述: Boboniu defines BN-string as a string $ s $ of characters ‘B’ and ‘N’. You can perform the following operations on the BN-string $ s $ : Remove a character of $ s $ . Remove a substring “BN” or “NB” of $ s $ . Add a character ‘B’ or ‘N’ to the end of $ s $
CF1394A-Boboniu Chats with Du 题目: 题目描述: Have you ever used the chat application QQ? Well, in a chat group of QQ, administrators can muzzle a user for days. In Boboniu’s chat group, there’s a person called Du Yi who likes to make fun of Boboniu every day. Du will chat in the group for $ n $ days. On the $ i $ -th
CF1395C-Boboniu and Bit Operations 题目: 题目描述: Boboniu likes bit operations. He wants to play a game with you. Boboniu gives you two sequences of non-negative integers $ a_1,a_2,\ldots,a_n $ and $ b_1,b_2,\ldots,b_m $ . For each $ i $ ( $ 1\le i\le n $ ), you’re asked to choose a $ j $ ( $ 1\le j\le m $ ) and let $
CF1395B-Boboniu Plays Chess 题目: 题目描述: Boboniu likes playing chess with his employees. As we know, no employee can beat the boss in the chess game, so Boboniu has never lost in any round. You are a new applicant for his company. Boboniu will test you with the following chess question: Consider a $ n\times m $ grid (rows are numbered from $ 1 $
CF1395A-Boboniu Likes to Color Balls 题目: 题目描述: Boboniu gives you $ r $ red balls, $ g $ green balls, $ b $ blue balls, $ w $ white balls. He allows you to do the following operation as many times as you want: Pick a red ball, a green ball, and a blue ball and then change their color to white. You should
CF1299C-Water Balance 题目: 题目描述: There are $ n $ water tanks in a row, $ i $ -th of them contains $ a_i $ liters of water. The tanks are numbered from $ 1 $ to $ n $ from left to right. You can perform the following operation: choose some subsegment $ [l, r] $ ( $ 1\le l \le r \le n