1,C++中操作数组
#include
using namespace std;
int length(char []);
void output_frequency(char []);
int main()
{
char str[]="yan cong min";
cout<<"要处理的字符串为:"<<str<<endl;
cout<<"字符串长度为:"<<lengt...
分类:
编程语言 时间:
2014-05-05 13:29:30
阅读次数:
432
题目链接:http://poj.org/problem?id=1011
这道题用到了深搜+剪枝。
#include
#include
#include
using namespace std;
int a[65];
int vis[65];
int n;
int cmp(int x,int y)
{
return x>y;
}
int dfs(int len,int need,int ...
分类:
其他好文 时间:
2014-05-05 13:28:57
阅读次数:
290
题目:给定一个n*m大的纸张,上面表明了每块上的字母,在其背后给定了对应位置的字母的value,在最后给出需要剪出来的剪纸的字母序列。
方法:暴力搜索。
代码:
#include
#include
#include
#include
using namespace std;
char map[502][502];
int Map[502][502];
int vis[502][502...
分类:
其他好文 时间:
2014-05-05 12:53:36
阅读次数:
338
之前写的一篇数据库查询的一般写法:从登陆验证小案例中得到的一些启示和经验。是有点问题的。问题在于判断15分钟内密码错误的代码。原代码如下://使用using对SqlDataReader进行资源管理
using (SqlDataReader dr = cmd.Ex...
分类:
其他好文 时间:
2014-05-03 23:31:02
阅读次数:
399
using System.Collections.Generic;using
System.Collections.Specialized;using System.Linq;using System.Web;using
System.Text;using System.Web.Mvc;using ...
分类:
Web程序 时间:
2014-05-03 23:02:35
阅读次数:
492
@using (Ajax.BeginForm("GetTime","order",new
AjaxOptions() { Confirm="你确认这么做吗?", HttpMethod="post", ...
分类:
Web程序 时间:
2014-05-03 22:50:30
阅读次数:
344
LTC男人八题系列,测试数据之强真不是盖的。题目大意是在树上找出所有满足长度 2
#include 3 using namespace std; 4 5 6 #define FOR(p,i,s,t) for(__typeof(p) i=s;
it, Vs[eptr].l = this...
分类:
其他好文 时间:
2014-05-03 22:47:34
阅读次数:
419
在输入密码时,实现有限次密码输入的限制,如果三次都没有输入正确,程序将直接退出,不允许用户继续操作。
#include
#include
using namespace std;
int main()
{
string pwd;
int cLogin=0;
do
{
cout<>pwd;
if (pwd!="123")
{
...
分类:
编程语言 时间:
2014-05-03 17:45:26
阅读次数:
354
题目:经典dp题目,求出最大相邻子序列的和。
方法:给出两种方法,一种dp,一种直接暴力(数据量小的时候可以考虑)。
代码1:
#include
#include
using namespace std;
int main()
{
int n;
int t=1;
cin>>n;
int s[100010];
while(t<=n)
{
...
分类:
其他好文 时间:
2014-05-03 17:02:34
阅读次数:
324
VdcEye manager first version has been released, please read below document for using....
分类:
其他好文 时间:
2014-05-03 16:35:30
阅读次数:
397