先看下以下代码#includeusing namespace std;int x = 1;int
f1(){ x = 2; return x;}int f2(){ x = 3; return x;}int main(){ //Test1 cout
<< x << ...
分类:
其他好文 时间:
2014-05-10 01:07:57
阅读次数:
375
错误信息:HTTP Status 404 - There is no Action mapped
for namespace [/] and action name [updateUser!getUserByName] associated with
context path [/123shop].
分类:
其他好文 时间:
2014-05-09 18:04:52
阅读次数:
281
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
行编辑程序、括号匹配检验程序都是利用的栈的数据结构。而这两个
小程序也非常好的显示了栈先进后出的思想。由于程序本身很简短、清晰,所
以也就不做多的解释了,直接上代码了。
行编辑程序:
#include
#include
using namespace std;
int main()
{
stack sta;
char ch = getchar();
while(ch!=EOF)
...
分类:
其他好文 时间:
2014-05-04 18:55:11
阅读次数:
423
题目链接: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