码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
BZOJ 1295 SCOI2009 最长距离 SPFA+暴力
题目大意:给定一个棋盘,一些格子上有障碍物,可以移除T个障碍物,求移除后所有能互相到达的点对中的最大欧几里得距离 m,n #include #include #include #include #include #define M 40 using namespace std; typedef pair abcd; const int dx[]={0,0,1,-1}; const int dy...
分类:其他好文   时间:2014-10-28 17:51:25    阅读次数:216
插入乘号问题(DP)
一、问题提出      在一个由n个数字组成的数字串中插入r个乘号(1      例如,对给定的数串847313926,如何插入r=5个乘号,使其积最大? 当给定乘号数量时首先考虑以枚举解题: 例如在7个数字之间插入三个乘号 #include #include using namespace std; string str; int s[10]; int t[10],...
分类:其他好文   时间:2014-10-28 17:49:28    阅读次数:249
线段树---HDU1754 I hate it
这个题也是线段树的基础题,有了上一个题的基础,在做这个题就显得比较轻松了,大体都是一样的,那个是求和,这个改成求最大值,基本上思路差不多,下面是代码的实现 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 const...
分类:其他好文   时间:2014-10-28 17:16:18    阅读次数:178
双链表(建立、删除、添加节点、打印)
#include #include #include #include #include using namespace std;typedef struct student{ int data; struct student *next; struct student *pre;...
分类:其他好文   时间:2014-10-28 17:16:12    阅读次数:232
C# 通过反射类动态调用DLL方法
网上看了很多关于反射的思路和方法,发现这个还算不错//使用反射方:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace C...
分类:Windows程序   时间:2014-10-28 17:11:18    阅读次数:236
Linux获取文件信息
项目中需要对文件进行处理并分析,首先需要根据要求找到该文件,比如最后修改的文件代码实现: 1 #include 2 #include 3 #include 4 5 #include 6 7 using namespace std; 8 9 int main(int argc, char...
分类:系统相关   时间:2014-10-28 17:01:27    阅读次数:191
随即选取主元的快速排序
1 #include 2 using namespace std; 3 #include 4 5 #define LEN 12 6 7 int QuickSort(int *arr,int start,int end); 8 int Sort(int *arr,int start,int ...
分类:编程语言   时间:2014-10-28 17:00:32    阅读次数:147
[Usaco2008 Mar]Cow Travelling游荡的奶牛[简单DP]
Description奶牛们在被划分成N行M列(2 #include#include#include#include#include#include#includeusing namespace std;int n,m,t,i,j,k,map[200][200],f[120][120][20],x1...
分类:其他好文   时间:2014-10-28 15:17:08    阅读次数:229
[Usaco2008 Mar]River Crossing渡河问题[简单DP]
DescriptionFarmer John以及他的N(1 #include #include #include using namespace std;int v[2501];int n,m;int f[2501]; int main(){ freopen("data.txt","r",stdin...
分类:其他好文   时间:2014-10-28 15:08:16    阅读次数:176
hdu1570(排列和组合公式的应用)
题意: 给出字符A;则求全排列 A(n,m)=n!/(n-m)! 给出字符C;则求全组合 C(n,m)=n!/(m!*(n-m)!) http://acm.hdu.edu.cn/showproblem.php?pid=1570 AC代码: #include using namespace std; long long f(int n){     long lon...
分类:其他好文   时间:2014-10-28 13:55:54    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!