
贪心
Devinxtw
毛毛虫蜕变记
展开
-
区间问题
区间相关问题包括: 1)最多不相交区间问题; 2)区间选点问题; 3)区间覆盖问题等。最多不相交区间问题(又叫选择不相交区间,最大不相交覆盖等等),是指数轴上有n个开区间(a,b),选择尽量多个区间,使得这些区间两两没有公共点。注意: 1)该问题也适用于闭区间[a,b],不过要加一条:如果一个区间的右端点和另一个区间的左端点重合,视为不相交。思路: 贪婪法。首先将n个区间按右端点b ...原创 2018-10-11 17:20:18 · 1363 阅读 · 0 评论 -
贪心之滑动窗口唯一的雪花
Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devised amachine that captures snowflakes as they fall, and serializes them into a stream of snowflakes that...原创 2018-10-17 22:20:25 · 274 阅读 · 0 评论 -
Amphiphilic Carbon Molecules极角排序、扫描线
Shanghai Hypercomputers, the world‘s largest computer chip manufacturer, has invented a new class of nanoparticles called Amphiphilic Carbon Molecules (ACMs). ACMs are semiconductors. It means that th...原创 2018-10-21 22:19:19 · 355 阅读 · 1 评论