码迷,mamicode.com
首页 >  
搜索关键字:positive    ( 2430个结果
hdu 2686 Matrix 最小费用最大流
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2686Yifenfei very like play a number game in the n*n Matrix. A positive integer number is put in each a...
分类:其他好文   时间:2015-03-12 13:04:42    阅读次数:164
hdu 5183 Negative and Positive (NP)(STL-集合【HASH】)
题意:When given an array(a0,a1,a2,?an?1)and an integerK, you are expected to judge whether there is a pair(i,j)(0≤i≤j st;ll ans,K;int n;int T;ll a[10000...
分类:其他好文   时间:2015-03-11 21:20:46    阅读次数:143
hdu 5183. Negative and Positive (哈希表)
Negative and Positive (NP)Time Limit: 3000/1500 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2177Accepted Submission(...
分类:其他好文   时间:2015-03-11 21:13:52    阅读次数:121
(hdu 简单题 128道)Lowest Bit(求一个数的二进制的最后一个非零位对应的十进制数)
题目:Lowest BitTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8722    Accepted Submission(s): 6428Problem DescriptionGiven an positive integer A ...
分类:其他好文   时间:2015-03-11 17:11:56    阅读次数:140
First Missing Positive
Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses constant spa...
分类:其他好文   时间:2015-03-10 10:26:23    阅读次数:136
leetcode_num168&171_excel title&number
Given a positive integer, return its corresponding column title as appear in an Excel sheet. class Solution { public: string convertToTitle(int n) { string s; while(n){ ...
分类:其他好文   时间:2015-03-10 00:14:37    阅读次数:188
[CF #236 (Div. 2) E] Strictly Positive Matrix(强联通分量)
题目:http://codeforces.com/contest/402/problem/E题意:给你一个矩阵a,判断是否存在k,使得a^k这个矩阵全部元素都大于0分析:把矩阵当作01矩阵,超过1的都当作1,那么a矩阵可表示一个有向图的走一次的连通性,则a^k表示有向图走K次的连通性。既然要求最后都...
分类:移动开发   时间:2015-03-09 23:48:38    阅读次数:210
hdu 5183-Negative and Positive (NP)
题目:大概意思就是给定一个序列a[0],a[1]....a[n-1]和一个整数k,问是否有这样的两个下标是的NP-Sum(i,j)=k,这里NP-Sum(i,j)=a[i]-a[i+1]+a[i+2]-...+(-1)^(j-1)*a[j]。 思路:我们可以维护这个序列的后缀和(前缀也是可以的),然后枚举sum[i]查看在set表中是否存在sum[j]=sum[i]-k。 这里要分成i...
分类:其他好文   时间:2015-03-09 22:33:42    阅读次数:195
【csapp读书笔记二】关于整数和浮点数的日常
PART I: IntegerThere are two types of integer : unsigned integer(only positive) & signed integer(positive,negative and 0)So how does a computer storag...
分类:移动开发   时间:2015-03-09 20:45:20    阅读次数:148
bc#32-2 Positive and Negative
http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?pid=1002&cid=570给定一个数组(a0,a1,a2,?an?1)和一个整数K, 请来判断一下是否存在二元组(i,j)(0≤i≤j#include#include#in...
分类:Windows程序   时间:2015-03-09 06:59:29    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!