码迷,mamicode.com
首页 > 其他好文
01背包+卡精度 Hdu 2955
/* ————————————————————————————————————————————————————————————————————————————— author : Grant Yuan time : 2014.7.19 aldorithm: 01背包+卡精度 ——————————————————...
分类:其他好文   时间:2014-07-19 23:47:28    阅读次数:372
简单的dp hdu 数塔(水题)
数塔 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21314    Accepted Submission(s): 12808 Problem Description 在讲述DP算法的时候,一个经典的例子就是数塔问题,...
分类:其他好文   时间:2014-07-20 09:33:28    阅读次数:196
poj 2524 Ubiquitous Religions
Ubiquitous Religions Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 23262   Accepted: 11464 Description There are so many different religions in the world t...
分类:其他好文   时间:2014-07-19 23:35:28    阅读次数:321
Uploadify V3.2.1 上传文件报404 Not Found问题解决
今天用uploadify插件做文件上传的功能。当auto置为true的时候,怎么上传都没有问题。把auto置为了false,想让文件随表单一起上传,相同的代码,点击提交都却报404 not found!     很纳闷,这个路径明明是刚刚auto=true时的路径。     无奈现在的项目用Chrome访问没法跟踪自己写的js,也就进不了源码进行debug。google下这方面的原因,...
分类:其他好文   时间:2014-07-20 09:29:18    阅读次数:301
最长递增公共子序列
有奖征资源,博文分享有内涵      6月推荐文章汇总      CSDN博文大赛初赛晋级名单公布      【模板】最长递增公共子序列 分类: 【模板啊模板】 2013-08-01 18:13 262人阅读 评论(0) 收藏 举报 LICS模板 二维: [cpp] view plaincopy #include #...
分类:其他好文   时间:2014-07-20 00:05:39    阅读次数:386
最长递增的子序列(模板)
一般情况: [cpp] view plaincopy #include   #include   #include   using namespace std;    int a[1005],dp[1005],n;    int LIS()  {      int i,j,ans,m;      dp[1] = 1;      ans = 1;      for(i = 2...
分类:其他好文   时间:2014-07-20 09:28:19    阅读次数:280
最长公共子序列
[cpp] view plaincopy [cpp] view plaincopy #include #include #include using namespace std; char s1[1000],s2[1000]; int len1,len2,dp[1000][1000],mark[...
分类:其他好文   时间:2014-07-19 23:38:20    阅读次数:402
计算1的个数
__int64 CountOne(__int64 n) { __int64 count =0; if (n ==0) count =0; else if (n >1&& n <10) count =1; else { __int64 highest = n; __int64 bit =0; ...
分类:其他好文   时间:2014-07-19 23:27:20    阅读次数:307
bootstrap之PressKeyCode&&LongPressKeyCode
PressKeyCode package io.appium.android.bootstrap.handler; import com.android.uiautomator.core.UiDevice; import io.appium.android.bootstrap.AndroidCommand; import io.appium.android.bootstrap.Andr...
分类:其他好文   时间:2014-07-19 23:48:19    阅读次数:493
0 1背包模板
# include # include # include # define max(x,y) x>y?x:y; int v[1001];//价值 int w[1001];//重量 int dp[1001][1001]; int main() { int n,m; while(scanf("%d%d",&m,&n)!=EOF) { memset(dp,...
分类:其他好文   时间:2014-07-19 23:38:19    阅读次数:309
模板,BFS
#include #include #include using namespace std; struct node { int x,y,step; }; char map[105][105]; int vis[105][105]; int to[4][2]= {1,0,-1,0,0,1,0,-1}; int n,m,sx,sy,ex,ey,ans; int check(in...
分类:其他好文   时间:2014-07-19 23:11:19    阅读次数:330
全排列的实现
#include using namespace std; int n=0; template void Swap(T *a,T *b) {  T temp=*a;  *a=*b;  *b=temp; } template void Perm(T A[],int k,int m) {  if(k>m)  {   for(int i=0;i   {    cou...
分类:其他好文   时间:2014-07-20 00:12:42    阅读次数:250
素数筛选(模板)
#include int main() { int i,j,a[505]={0}; for(i=1;i<=500;i++) a[i]=1; for(i=2;i<=500;i++) if(a[i]) for(j=i+i;j<=500;j+=i) a[j]=0; for(i=2;i<=500;i++) if(a[i]) printf("%d ",i); p...
分类:其他好文   时间:2014-07-20 09:30:21    阅读次数:268
同余 模算术 中国剩余定理
相关知识点: 1、a≡b(modc),a,b关于模c同余  ,即a modc=b mod c , 等价于a%c=b 2、如果a,b互质(a,b)=1,则可得a关于模b的逆 ax≡1(modb)  3、关于余数的定理: 定理1 :如果被除数加上(或减去)除数的整数倍,除数不变,则余数不变。      定理2 :如果被除数扩大(或缩小)几倍,除数不变,则余数也扩大(或缩小)同样的倍数。...
分类:其他好文   时间:2014-07-20 00:26:08    阅读次数:314
在类库中使用MessageBox
“未声明“MessageBox”。它可能因其保护级别而不可访问。” 需要引用命名空间System.Windows.Forms...
分类:其他好文   时间:2014-07-20 00:01:29    阅读次数:357
欧几里得(模板)
int gcd(int n,int m)//n>m { //最大公约数 int r; while(m) { r = n%m; n = m; m = r; } return n; } int kgcd(int a,int b) { if(!a) return b; if(!b) retu...
分类:其他好文   时间:2014-07-19 23:37:19    阅读次数:309
[ACM] POJ 2418 Hardwood Species (Trie树或者map)
Hardwood Species Time Limit: 10000MS   Memory Limit: 65536K Total Submissions: 17986   Accepted: 7138 Description Hardwoods are the botanical group of trees that have b...
分类:其他好文   时间:2014-07-19 23:48:19    阅读次数:472
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!