A - Red and Black There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. ...
分类:
其他好文 时间:
2020-01-23 13:54:42
阅读次数:
86
C. Nice Garland You have a garland consisting of nn lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is si ('R', 'G' and 'B ...
分类:
其他好文 时间:
2020-01-18 16:29:37
阅读次数:
90
D. Diverse Garland You have a garland consisting of n lamps. Each lamp is colored red, green or blue. The color of the ii-th lamp is si('R', 'G' and ' ...
分类:
其他好文 时间:
2020-01-18 14:30:27
阅读次数:
92
def colored_name(self): if self.状态 == 'Y': color_code = 'green' else: color_code = 'red' return format_html( '<span style="color:{};">{}</span>', colo ...
分类:
其他好文 时间:
2019-12-26 11:32:04
阅读次数:
97
简单搜索 红与黑: There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a ...
分类:
其他好文 时间:
2019-12-15 12:18:22
阅读次数:
88
点分治+线段树(过不去)。 把点分治换成DSU ON THE TREE 应该就能过了。 设S为∏(R[i]-L[i]+1),W[i]为(R[i]-L[i]+1)。 假设有一个点u,则它对答案的贡献为∑(disu + disv) * (S / (W[u] * W[v])),条件为u和v的区间有交。 把 ...
分类:
其他好文 时间:
2019-12-13 23:25:26
阅读次数:
102
本文首发于个人博客 "https://kezunlin.me/post/a201e11b/" ,欢迎阅读最新内容! colorwheel for colored print and trace for cpp programs <! more Guide install sudo wget O /u ...
分类:
编程语言 时间:
2019-12-13 09:19:29
阅读次数:
120
题目传送门 考试的时候又想到了小凯的疑惑,真是中毒不浅... 设每一个数都可以被分成若干个$k$和$k+1$的和。数$x$能够被分成若干个$k$和$k+1$的和的充要条件是:$x%k<=floor(x/k)$ 又因为$k$一定小于这个数列中最小的那个数,可以轻易想到的一个朴素的方法就是从$1$到$A ...
分类:
其他好文 时间:
2019-11-13 22:23:08
阅读次数:
97
2012 USAMO Problems/Problem 2 ProblemA circle is divided into 432 congruent arcs by 432 points. The points are colored in four colors such that some 1 ...
分类:
其他好文 时间:
2019-10-08 18:45:35
阅读次数:
107
Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the or ...
分类:
其他好文 时间:
2019-09-16 00:22:37
阅读次数:
110