P4357-[CQOI2016]K 远点对 题目: 题目描述: 已知平面内 $N$ 个点的坐标,求欧氏距离下的第 $K$ 远点对。 两个点 $P(x_1,y_1)$ 和 $Q(x_2,y_2)$ 的欧氏距离定义为 $\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$ 输入格式: 输入文件第一行为用空格隔开
CF1389G-Directing Edges 题目: 题目描述: You are given an undirected connected graph consisting of $ n $ vertices and $ m $ edges. $ k $ vertices of this graph are special. You have to direct each edge of this graph or leave it undirected. If you leave the $ i $ -th edge undirected, you pay $ w_i $ coins, and if you direct
CF1389F-Bicolored Segments 题目: 题目描述: You are given $ n $ segments $ [l_1, r_1], [l_2, r_2], \dots, [l_n, r_n] $ . Each segment has one of two colors: the $ i $ -th segment’s color is $ t_i $ . Let’s call a pair of segments $ i $ and $ j $ bad if the following two conditions are met: $ t_i \ne
CF1389D-Segment Intersections 题目: 题目描述: You are given two lists of segments $ [al_1, ar_1], [al_2, ar_2], \dots, [al_n, ar_n] $ and $ [bl_1, br_1], [bl_2, br_2], \dots, [bl_n, br_n] $ . Initially, all segments $ [al_i, ar_i] $ are equal to $ [l_1, r_1] $ and all segments $ [bl_i, br_i] $ are equal to $ [l_2, r_2] $ . In one step, you
CF1389E-Calendar Ambiguity 题目: 题目描述: Berland year consists of $ m $ months with $ d $ days each. Months are numbered from $ 1 $ to $ m $ . Berland week consists of $ w $ days. The first day of the year is also the first day of the week. Note that the last week of the year might be shorter than
CF1389C-Good String 题目: 题目描述: Let’s call left cyclic shift of some string $ t_1 t_2 t_3 \dots t_{n - 1} t_n $ as string $ t_2 t_3 \dots t_{n - 1} t_n t_1 $ . Analogically, let’s call right cyclic shift of string $ t $ as string $ t_n t_1 t_2 t_3 \dots t_{n - 1} $ . Let’s say string $ t