码迷,mamicode.com
首页 >  
搜索关键字:determine    ( 2744个结果
UVA 11800 - Determine the Shape(计算几何)
题意:给定四个点,判断形状 思路:先求个凸包,就能把四个点排序,然后就是利用几何去判断,利用点积判垂直,利用叉积判平行 还有这题有个坑啊,明明说好是没有点共线的,其实是有的,所以求凸包如果不是4个点,直接输出不规则四边形即可 代码: #include #include #include #include #include using namespace std; const int...
分类:其他好文   时间:2015-03-05 17:01:47    阅读次数:157
C语言动态规划(8)___雇佣工人(HDU 1158)
Problem Description A project manager wants to determine the number of the workers needed in every month. He does know the minimal number of the workers needed in each month. When he hires or fires...
分类:编程语言   时间:2015-03-04 22:52:58    阅读次数:250
leetcode_num20_Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all va...
分类:其他好文   时间:2015-03-04 19:14:54    阅读次数:121
【LeetCode从零单排】No112 Path Sum
题目Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum = ...
分类:其他好文   时间:2015-03-04 16:53:52    阅读次数:108
Linked List Cycle
Linked List Cycle问题:Given a linked list, determine if it has a cycle in it.思路:快指针,慢指针方法我的代码:public class Solution { public boolean hasCycle(ListNod...
分类:其他好文   时间:2015-03-04 15:59:11    阅读次数:135
55. Jump Game Leetcode Python
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position.  Determine ...
分类:编程语言   时间:2015-03-03 09:58:55    阅读次数:134
[LeetCode]55.Jump Game
题目Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if you a...
分类:其他好文   时间:2015-02-28 23:05:45    阅读次数:276
Valid Sudoku
https://oj.leetcode.com/problems/valid-sudoku/Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partia...
分类:其他好文   时间:2015-02-28 21:32:40    阅读次数:223
Phone List
Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the ph...
分类:其他好文   时间:2015-02-27 21:25:48    阅读次数:121
Validate Binary Search Tree
https://oj.leetcode.com/problems/validate-binary-search-tree/Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is ...
分类:其他好文   时间:2015-02-27 21:24:37    阅读次数:143
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!