2014年1月7日

Maven 环境快速搭建二(eclipse+maven2+jetty)

摘要: http://www.cnblogs.com/fnng/archive/2011/12/16/2290587.html本文更新一个命令。第一节中提示创建一个项目用archetype:createcreate是个被废弃或不被推荐使用的插件,在以后创建项目中请尽量使用archetype:generate... 阅读全文

posted @ 2014-01-07 13:24 bug睡的略爽 阅读(194) 评论(0) 推荐(0) 编辑

maven环境快速搭建

摘要: http://www.cnblogs.com/fnng/archive/2011/12/02/2272610.html 最近,开发中要用到maven,所以对maven进行了简单的学习。因为有个maven高手在身边,所以,很快就上手了,我这里算是自我总结吧。关于maven是什么东东,请参考其它文章。-... 阅读全文

posted @ 2014-01-07 13:23 bug睡的略爽 阅读(165) 评论(0) 推荐(0) 编辑

1020 月饼 (25)

摘要: //PAT1020//先按价值高到低排序,然后贪心#include #include #include #include #include using namespace std;struct Species{ double stock; //存货 double total; //总价 do... 阅读全文

posted @ 2014-01-07 00:09 bug睡的略爽 阅读(297) 评论(0) 推荐(0) 编辑

1019 数字黑洞 (20)

摘要: //PAT1019#include #include #include #include using namespace std;void vector2i(vector& v, int& sum) //vector转整型{ sum = 0; for (int i=0; i& v, int& n)... 阅读全文

posted @ 2014-01-07 00:08 bug睡的略爽 阅读(707) 评论(0) 推荐(0) 编辑

1017 A除以B (20)

摘要: //PAT1017//模拟人工手算#include #include using namespace std;void div_string(const string& str, int n, string& quotient, int& remainder){ quotient.clear(); ... 阅读全文

posted @ 2014-01-07 00:07 bug睡的略爽 阅读(198) 评论(0) 推荐(0) 编辑

1016 部分A+B (15)

摘要: //PAT1016//通过字符串处理获取新整数字符串,然后转为整型#include #include #include #include using namespace std;int main(){ int a[2]; int cnt = 0; while ( cnt >str>>pstr; i... 阅读全文

posted @ 2014-01-07 00:07 bug睡的略爽 阅读(133) 评论(0) 推荐(0) 编辑

1014 福尔摩斯的约会 (20)

摘要: //PAT1014#include #include #include #include #include #include #include using namespace std;inline bool is_week(char ch){ return (ch >= 'A' && ch ='0'... 阅读全文

posted @ 2014-01-07 00:06 bug睡的略爽 阅读(939) 评论(0) 推荐(0) 编辑

1011 A+B和C (15)

摘要: //PAT1011//这题就是死磕自己....//考虑a,b同号溢出问题,若同号转a > c - b, 异号直接相加判断#include using namespace std;inline bool isSame(int a, int b){ return ( a > 0 && b > 0 ) |... 阅读全文

posted @ 2014-01-07 00:05 bug睡的略爽 阅读(267) 评论(0) 推荐(0) 编辑

1005 继续(3n+1)猜想 (25)

摘要: //PAT1005//题意:求出数列中不能被其他数覆盖的数,即关键数//方案:直接使用集合,将被覆盖的数均放入其中,最后遍历数列,若不在集合中,就说明是关键数#include #include #include #include #include using namespace std;void g... 阅读全文

posted @ 2014-01-07 00:04 bug睡的略爽 阅读(1773) 评论(0) 推荐(0) 编辑

1003 我要通过!(20)

摘要: //PAT1003//规则1和2是基本要求//规则3:aPbTc ==> aPbATca,那么可以逆推 aPbATca 到 aPbTc,直到 a'PATa' 这种形式,说明源字符串是符合要求的//详细说明:aPbTc,则b中每次减少一个A,c中减少a字符串,直到cPATd形式,若c==d,则... 阅读全文

posted @ 2014-01-07 00:03 bug睡的略爽 阅读(1586) 评论(0) 推荐(0) 编辑

导航