码迷,mamicode.com
首页 > 其他好文
HDU 3832 Earth Hour (最短路)
Earth HourTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 1518Accepted Submission(s): 607Problem ...
分类:其他好文   时间:2014-08-12 00:01:43    阅读次数:415
dsds
#include #include #include #include #include #include #define LL __int64#define N 210using namespace std;struct Line{ double x,y1,y2; int f;}line[N];s...
分类:其他好文   时间:2014-08-12 00:01:33    阅读次数:240
poj 2785
#include #include #define N 4000using namespace std;int a[N],b[N],c[N],d[N],ab[N*N],cd[N*N];int main(){int n,ans,i,j,k;while(scanf("%d",&n)!=EOF){ ...
分类:其他好文   时间:2014-08-12 00:01:13    阅读次数:240
正则表达式的元字符
利用Perl正则表达式还可以做另一件有用的事情,这就是使用各种元字符来搜索匹配。所谓元字符,就是用于构建正则表达式的具有特殊含义的字符,例如的“*”、“+”、“?”等。在一个正则表达式中,元字符不能单独出现,它必须是用来修饰原子的。如果要在正则表达式中包含元字符本身,使其失去特殊的含义,则必须在前面...
分类:其他好文   时间:2014-08-12 00:01:03    阅读次数:391
HLG1407Leyni的游戏【最小点权覆盖集】
大意:给你一个n行m列的矩阵1211每次操作可使一整行或一整列的一个数减少1(如果是0则不变)问最少多少次操作会使所有的数变为零分析:该题很像poj消灭外星人的那道题思路也差不很多将x轴当左集合,y轴当右集合,边权值为所在点的数字那么一条边就代表了矩阵中的一个点只要找出最小的权值去覆盖所有的边就能把...
分类:其他好文   时间:2014-08-12 00:00:43    阅读次数:263
PAT - IO - 螺旋方阵
所谓“螺旋方阵”,是指对任意给定的N,将1到N*N的数字从左上角第1个格子开始,按顺时针螺旋方向顺序填入NxN的方阵里。本题要求构造这样的螺旋方阵。输入格式:输入在一行中给出一个正整数N(<10)。输出格式:输出NxN的螺旋方阵。每行N个数字,每个数字占3位。输入样例:5输出样例:1 2 3 ...
分类:其他好文   时间:2014-08-12 00:00:23    阅读次数:251
dtv_driver.ko
替换dtv_driver.ko.步骤:shell@android:/#get_rootfs.shgrep-wboot/proc/partinfo|grep-opart..|grep-o'[1-9]*[0-9]$'cat/dev/block/mmcblk0p5>/cache/out/boot.imgs...
分类:其他好文   时间:2014-08-12 00:00:03    阅读次数:287
Partial least squares regression(偏最小二乘法回归)
偏最小二乘法(PLS)是近年来发展起来的一种新的多元统计分析http://en.wikipedia.org/wiki/Partial_least_squares_regression
分类:其他好文   时间:2014-08-11 23:59:53    阅读次数:437
rwkj 1430 二分查找
#includeusing namespace std;int n,k,a[10000];int binsearch(int low,int high){ int i,len,s;while(lowk) low=len+1; else if(s>n>>k) ...
分类:其他好文   时间:2014-08-11 23:59:43    阅读次数:415
配置Log4j(非常具体)
来自: http://www.blogjava.net/zJun/archive/2006/06/28/55511.htmlLog4J的配置文件(Configuration File)就是用来设置记录器的级别、存放器和布局的,它可接key=value格式的设置或xml格式的设置信息。通过配置,能够创...
分类:其他好文   时间:2014-08-11 23:59:23    阅读次数:555
hdu 2544
//2544 G++ #include #define N 201#define INF 100000 int g[N][N],bz[N],dist[N],s,t,n,m;void Dijkstra(int s){ int i,j,min,k,x; for (i=1;i#define...
分类:其他好文   时间:2014-08-11 23:59:03    阅读次数:439
2544 hdu
// 顶点从1 开始 floyed#include #define N 201#define INF 100000 int g[N][N],n,m;void floyed() { int i,j,k; for(k=1;kg[i][k]+g[k][j]) g[i][j]=g[i][k]+g[...
分类:其他好文   时间:2014-08-11 23:58:33    阅读次数:485
素数筛 模板
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 int prim[3000000]={2,3,5}; 8 //素数是分为基本素数{2,3}、阳素数{6N+1,N>=1}形式的、阴素数{6N-1,N>=1}形式的 ...
分类:其他好文   时间:2014-08-11 23:58:23    阅读次数:393
Fibonacci斐波拉契数列----------动态规划DP
n==10 20 30 40 50 46 体验一下,感受一下,运行时间#include int fib(int n){ if (nint fib(int n){ if (nint fib[50]={0,1}; //使用打表void in...
分类:其他好文   时间:2014-08-11 23:57:53    阅读次数:530
使用结构(C# 编程指南)
struct类型适于表示Point、Rectangle和Color等轻量对象。尽管使用自动实现的属性将一个点表示为类同样方便,但在某些情况下使用结构更加有效。例如,如果声明一个 1000 个Point对象组成的数组,为了引用每个对象,则需分配更多内存;这种情况下,使用结构可以节约资源。因为 .NET...
分类:其他好文   时间:2014-08-11 23:57:43    阅读次数:530
ZOJ - 2243 - Binary Search Heap Construction
先上题目:Binary Search Heap ConstructionTime Limit:5 Seconds Memory Limit:32768 KBRead the statement of problem G for the definitions concerning trees. In...
分类:其他好文   时间:2014-08-11 23:57:23    阅读次数:895
模板Dijkstra
#include #define N 205#define INF 10000000int g[N][N],bz[N],dist[N],s,t,n,m;void Dijkstra(int s){ int i,j,min,k,x; for (i=1;i<=n;i++) { d...
分类:其他好文   时间:2014-08-11 23:57:13    阅读次数:371
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!