摘要: /*TASK:gift1LANG:C++*/#include#include#includeusing namespace std;class Person{private: string name; int rec; int give;public: Person(){ this->rec=0; this->give=0; } string getName(){ return this->name; } int getRev(){ return this->rec; } int... 阅读全文
posted @ 2013-07-13 20:44 开心成长 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Dynamic ProgrammingGreedyComplete SearchFlood FillShortest PathRecursive Search TechniquesMinimum Spanning TreeKnapsackComputational GeometryNetwork FlowEulerian PathTwo-Dimensional Convex HullBigNumsHeuristic SearchApproximate SearchAd Hoc Problems 阅读全文
posted @ 2013-07-13 19:14 开心成长 阅读(176) 评论(0) 推荐(0) 编辑
摘要: /*PROG:rideLANG:C++*/#include#include #includeusing namespace std;int main(int argc, char **argv){ ifstream ifs("ride.in"); ofstream ofs("ride.out"); string cname=""; string gname=""; char ch; int num=0; int sum1=1; int sum2=1; ifs>>cname; //getline(ifs, 阅读全文
posted @ 2013-07-13 15:20 开心成长 阅读(287) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;int main(){ofstream ofs("text.out");ifstream ifs("text.in");int a,b;ifs>>a>>b;ofsmain () { FILE *fin = fopen ("test.in", "r"); FILE *fout = fopen ("test.out", "w"); int a, b; fscanf (f 阅读全文
posted @ 2013-07-13 10:32 开心成长 阅读(305) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/shujudeliu/article/details/7861296有图,很直观哦 阅读全文
posted @ 2013-06-10 17:55 开心成长 阅读(157) 评论(0) 推荐(0) 编辑
摘要: private String name; @Column(nullable=false) private String press;//@Column(nullable=false)表示是限制name不为空,而不是限制press框架使用流程:1、先编写自己的类Book.java2、在applicationContext.xml中修改数据库名、用户名、密码3、对于首页的add.jsp,在BookController.java中编写对应的GET、POST方法,其中GET方法是处理输入的链接,最后mv.setViewName("\add")使add.jsp执行,添加完成由... 阅读全文
posted @ 2013-06-09 16:45 开心成长 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 我用的是apache-tomcat-7.0.29;将其lib下面的jsp-api.jar和servlet-api.jar拷进项目的web-inf/lib下面即可。 阅读全文
posted @ 2013-06-09 10:45 开心成长 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<fstream>using namespace std;int main(){ char outfile[50]; ofstream out; cout<<"请输入文件存储目录:"<<endl; cin>>outfile; out.open(outfile); if(out.fail()) { cout<<"找不到该文件目录!"<<endl; exit(1); } out<<"我很好!" 阅读全文
posted @ 2013-04-14 17:24 开心成长 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 对于缺省参数,只需要在函数声明时写上它,函数定义时就不要带上了 阅读全文
posted @ 2013-04-08 20:19 开心成长 阅读(2117) 评论(0) 推荐(0) 编辑
摘要: #include <string>#include <iostream>using namespace std;int main(){char str[] ="efsa efsb sefsc"; char *pch; pch = strtok (str," "); while (pch != NULL) { cout<<pch<<endl; pch = strtok (NULL, " "); } return 0;}输出:efsaefsbsefsc 阅读全文
posted @ 2013-04-06 20:47 开心成长 阅读(6623) 评论(0) 推荐(0) 编辑