- 博客(22)
- 资源 (16)
- 收藏
- 关注
原创 hdu 3700 cat
<br />Cat<br />Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 181 Accepted Submission(s): 52<br />Special Judge<br />Problem DescriptionThere is a cat, cat likes to sleep. <br />If he sleeps
2010-10-31 15:52:00 3064
原创 Second My Problem First HDOJ 5th Anniversary Contest 1007
Second My Problem FirstTime Limit: 12000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1272 Accepted Submission(s): 212Problem DescriptionGive you three integers n, A and B. Then we define Si = Ai mod B and Ti =
2010-10-31 15:49:00 2285 2
原创 无题
给定一个32bit的整数a。求另一个整数b,使得a和b的二进制序列互为逆序。 Condition 1. 假设a=10(000A)16,,则希望得到b=(5000)16。 #include"iostream"using namespace std;int a=10;int b=0;int i;int main(){ for(i=0;i<32;i++) {
2010-10-14 17:05:00 2249 4
原创 hdu 2844 DP 背包
Coins<br />Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 1070 Accepted Submission(s): 421<br /><br />Problem DescriptionWhuacmers use coins.They have coins of value A1,A2,A3...An Silverland
2010-10-12 13:20:00 3246
原创 DP 复习3题 hdu 2159 2577 1176
http://acm.hdu.edu.cn/showproblem.php?pid=2159#include#include#includeusing namespace std;#define N 105int dp[N][N];int n,m,k,s;struct MON{ int exp; int cost;}g[N];int solve(){ int i,j,t; memset(dp,0,sizeof(dp)); //dp[i]
2010-10-10 11:01:00 1885
原创 zoj 3410 Layton's Escape
<br />贪心:<br /> <br />1.先固定攻克trap的次序:按di升序排列<br /> <br />2.确定哪一步进行hp--:<br /> 设置队列存放状态,按排好序的依次入队,队列中按ti从大到小排列,当遇到total time>di的时候就将队头元素(ti花费最大的出队),并给hp++,这样必然时刻保持hp花费最小的,所以hp达到k时跳出<br /> <br />#include<iostream>#include<algorithm>#include<queue>#in
2010-10-09 09:38:00 2385
原创 zoj 3407 Doraemon's Cake Machine
<br />http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3407<br /> <br />由<br />x+y+z=m<br />2x(y+1)+z=n<br />得<br /> <br />2xy+2x+m-x-y=n<br />so 2xy+x-y+m>=xy-x-y+1<br /> <br />所以枚举x,y到sqrt(n)就好了<br /> <br />#include<iostream>#include<stdio.
2010-10-08 17:57:00 2404
原创 zoj 1149 双向dp
<br />本来想学四边形优化DP的,不小心学到了一个双向dp,耗时比优化了还少<br /> <br /> DividingTime Limit: 1 Second Memory Limit: 32768 KB <br />Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of th
2010-10-07 11:23:00 2731
原创 hdu 3076 ssworld VS DDD
<br />思路见http://blog.csdn.net/SwordHoly/archive/2010/10/06/5924212.aspx#1506053<br /> <br />比赛的时候想偏了,偏了好久……悲剧<br /> <br />#include<iostream>using namespace std;#define N 2005double a[7],b[7],dp[N][N];double pa,pb,ptie;int hp1,hp2;int main(){
2010-10-07 10:15:00 2223
原创 数学,需要细心
I Time limit: 5000MS Memory limit: 32768K<br />Total Submit: 49 Accepted: 18<br /><br />Program Source File: I.C, I.CPP<br /><br />A group of N Internet Service Provider companies (ISPs) use a private communication channel that has <br />a
2010-10-05 18:35:00 3024 1
原创 pku 3258 River Hopscotch
River HopscotchTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 2433 Accepted: 1064<br />Description<br />Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. Th
2010-10-05 18:10:00 2664
原创 模板[最长递增子序列] O(nlogn)
<br />acm<br /><br />SoutheasternEuropeanRegionalProgrammingContest<br />Bucharest,Romania<br />October18,2008<br /><br /><br /><br /> <br /> <br />ProblemA<br />StockExchange<br /> <br /> <br /> <br />InputFile:A.IN<br />OutputFile: standard output<br />P
2010-10-05 17:47:00 2279 1
原创 hdu 3398
思路很绝,是看解题报告的,把字符串组合问题改装为平面上走路模型,以下就是大牛的思路:题意:求由n个1、m个0组成,并且任意前缀中1的个数不少于0的个数的字符串的个数,并模20100501。分析:这题很赞,首先是模型的转化或者说是公式的推导,这里用到了一个非常巧妙的转化。①:我们设初始在坐标系的原点(0,0),从字符串第一位开始,碰到一个0就向上走,碰到一个1就向右走,那么由n个1、m个0组成的字符串最后必定走到(n,m)点,即满足由n个1、m个0组成的字符串的个数为C(n+m,n) = C(n+m,m) (
2010-10-05 10:36:00 3378 3
原创 模板[中国剩余定理]
//chu是除数,yu是余数//注意除数只能是素数#include #include using namespace std; int extended_euclid(int a, int b, int &x, int &y) { int d; if(b == 0) {x = 1; y = 0; return a;} d = extended_euclid(b, a % b, y, x); y -= a / b * x; ret
2010-10-04 15:00:00 2478
原创 hdu 1788
<br />讲的是中国剩余定理,事实上题目不需要的<br /> <br />求N%Mi==m-a;<br />即(n+a)%Mi==0<br />即求这组Mi的最小公倍数<br />注意要用__int64<br /> <br />#include <iostream> using namespace std; __int64 gcd( __int64 a, __int64 b ) { if(b==0) return a; return gcd(b,a%b);
2010-10-04 14:59:00 2105
原创 hdu 3415 单调队列1
<br />之所以取名为 单调队列1.是因为本来想做另外一道的,但是实在做不来……所以先铺垫一道题<br /> <br />看了别人的分析,很经典:<br /> <br />题目大意:给出一个有N个数字(-1000..1000,N<=10^5)的环状序列,让你求一个和最大的连续子序列。这个连续子序列的长度小于等于K。<br />分析:因为序列是环状的,所以可以在序列后面复制一段(或者复制前k个数字)。如果用s[i]来表示复制过后的序列的前i个数的和,那么任意一个子序列[i..j]的和就等于s[j]-s[i-
2010-10-03 16:29:00 2084
原创 hdu 3074
<br />线段树<br /> <br />#include <iostream>#include <algorithm>using namespace std;#define N 50005const int MOD = 1000000007;#define LL(x) ((x)<<1)//2x#define RR(x) ((x)<<1|1)//2x+1struct Seg_Tree{ int left,right,mid; __int64 num;
2010-10-03 13:17:00 1787
原创 模板[有向图的强连通分量] -hdu 3072
三重算法:一、 Kosaraju算法二、 Trajan算法三、 Gabow算法前两种马马虎虎刚学会把模板套上去对应题目:HDU 3072给你n个点,m条边,每条边有一个权值(传送message代价),已知强连通分支内部不需花费,求minimal cost步骤:1.缩点n->scc个点2.将到这scc个点的最小代价计算出来3.相加Trajan模板:#include#includeusing namespace std;#define min(x,y) x>y?y:x#def
2010-10-03 13:04:00 2860
原创 hdu 3069
ArrestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 194 Accepted Submission(s): 80Problem DescriptionCountry ALPC has n cities, and the cities are connected by undirected roads. Furthermore, ther
2010-10-03 08:37:00 2088
原创 hdu 3400
<br />所谓三分<br />上次在不知情的情况下无缘无故的用上了个三分,还以为是二分,今天知道了三分做了一下,搞得精度wa死了……<br /> <br />估计标准答案是用点分的,我是用距离/速度=时间分的,所以可能会有误差!<br /> <br />AC code:<br /> <br />#include<iostream>#include<cmath>using namespace std;#define eps 1e-6struct POINT{ double x,y
2010-10-02 09:55:00 1918
原创 hdu 3666 模板[求差分约束是否有解]
THE MATRIX PROBLEM<br />Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 787 Accepted Submission(s): 168<br /><br />Problem DescriptionYou have been given a matrix CN*M, each element E of CN*M
2010-10-01 13:20:00 2525 2
原创 hdu 3667 Transportation
Transportation<br />Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)<br />Total Submission(s): 205 Accepted Submission(s): 87<br /><br />Problem DescriptionThere are N cities, and M directed roads connecting them. Now
2010-10-01 10:59:00 2849 2
LR_Mnist.py
2015-01-07
deep learning 概览+时序模型
2014-05-29
Convolution Neural Network (CNN)
2014-05-15
人脸检测与识别
2014-03-16
决策树python实现
2014-03-10
KMeans和Kmedoid算法的matlab实现
2012-11-18
C++矩阵处理工具——Eigen3
2012-07-24
Difference of Gaussian DoG
2012-06-09
动态规划基础(初学者必读)
2009-10-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人