码迷,mamicode.com
首页 >  
搜索关键字:unique paths ii    ( 12050个结果
[CF1486F] Pairs of Paths
Problem 给定一棵树和若干个点对 \((u,v)\) 给出的树上最短路径,求满足 路径交仅有一个点 的 无序 路径对(即 \((a,b)\) 和 \((b,a)\) 算一次)。 Sol & Code 交仅为一个点只有两种情况:两条路径 LCA 在同一个点或不在同一个点。 分别计算。第一种使用容 ...
分类:其他好文   时间:2021-03-06 15:03:23    阅读次数:0
leedcode题目 :罗马数字转整数 Java
罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。 例如, 罗马数字 2 写做 II ,即为两个并列的 1。12 写做 XII ,即为 X + II 。 27 写做 XXVII, 即为 XX + V + II 通常情况下,罗马数字中小的数字在大的数字的右边。但也存在特例,例如 4 不 ...
分类:编程语言   时间:2021-03-06 14:42:50    阅读次数:0
python 3 解决 ERROR: Could not find a version that satisfies the requirement xxx 的问题
问题:pyhton 3安装module报错ERROR: Could not find a version that satisfies the requirement config.paths % pip install config.paths ERROR: Could not find a ve ...
分类:编程语言   时间:2021-03-03 11:48:53    阅读次数:0
210. Course Schedule II
问题: 给定编号为0~numCourses-1 的课程,以及课程的依赖关系prerequisites 其中prerequisites[i] = [ai, bi],ai之前必须先上了bi的课程。 bi->ai 若能够上完所有的课程,给出一个上课顺序。 否则,返回空数组。 Example 1: Inpu ...
分类:其他好文   时间:2021-03-01 13:28:27    阅读次数:0
树状数组
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef ...
分类:编程语言   时间:2021-02-27 13:27:43    阅读次数:0
107. Binary Tree Level Order Traversal II
问题: 给定二叉树,进行层序遍历,从底层向上输出。 Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[15,7],[9,20],[3]] Example 2: Input: root = [1] Output: [[1]] Exam ...
分类:其他好文   时间:2021-02-26 12:54:45    阅读次数:0
LeetCode - Unique Binary Search Trees
Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. Examp ...
分类:其他好文   时间:2021-02-20 12:13:36    阅读次数:0
算法图解——组合求和( Combination Sum)
组合求和( Combination Sum) 1. 题目描述 Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of ...
分类:编程语言   时间:2021-02-18 13:37:18    阅读次数:0
【哈希表】leetcode454——四数相加II
编号454:四数相加II 给定四个包含整数的数组列表 A , B , C , D ,计算有多少个元组 (i, j, k, l) ,使得 A[i] + B[j] + C[k] + D[l] = 0。 为了使问题简单化,所有的 A, B, C, D 具有相同的长度 N,且 0 ≤ N ≤ 500 。所有 ...
分类:其他好文   时间:2021-02-18 13:03:31    阅读次数:0
PAT A1119 Pre- and Post-order Traversals (30 分)
Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and ino ...
分类:其他好文   时间:2021-02-16 12:28:45    阅读次数:0
12050条   上一页 1 ... 8 9 10 11 12 ... 1205 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!