- 2023-09-20[CF1819D] Misha and Apples
MishaandApples只能做做评分虚高的题了,头痛浪费了一节晚自习。但是为什么机房的同学们都觉得2500~2800算水题呢?最终的答案一定是\([S_1,S_x]\)被清空,\([S_{x+1},S_n]\)被全部放入集合。若\(\existsi\in[x+1,n],k_i=0\),答案为m,否则为\(\sum_{i=x+1}^nk_i\)。枚
- 2023-04-24Codeforces Round #285 (Div. 2) B. Misha and Changing Handles map 映射
MishahackedtheCodeforcessite.Thenhedecidedtoletalltheuserschangetheirhandles.Ausercannowchangehishandleanynumberoftimes.Buteachnewhandlemustnotbeequaltoanyhandlethatisalreadyusedorthatwasusedatsomepoint.Mish
- 2023-04-24Codeforces Round #285 (Div. 2) C. Misha and Forest
Let’sdefineaforestasanon-directedacyclicgraph(alsowithoutloopsandparalleledges).OnedayMishaplayedwiththeforestconsistingofnvertices.Foreachvertexvfrom0ton - 1hewrotedowntwointegers,degreevandsv,werethefirstinte
- 2022-09-20CF1720E Misha and Paintings 题解
神仙2700。首先统计出原数组中不同元素个数记作\(cnt\),如果\(cnt\lek\)说明元素个数不够,由于一次只能加一个颜色因此答案就是\(k-cnt\)。然后接下来要证明一个结论
- 2022-09-01CF1720E. Misha and Paintings
题意给出n*n的矩阵,ai,j∈[1,n*n],现在要矩形覆盖若干次,每次把一个正方形的ai,j改为x,求最少的次数使得最后有k种不同的数n<=500题解设sum为初始不同的数,若sum<k则显然只
- 2022-08-24Codeforces Round #815 (Div. 2) E. Misha and Paintings
人生中第一个AC的codeforces题,大概太难了,光是看答案就看了整整一下午,最后还是在b站上搜到讲解视频才明白的。俺们阿B真的是太厉害啦这道题首先容易看出当矩阵中数字个数