STL
文章平均质量分 77
云淡风轻jzl
一路脚踏实地,不忘仰望星空。
展开
-
力扣2122-还原原数组-枚举+离散化
题目描述:Alice 有一个下标从 0 开始的数组 arr ,由 n 个正整数组成。她会选择一个任意的 正整数 k 并按下述方式创建两个下标从 0 开始的新整数数组 lower 和 higher :对每个满足 0 <= i < n 的下标 i ,lower[i] = arr[i] - k对每个满足 0 <= i < n 的下标 i ,higher[i] = arr[i] + k不幸地是,Alice 丢失了全部三个数组。但是,她记住了在数组 lower 和 higher 中原创 2022-01-01 18:03:23 · 3468 阅读 · 0 评论 -
Codeforces-Contest19-D.Points-线段树+set
题目描述:Pete and Bob invented a new interesting game. Bob takes a sheet of paper and locates a Cartesian coordinate system on it as follows: point (0, 0) is located in the bottom-left corner, Ox axis is directed right, Oy axis is directed up. Pete gives Bob原创 2021-04-09 16:53:00 · 177 阅读 · 0 评论 -
牛客3005E-最小表达式-大数运算
链接:https://ac.nowcoder.com/acm/contest/3005/E来源:牛客网题目描述:给出一个包含数字1-9和加号的字符串,请你将字符串中的字符任意排列,但每种字符数目不变,使得结果是一个合法的表达式,而且表达式的值最小。输出那个最小表达式的值合法的表达式的定义如下:一个数字,如233,是一个合法的表达式A + B是合法的表达式,当且仅当 A , B ...原创 2020-02-11 19:11:18 · 267 阅读 · 0 评论 -
牛客3005D-子段异或-前缀+map
链接:https://ac.nowcoder.com/acm/contest/3005/D来源:牛客网题目描述:输入一个数列a,你需要输出其中异或值为0的不同子段的数量。一个子段 [l,r] (1≤l≤r≤n)的异或值为al⊕al+1⊕al+2⊕…⊕ar,其中⊕符号代表异或运算。两个子段被视为相同的,当且仅当其开始和结束位置均对应相同。输入描述:第一行一个整数 n ,代表数列长度。第...原创 2020-02-11 18:58:51 · 243 阅读 · 0 评论 -
牛客3402B-麻烦的杰西-单调栈
题目描述:链接:https://ac.nowcoder.com/acm/contest/3402/B来源:牛客网圣诞节那一天,杰西收到一个圣诞蛋糕,不过这个蛋糕有点参差不齐,具体地说这个蛋糕是由n个小蛋糕拼起来的,每个小蛋糕长度为1,宽度为1,高度为hi。这对于“精致”的杰西来说是不能容忍的,所以她决定来“横切”蛋糕。具体地说:圣诞蛋糕放在水平面上,杰西先沿某一高度水平横切过去,再留下相同高...原创 2019-12-29 17:29:38 · 221 阅读 · 0 评论 -
CCF 201912-2 回收站选址
题目描述:学校内有n处垃圾,给定n处垃圾的坐标(xi,yi)。若垃圾A处的上下左右四处也存在垃圾,则A处可以被选为垃圾回收站,每个垃圾回收站还有四个位置:左上,左下,右上,右下,这四处每有一处存在垃圾,则回收站A的评分+1,回收站的评分可能为0、1、2、3、4。问每个评分的回收站数量。输入描述:第一行一个正整数n。接下来n行,每行一个二维坐标(xi,yi),表示此处有垃圾。坐标范围在1...原创 2019-12-18 09:03:24 · 1122 阅读 · 0 评论 -
CF 222C-Reducing Fractions-素数分解与复位
DescriptionTo confuse the opponents, the Galactic Empire represents fractions in an unusual format. The fractions are represented as two sets of integers. The product of numbers from the first set gi...原创 2019-11-06 08:21:49 · 529 阅读 · 0 评论 -
HihoCoder 1829-Tomb Raider-枚举+dfs+map
DescriptionLara Croft, the fiercely independent daughter of a missing adventurer, must push herself beyond her limits when she discovers the island where her father disappeared. In this mysterious is...原创 2019-09-03 09:12:46 · 218 阅读 · 0 评论 -
小花梨判连通-并查集+vector+map-“美登杯”上海市高校大学生程序设计邀请赛 (华东理工大学)
题目描述:小花梨给出原创 2019-05-19 10:06:02 · 228 阅读 · 0 评论 -
HDU 6695-Welcome Party-线段树+set二分
DescriptionThe annual welcome party of the Department of Computer Science and Technology is coming soon! Many students have been applying to show up at the welcome party, and every one of them can ch...原创 2019-08-21 20:28:59 · 357 阅读 · 0 评论