Linear Algebra 2.4 - 2.5 Partitioned Matrix & Factorization
Linear Algebra 2.4 - 2.5 Partitioned Matrix & Factorization Section 2.4 Partitioned Matrix Addition and Scalar Multiplication If matrices A,BA,BA,B are the same size and are partitioned in exactly the same way, then A+BA+BA+B and cAcAcA holds. Multiplication the partitions of AAA and BBB...
根号重构 + dsu on tree + 换根:CSP26-9 T5
根号分治 + dsu on tree + 换根:CSP26-9 T5 TUOJ 因为 m≤40m\le 40m≤40,我们考虑把颜色信息压缩成二进制。那一条路径合法当且仅当其路径异或和下有1个1。 设从根到每个点深度为 dud_udu,异或和为 sus_usu。考虑 u,vu,vu,v 和其LCA xxx,显然题目中两个限制条件转化为: du+dv−2dx≡0(modk)d_u+d_v-2d_x\equiv 0\pmod kdu+dv−2dx≡0(modk) su⊕sv⊕cx=2js_u\oplus s_v\oplus c_x=2^jsu⊕sv⊕cx=2j 我们考...
近期几道ABC的G题总结(473 - 476 )
近期几道ABC的G题总结 ABC476G:数位dp + 分治 + 贪心 先从分治的角度考虑两个区间怎么合并 我们考虑对于一个区间,我们如果从合并的角度来说,只关心每个上升子序列开头和结尾1的数量。所以这本质可以用两个数组来存。aia_iai 表示开头popcount为 iii 有多少个子序列,bib_ibi 代表结尾。中间怎么连不重要。 现在考虑两个区间合并。显然从贪心的角度考虑,我们希望用 b1i→a2jb_{1i}\to a_{2j}b1i→a2j 尽可能多 (i<ji<ji<j),那直接暴力贪心匹配即可。 我们现在回到原题,考虑数位dp。f(i,0/1,...
Linear Algebra 2.2 - 2.3 Inverse of Matrix
Linear Algebra 2.2 - 2.3 Inverse of Matrix Section 2.2 Inverse of Matrix An n×nn\times nn×n matrix AAA is said to be invertible if there is an n×nn\times nn×n matrix CCC such that : CA=I\and AC=I If we change \and to \or, it is also right. But it is not the definition. In this case is case, CCC ...
Linear Algebra : Chapter 2.1 Matrix Operations
Linear Algebra : Chapter 2 Chapter 2 Matrix Algebra Section 2.1 Matrix Operations diagonal entries : a1,1,a2,2,…a_{1,1},a_{2,2},\dotsa1,1,a2,2,… diagonal matrix : all nondiagonal entries are all zero Equal : two matrix are equal iff they have same size scalar multiple : rArArA Matrix Multi...
Linear Algebra - 4
Linear Algebra - 4 Section 1.8 Linear Transformations A transformation : T:Rn→RmT : \R^n\to \R^mT:Rn→Rm domain : Rn\R^nRn. codomain : Rm\R^mRm. T(x)T(x)T(x) is the image of xxx. The set of T(x)T(x)T(x) is called range. Matrix Transformation : x↦Axx\mapsto Axx↦Ax shear transformation: [1201]\begi...
PyCharm Install and Basic Use
PyCharm Install and Basic Use Install https://www.jetbrains.com/pycharm/download/ Two important : Add “bin” folder to PATH Associate .py to pycharm Start Coding Create Project : “New project”, choose location, keep the default Project venv Create a python file on the left windows Run Two ways...
Honors Calculus I - 2.1 Sequences
Honors Calculus I - 2.1 Sequences Sequences An infinite sequence {xn}\{x_n\}{xn} is converge to xxx (xxx is called the limit)iff: ∀ε>0, ∃N that ∀n≥N,∣xn−x∣<ε\forall \varepsilon > 0,\;\exist N\;\;\text{that}\;\forall n\ge N,|x_n-x|<\varepsilon ∀ε>0,∃Nthat∀n≥N,∣xn−x∣<ε If n...
Two Equation of Rocket
Two Equation of Rocket Start from: Pi=PfP_i = P_f Pi=Pf That : {Mv=−dM⋅U+(M+dM)(v+dv)v+dv=vrel+U⇒−Mdv=dMvrel\begin{cases} Mv = -dM \cdot U + (M+dM)(v+dv) \\ v+dv = v_{rel} + U \end{cases}\\ \Rightarrow -Mdv = dM v_{rel} {Mv=−dM⋅U+(M+dM)(v+dv)v+dv=vrel+U⇒−Mdv=dMvrel First rocket equation Dif...
Honors Physics I - 3 Momentum and Kinetic Energy
Honors Physics I - 3 Momentum and Kinetic Energy Center of Mass (com) The motion of the mass point is simple. And all other points rotate around this point. xcom=m2m1+m2d=m1x1+m2x2m1+m2x_{com}=\frac{m_2}{m_1+m_2}d=\frac{m_1x_1+m_2x_2}{m_1+m_2} xcom=m1+m2m2d=m1+m2m1x1+m2x2 For many par...













