首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏MikeC's Blog

    【题解】Match Points

    给你一个在数轴上的点集x_1, x_2, \dots, x_n。每两个点i,j可以在满足以下情况的时候相连:

    1.9K20编辑于 2022-09-21
  • 来自专栏以终为始

    Magic Points ZOJ - 4032

    The 15th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple Magic Points ZOJ -

    21410编辑于 2023-03-09
  • 来自专栏饶文津的专栏

    【POJ 1981 】Circle and Points

    当两个点距离小于直径时,由它们为弦确定的一个单位圆(虽然有两个圆,但是想一想知道只算一个就可以)来计算覆盖多少点。

    45310发布于 2020-06-02
  • 来自专栏ml

    HDUOJ---The Moving Points

    The Moving Points Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 612    Accepted Submission(s): 250 Problem Description There are N points in total We want to know at what time that the largest distance between any two points would be minimum. We guarantee that no two points will move in exactly same speed and direction. For each test case, first line has a single number N (N <= 300), which is the number of points.

    70140发布于 2018-03-21
  • 来自专栏机器学习入门

    Reaching Points

    Reaching Points Problem: A move consists of taking a point (x, y) and transforming it to either (x,

    44940发布于 2019-05-26
  • 来自专栏Zaqdt_ACM

    CodeForces 940A Points on the line

           题意:给两个数n和d,然后输入n个数,问最少要删掉几个数才能让剩下的n个数的任意两个数相差不大于d

    49020发布于 2019-01-10
  • 来自专栏算法修养

    LeetCode 149 Max Points on a Line

    (int i=0;i<points.size();i++) { m2[make_pair(points[i][0],points[i][ 1])]++; mm =max(mm,m2[make_pair(points[i][0],points[i][1])]); } for(int i=0;i<points.size();i++) { for(int j=i+1;j<points.size double) (points[i][1] - points[j][1]) / (points[i][0] - points[j][0]); long double b ; if(points[i][0]-points[j][0]==0) b = points[i][0];

    42940发布于 2019-05-10
  • 来自专栏Reck Zhang

    LeetCode 0149 - Max Points on a Line

    Max Points on a Line Desicription Given n points on a 2D plane, find the maximum number of points that (); j++) { if(points[i].x == points[j].x && points[i].y == points[j].y) samePoints++; else if(points[i].x == points[j].x) mp[INT_MAX]++; else { long double slope = (long double) (points[j].y - points[i] .y) / (long double) (points[j].x - points[i].x); mp[slope]++; }

    30420发布于 2021-08-11
  • 来自专栏计算机视觉与深度学习基础

    Leetcode 149 Max Points on a Line

    Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. ) { unordered_map<double, int> mp; int res = 0; for(int i = 0; i < points.size (); j++) { if(points[i].x == points[j].x) { if(points[i].y == points[j].y) re++; else [i].y - points[j].y)/(points[i].x - points[j].x); mp[k]++; resp

    895100发布于 2018-01-12
  • 来自专栏二进制文集

    LeetCode 973 K Closest Points to Origin

    题目描述 We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclidean distance.) We only want the closest K = 1 points from the origin, so the answer is just [[-2,2]]. Note: 1 <= K <= points.length <= 10000 -10000 < points[i][0] < 10000 -10000 < points[i][1] < 10000 代码 public int[][] kClosest(int[][] points, int K) { if (points.length < K) return null; int[][]

    58440发布于 2019-02-25
  • 来自专栏亦枫的大佬之路

    webpack的入口起点(entry points)

    入口起点(entry point)指示 webpack 应该使用哪个模块,来作为构建其内部依赖图的开始。进入入口起点后,webpack 会找出有哪些模块和库是入口起点(直接和间接)依赖的。

    1.1K10发布于 2020-03-19
  • 来自专栏Some studies in imgs

    A method for detecting the positioning points on an answer sheet

    Therefore, the purpose of detecting the positioning points is to identify rectangles of the target size original image, which will reflect the issue of printing quality.The successfully identified positioning points

    19510编辑于 2025-10-15
  • 来自专栏yukong的小专栏

    到达终点 (Reaching Points)

    到达终点 (Reaching Points)' date: 2019-01-17 17:10:17 categories: leetcode tags: [leetcode,算法, java] -

    75140发布于 2019-01-28
  • 来自专栏搬砖记录

    10 Minimum Time Visiting All Points

    题目 On a plane there are n points with integer coordinates points[i] = [xi, yi]. Your task is to find the minimum time in seconds to visit all points. = [[3,2],[-2,2]] Output: 5 Constraints: points.length == n 1 <= n <= 100 points[i].length == 2 -1000 <= points[i][0], points[i][1] <= 1000 分析 题意:给定n个点,按n个点出现的顺序,将点(x,y)进行水平(x±1)、垂直(y±)或对角移动一个单位(x±1,y±1 for (int i = 1; i < points.length; ++i) { int[] cur = points[i], prev = points[i - 1];

    31530发布于 2021-08-18
  • 来自专栏CSDN旧文

    CodeForces - 1047B Cover Points

    Cover Points time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are n points on the plane, (x1,y1),(x2,y2),…,(xn,yn). You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a

    64430发布于 2020-10-28
  • 来自专栏丑胖侠

    java.lang.NumberFormatException: multiple points 异常

    部分程序报下面异常: java.lang.NumberFormatException: multiple points 带着疑惑搜索解决方案,并查看项目代码,结果发现自己有些优化真是好心办坏事。

    1K40编辑于 2022-05-06
  • 来自专栏Linux内核深入分析

    Linux电源管理-Operating Performance Points(OPP)

    什么是Operating Performance Points? 如今复杂的Soc由多个并行工作的子模块组成。在一个执行各种用例的操作系统中,不是Soc中的所有模块都一直以其最高的执行频率工作。 将域中每个设备支持的电压和频率的离散元组的集合称为Operating Performance Points(OPP)。 Operating Performance Points Library OPP library提供了一系列辅助函数去管理和查询设备的OPP信息。 opp在dt中的格式: cpu@0 { compatible = "arm,cortex-a9"; reg = <0>; next-level-cache = <&L2>; operating-points (dev, "%s: Failed to add OPP %ld\n", __func__, freq); nr -= 2; } return 0; } 找到operation-points

    3K20发布于 2020-03-24
  • 来自专栏SnailTyan

    K Closest Points to Origin

    Version 1 class Solution: def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: n = len(points) distances = [0] * n for index, (x, y) in enumerate(points): x * x + y * y indexes = sorted(list(range(n)), key=lambda i: distances[i]) return [points [i] for i in indexes[:k]] # return sorted(points, key=lambda x: x[0] * x[0] + x[1] * x[1])[:k ] Reference https://leetcode.com/problems/k-closest-points-to-origin/

    35420发布于 2021-08-13
  • 来自专栏SnailTyan

    Maximum Number of Points with Cost

    Solution **解析:**Version 1,先假设points[i][j]取最大值的上一行数值位于第j列的左侧或右侧,然后分别求第j列的上一行左侧最大值以及右侧最大值,points[i][j]的最大值为其上一行左侧最大值及右侧最大值中较大的一个与其相加 Version 1 class Solution: def maxPoints(self, points: List[List[int]]) -> int: m = len(points ) n = len(points[0]) left = [0] * n right = [0] * n for i in range(1, for j in range(n): points[i][j] = points[i][j] + max(left[j], right[j]) return max(points[m-1]) Reference https://leetcode.com/problems/maximum-number-of-points-with-cost/

    61720发布于 2021-08-06
  • 来自专栏细嗅蔷薇

    序列合并问题(基于two points

    步骤 可以根据two points的思想,设置两个下标 i 和 j ,初值为0,表示分别指向序列A和B各自的第一个元素。 while(j < m) C[index++] = B[j++]; return index; } 版权所有:可定博客 © WNAG.COM.CN 本文标题:《序列合并问题(基于two points

    58910发布于 2020-04-20
领券