https://www.gravatar.com/avatar/8f3abece0f8608ce4b9c1e3212fd1b72?s=240&d=mp

CF1391C-Cyclic Permutations

CF1391C-Cyclic Permutations 题目: 题目描述: A permutation of length $ n $ is an array consisting of $ n $ distinct integers from $ 1 $ to $ n $ in arbitrary order. For example, $ [2,3,1,5,4] $ is a permutation, but $ [1,2,2] $ is not a permutation ( $ 2 $ appears twice in the array) and $ [1,3,4] $ is also not

CF1391B-Fix You

CF1391B-Fix You 题目: 题目描述: Consider a conveyor belt represented using a grid consisting of $ n $ rows and $ m $ columns. The cell in the $ i $ -th row from the top and the $ j $ -th column from the left is labelled $ (i,j) $ . Every cell, except $ (n,m) $ , has a direction R (Right) or

CF1391A-Suborrays

CF1391A-Suborrays 题目: 题目描述: A permutation of length $ n $ is an array consisting of $ n $ distinct integers from $ 1 $ to $ n $ in arbitrary order. For example, $ [2,3,1,5,4] $ is a permutation, but $ [1,2,2] $ is not a permutation ( $ 2 $ appears twice in the array) and $ [1,3,4] $ is also not a

CF896C-Willem, Chtholly and Seniorious

CF896C-Willem, Chtholly and Seniorious 题目: 题目描述: — Willem… — What’s the matter? — It seems that there’s something wrong with Seniorious… — I’ll have a look… Seniorious is made by linking special talismans in particular order. After over 500 years, the carillon is now in bad condition, so Willem decides to examine it thoroughly. Seniorious has $ n $ pieces of talisman. Willem puts