http://acm.hdu.edu.cn/showproblem.php?pid=1598
1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6
const int inf=1<<30; 7...
分类:
其他好文 时间:
2014-05-05 10:53:38
阅读次数:
344
http://acm.hdu.edu.cn/showproblem.php?pid=1599floyd找最小环。 1 #include 2 #include 3
#include 4 #define maxn 200 5 using namespace std; 6 const int inf...
分类:
其他好文 时间:
2014-05-05 10:52:15
阅读次数:
315
#include "stdafx.h"#include "windows.h"#include
using namespace std;int _tmain(int argc, _TCHAR* argv[]){ STARTUPINFO si;
PROCESS_INFORMATION...
分类:
其他好文 时间:
2014-05-05 10:31:18
阅读次数:
412
1.扩展方法:必须写在一个静态类里面,具体见代码:namespace
ConsoleApplication1{ class Program { static void Main(string[] args) { Student s
= n...
分类:
其他好文 时间:
2014-05-05 09:47:04
阅读次数:
431
这个方程有两种形式,本文采用if(s[i]=s[j])
dp[i][j]=d[i-1][j-1] dp[i][j]=min(dp[i][k]+dp[k+1][j],dp[i][j])
(i=#include#includeusing namespace std;#define min(x,y) (x...
分类:
其他好文 时间:
2014-05-05 09:33:02
阅读次数:
544
using System;using
System.Collections.Generic;using System.Linq;using System.Text;using
System.Web;using System.Collections.Specialized;namespace NewX...
分类:
Web程序 时间:
2014-05-04 19:04:08
阅读次数:
437
行编辑程序、括号匹配检验程序都是利用的栈的数据结构。而这两个
小程序也非常好的显示了栈先进后出的思想。由于程序本身很简短、清晰,所
以也就不做多的解释了,直接上代码了。
行编辑程序:
#include
#include
using namespace std;
int main()
{
stack sta;
char ch = getchar();
while(ch!=EOF)
...
分类:
其他好文 时间:
2014-05-04 18:55:11
阅读次数:
423
#include "stdafx.h"
#include
#include
#include
using namespace msclr::interop;
using namespace System;
int main(array ^args)
{
// 为了可以打印wstring到控制台
std::wcout.imbue(std::locale("chs"));
// 声明...
分类:
编程语言 时间:
2014-05-04 18:30:58
阅读次数:
418
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1015
深搜简单题
代码如下:
#include
#include
#include
#include
using namespace std;
string a;
int t;
int v,w,x,y,z;
int vis[20];
int b[6];
int flag;
int cmp(int...
分类:
其他好文 时间:
2014-05-04 18:09:00
阅读次数:
352
题意:
给定n个物品 m元,k种商品
下面n行 tpye w v 表示物品的牌子,价格,价值(每个物品只有1件)
问:每个牌子至少买一件能获得的最大价值是多少
思路:分组背包
#include
#include
#include
#include
#include
using namespace std;
#define ll int
ll n, m, k;
l...
分类:
其他好文 时间:
2014-05-04 18:03:15
阅读次数:
248