码迷,mamicode.com
首页 >  
搜索关键字:algorithm trading    ( 11829个结果
hdu AC me
/* * hdu AC Me * date 2014/5/13 * state AC */ #include #include #include #include using namespace std; const int MAXN=100001; char Arr[MAXN]; int cnt[26]; int main() { //cout << "Hello wor...
分类:其他好文   时间:2014-05-15 06:16:24    阅读次数:247
SHA-1算法c语言实现
安全哈希算法(Secure Hash Algorithm)主要适用于数字签名标准 (Digital Signature Standard DSS)里面定义的数字签名算法(Digital Signature Algorithm DSA)。对于长度小于2^64位的消息,SHA1会产生一个160位的消息摘要。当接收到消息的时候,这个消息摘要可以用来验证数据的完整性。在传输的过程中,数据很可能会发生变化,...
分类:编程语言   时间:2014-05-15 05:42:58    阅读次数:641
[LeetCode] K sum(2Sum、3Sum、4Sum)
2Sum & 3Sum & 4Sum & KSum...
分类:其他好文   时间:2014-05-15 05:33:56    阅读次数:270
hdu how many prime numbers 筛选法求素数
/* * hdu How many prime numbers * date 2014/5/13 * state AC */ #include #include #include using namespace std; bool isPrime(int x) { int sqr=sqrt(x*1.0); for(int i=2;i<=sqr;i++) {...
分类:其他好文   时间:2014-05-15 05:07:18    阅读次数:261
【LeetCode】Search a 2D Matrix
题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer...
分类:其他好文   时间:2014-05-15 03:41:11    阅读次数:257
hdu 4635(强连通+缩点)
http://acm.hdu.edu.cn/showproblem.php?pid=4635 Strongly connected Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1381    Accepted Sub...
分类:其他好文   时间:2014-05-15 03:26:53    阅读次数:248
hdu 最小公倍数
/* * hdu 最小公倍数 * date 2014/5/13 * state AC */ #include using namespace std; int gcd(int x,int y) { while(x!=y) { if(x>y)x=x-y; else y=y-x; } return x; } int main() ...
分类:其他好文   时间:2014-05-14 14:29:59    阅读次数:225
欧几里德(辗转相除发)算法
辗转相除,又名欧几里德算法(Euclidean algorithm)乃求两个正整数之最大公约数的算法。此处用函数的递归调用编写了一个小程序:int gcd(int a,int b){ if(a%b==0) return b; else return gcd(b,a%b)...
分类:其他好文   时间:2014-05-14 10:20:27    阅读次数:241
Best Time to Buy and Sell Stock
原题: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of th...
分类:其他好文   时间:2014-05-13 14:12:41    阅读次数:342
Counting Inversion Pairs in an Array
Given an array, for example, 246135, an inversion pair is the pair whose first value is larger than its second value according to the sequence from left to right, (2,1) (4,1) (4,3) (6,1) (6,3) (6,5)....
分类:其他好文   时间:2014-05-13 08:03:58    阅读次数:338
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!