Analytical properties + permutation rings + minimum cut: 1024T4

http://cplusoj.com/d/senior/p/SS231024D It is equivalent to selecting some replacement rings to perform a displacement. We consider only replacing A. For a ring of size > 1, if you shift it, you can definitely make the bits completely different. So if we permute B, what is the significance of the permutation? It counts the positions of self-loops […]

[Algorithm Training-Backtracking Algorithm 1] [Permutation Problem] Full Permutation, Full Permutation II

Without further ado, just shout a slogan to encourage yourself: Programmers will never be unemployed, programmers go to architecture! The theme of this blog is [Backtracking Algorithm], which is implemented using the basic data structure [array]. The website for this high-frequency question is: CodeTop, and the filtering conditions are: Target company + Last year + […]

C. AquaMoon and Permutations

Table of Contents 1.Problem 2.Input 3.Output 4.Examples 4.1input 4.2output 5.Code 6.Conclusion 1.Problem Cirno has prepared nn arrays of length nn each. Each array is a permutation of nn integers from 11 to nn. These arrays are special: for all 1≤i≤n1≤i≤n, if we take the ii-th element of each array and form another array of length […]

A peek at the ingenious combination of the depth-first search (DFS) algorithm and Java internal classes: solving the full permutation problem

1. Introduction: Solve this question in AcWing: 823. Arrangement In this question, an integer n is given, and the numbers 1 to n are required to be arranged in a row, and all arrangements are output in lexicographic order. This questionmainly examines the application of total permutation and lexicographic order, and is solved through the […]

P9578「Cfz Round 1」Permutation

Go to Luogu to read my blog Ideas We need to try to minimize the maximum value minus the minimum value of the sum of two adjacent numbers. First think about how to minimize the maximum value. for n n n, minimum must be placed on both sides 1 1 1 and 2 2 2. […]

CF1872D Plus Minus Permutation

Go to Luogu to read my blog Ideas Another CF scam question. for x x The number selected by x is enlarged as much as possible. For y y We try to make the number selected by y as small as possible, but it may be x x x and y y Just put the […]

Weekly competition 362 (difference array, brain twisting, full permutation, matrix fast power optimization DP)

Article directory Weekly competition 362 [2848. Points that intersect with cars](https://leetcode.cn/problems/points-that-intersect-with-cars/) difference array [2849. Determine whether a cell can be reached at a given time](https://leetcode.cn/problems/determine-if-a-cell-is-reachable-at-a-given-time/) Brain twisting [2850. Minimum moves to spread stones over grid](https://leetcode.cn/problems/minimum-moves-to-spread-stones-over-grid/) Full array of enumerations [2851. String transformation](https://leetcode.cn/problems/string-transformation/) KMP + matrix fast power optimization DP Weekly Competition 362 2848. Point of […]