## ACM essential template - Number Theory

number theory Prime table Number of prime numbers with length i cnt [ 1 ] = 4 cnt [ 2 ] = 21 cnt [ 3 ] = 143 cnt [ 4 ] = 1061 cnt [ 5 ] = 8363 cnt [ 6 ] = 68906 cnt [ 7 ] = 586081 Prime table within 1000 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 17 ...

Posted by deeem on Wed, 01 Dec 2021 13:14:09 -0800

## SP6779 GSS7 - Can you answer these queries VII

Title Link: SP6779 GSS7 - Can you answer these queries VII General meaning Given a tree with n n A tree with n nodes, each node has a weight w i ( ...

Posted by Ghost_81st on Sat, 06 Nov 2021 13:27:50 -0700

## 2021.icpc network game 2

Leaking Roof Sign in General idea: given an n*n grid, the water volume of each grid is m, the water of the current grid will flow to the grid with common edges around and the height is strictly greater than the same amount. If and only if the height is 0, the water will flow out, and the final water volume of each grid is calculated. n<=50 ...

Posted by wwwapu on Wed, 20 Oct 2021 14:01:25 -0700

## [supplementary diary] CF#748 Div.3

Pro Codeforces Round #748 (Div. 3) Sol D2. Half of Same I thought of the positive solution during the game, but it took more space than the positive solution, so I didn't write it out. It's almost the same as D1, but it's not necessarily the smallest one. Therefore, the number of enumerations at each location should be the minimum. Then s ...

Posted by TomNomNom on Fri, 15 Oct 2021 11:36:33 -0700

## CF#744 Div.3 & 2020 ICPC Shenyang Station

Pro Codeforces Round #744 (Div. 3) The 2020 ICPC Asia Shenyang Regional Programming Contest Supplementary questions, not all questions, please see problem name Sol C. Ticks Forgot to look at this question during the match and enumerate each one ∗ * , see this ...

Posted by bobleny on Thu, 14 Oct 2021 10:58:10 -0700

## Valley tree DP (Foundation)

First 22 questions of Luogu tree DP (basic) xzy's tree dp problem list - problem list - Luogu | new ecology of Computer Science Education (luogu.com.cn) P1122 largest subtree and - Luogu | new ecology of Computer Science Education (luogu.com.cn) Topic meaning: delete the edge of a tree and judge the sum of the maximum weights of connected bl ...

Posted by Installer on Thu, 23 Sep 2021 02:05:46 -0700

## Codeforces Round #743 (Div. 2) (A~C)

Competition link: Click here to transfer Link to official solution: Click here to transfer 1573A Countdown topic link: Click here to transfer Meaning: There is a sequence, you have to change it all into 0. You can perform the following two operations to exchange elements in two positions, which is the last element minus one. Find the minim ...

Posted by fr0mat on Tue, 21 Sep 2021 03:38:55 -0700