1351

【LuoGu】1351 联合权值

# [NOIP2014 提高组] 联合权值 ## 题目描述 无向连通图 $G$ 有 $n$ 个点,$n-1$ 条边。点从 $1$ 到 $n$ 依次编号,编号为 $i$ 的点的权值为 $W_i$,每条边的长度均为 $1$。图上两点 $(u, v)$ 的距离定义为 $u$ 点到 $v$ 点的最短距离。对 ......
LuoGu 1351

[LeetCode] 1351. Count Negative Numbers in a Sorted Matrix 统计有序矩阵中的负数

Given a `m x n` matrix `grid` which is sorted in non-increasing order both row-wise and column-wise, return *the number of **negative** numbers in* `g ......
负数 矩阵 LeetCode Negative Numbers

nflsoj 1351 抓住奶牛

这题类似走迷宫,走迷宫是向四个方向进行拓展,而这道题好比是向三个方向拓展,分别是:$x+1,x-1,x×2$ 在这里拓展的时候我写了一个函数 `operation` 来计算拓展后的坐标 这里判断坐标是否合法的时候我取了最大值的两倍加5,因为坐标不一定在 $k$ 的左边,有可能超出去了再往回走,不过超 ......
奶牛 nflsoj 1351

macOS Big Sur 11.7.8 (20G1351) 正式版 ISO、PKG、DMG、IPSW 下载

macOS Big Sur 11.7.8 (20G1351) 正式版 ISO、PKG、DMG、IPSW 下载 **本站下载的 macOS 软件包,既可以拖拽到 Applications(应用程序)下直接安装,也可以制作启动 U 盘安装,或者在虚拟机中启动安装。另外也支持在 Windows 和 Lin ......
正式版 20G1351 macOS G1351 1351

[LeetCode] 1351. Count Negative Numbers in a Sorted Matrix

Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid. Exampl ......
LeetCode Negative Numbers Matrix Sorted

1351. 统计有序矩阵中的负数(leetcode)

https://leetcode.cn/problems/count-negative-numbers-in-a-sorted-matrix/ 1351. 统计有序矩阵中的负数 1.二分法:把每一行进行一遍二分,找到正数与负数的边界,且此时grid[i][mid]也为负数,即边界下标的对应值是负数的 ......
负数 矩阵 leetcode 1351
共6篇  :1/1页 首页上一页1下一页尾页