题目大意:给定一个棋盘,一些格子上有障碍物,可以移除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
一、问题提出
在一个由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
这个题也是线段树的基础题,有了上一个题的基础,在做这个题就显得比较轻松了,大体都是一样的,那个是求和,这个改成求最大值,基本上思路差不多,下面是代码的实现 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
网上看了很多关于反射的思路和方法,发现这个还算不错//使用反射方:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace C...
项目中需要对文件进行处理并分析,首先需要根据要求找到该文件,比如最后修改的文件代码实现: 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
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
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
题意:
给出字符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