2020(HNCPC)湖南省大学生程序设计竞赛editorial

A. 2020-substring

B. 2020-vs-2018

judge wether exist 1.

C. absolute-difference-equation

The problem is the simple version of the follow problem:
agc043B

D commutive-string-pair

不放设 ∣ b ∣ < ∣ a ∣ |b|<|a| b<a,则 a + b = b + a ⇒ a = b + x + b ⇒ a = x + b = b + x a+b=b+a\Rightarrow a=b+x+b\Rightarrow a=x+b=b+x a+b=b+aa=b+x+ba=x+b=b+x,对于一个字符串 a a a,枚举 x x x计算 b b b的数量。

E make-roundgod-very-happy

let l l l be the max x x x so that x < i x<i x<i and a x ≥ a i a_x\ge a_i axai,let r r r be the min x x x so that x > i x>i x>i and a x ≥ a i a_x\ge a_i axai,consider values to [ l , r ] [l,r] [l,r] from the position i i i

F mixed-radix-ntt

G odd-dmc-validation

consider n>=3,if a1&1=1 a2&2=0 a3&3=1 then (a1&1)=(a3&1) so that the answer always “no”.

H 矩阵并

用总面积减去交集面积。
let n=min(a,x2-1),m=min(b,y2-1)。
if a<x1||b<y1,the 交集面积 is 0.
else is ∑ i = a n ∑ j = b m ( x 2 − i ) ( y 2 − j ) = ∑ i = a n ∑ j = b m ( x 2 y 2 − i − j + i j ) ) \sum\limits_{i=a}^n\sum\limits_{j=b}^m(x_2-i)(y_2-j)=\sum\limits_{i=a}^n\sum\limits_{j=b}^m(x_2y_2-i-j+ij)) i=anj=bm(x2i)(y2j)=i=anj=bm(x2y2ij+ij))

I segment-colinear-triple

judge wether can choose any three node in vertice from L1 and L3,judge wether L2 vertice in the triange combine by the three node.

J spanning-tree-of-dynamic-weight-graph

K threshold-graph-spanning-trees

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页