码迷,mamicode.com
首页 >  
搜索关键字:unique    ( 4837个结果
UVALive 5881 Unique Encryption Keys【线段树】
题目:UVALive 5881 Unique Encryption Keys 分类:线段树,想法题 题意:给出n个数,然后有q次查询,每次查询 l---r 区间内有没有重复的数,有的话输出任意的,没有的话输出ok 分析:上去一看觉得这个题目可以不用线段树做,因为它是静态的,想了一个方法后来发现时不对的,后来规规矩矩用线段树了。 这个题目不能直接用线段树,否则的话无法...
分类:其他好文   时间:2014-08-15 19:42:39    阅读次数:256
Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diag...
分类:其他好文   时间:2014-08-15 09:32:37    阅读次数:200
Unique Binary Search Tree II
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:其他好文   时间:2014-08-14 20:16:29    阅读次数:219
Yii CModel中rules验证 获取错误信息
在model中定义public function rules(){ return array( array('Name,Email','required'), array('Email','unique','message'=>'{value...
分类:其他好文   时间:2014-08-12 18:31:14    阅读次数:199
Unique Paths II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:其他好文   时间:2014-08-12 16:40:14    阅读次数:157
[LeetCode] Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example, [1,1,2] have the following unique pe...
分类:其他好文   时间:2014-08-12 10:17:03    阅读次数:142
[LeetCode] 4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic...
分类:其他好文   时间:2014-08-12 00:12:03    阅读次数:209
POJ 1679 The Unique MST(求最小生成树是否唯一)
The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:20430Accepted:7186DescriptionGiven a connected undirected graph, tell if its minim...
分类:其他好文   时间:2014-08-12 00:09:23    阅读次数:273
[LeetCode] 3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of ...
分类:其他好文   时间:2014-08-11 23:52:23    阅读次数:209
SQL 约束解说
SQL 约束解说2009-04-27 09:29约束主要包含:NOT NULL UNIQUE PRIMARY KEY FOREIGN KEY CHECK DEFAULT 1、not null :用于控制字段的内容一定不能为空(NULL)。 使用方法 :Create table MyTable ( i...
分类:数据库   时间:2014-08-11 20:55:42    阅读次数:270
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!