上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 40 下一页

2013年7月23日

MUTC2013 H-Park Visit-hdu4607

摘要: Park VisitTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 85Accepted Submission(s): 34Problem DescriptionClaire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N feature spots in the 阅读全文

posted @ 2013-07-23 19:07 电子幼体 阅读(222) 评论(0) 推荐(0) 编辑

2013年7月22日

模板NeverGiveUpNeverSurrenderTerribleTerribleDamage-PowerOverwhelming

摘要: NGUNSTTD-POName: NeverGiveUpNeverSurrenderTerribleTerribleDamage-PowerOverwhelmingUsage: Put it before main functionTags: 头文件 循环 常用语句/** head-file **/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include... 阅读全文

posted @ 2013-07-22 22:33 电子幼体 阅读(186) 评论(0) 推荐(0) 编辑

2013年7月21日

Topcoder SRM 585 DIV2 解题报告 //缺1000

摘要: ------------LISNumberDivTwo最小的连续递增子序列的个数。。。----从前往后扫描一遍即可。。#include #include #include #include using namespace std; class LISNumberDivTwo{ private: public: int calculate(vector seq) { int ans=0; int n=seq.size(); for (int i=0;i0)f[0]=... 阅读全文

posted @ 2013-07-21 22:50 电子幼体 阅读(155) 评论(0) 推荐(0) 编辑

Codeforces Round #192 (Div. 2) 解题报告 //缺E

摘要: ---------------A. CakeminatorrXc的蛋糕中有一些邪恶的草莓,如果某一行或某一列没有草莓我们可以吃掉这一排。问最多能吃多少蛋糕。----直接暴力寻找空行空列即可。#include #include using namespace std; const int maxn=21; char s[maxn][maxn]; bool v[maxn][maxn]; int r,c; int main() { memset(v,0,sizeof(v)); cin>>r>>c; for (int i=1;i>(s[i]+1); for ... 阅读全文

posted @ 2013-07-21 22:34 电子幼体 阅读(106) 评论(0) 推荐(0) 编辑

2013年7月16日

Codeforces Round #188 (Div. 2) 解题报告 //缺E

摘要: ----------------------------A. Even Odds将1到n中的奇数排到前面偶数排到后面,问第k个数是多少。----嗯。。。math#include #include #include using namespace std; typedef long long LL; LL n,d,k,m; int main() { cin>>n>>k; m=(n+1)/2; if (k #include #include #include #include using namespace std; typedef long long... 阅读全文

posted @ 2013-07-16 11:35 电子幼体 阅读(126) 评论(0) 推荐(0) 编辑

2013年7月13日

Codeforces Round #189 (Div. 2) 解题报告

摘要: ----------------A. Magic Numbers一个神奇的数字是由1、14、144连接而成的,判断一个数字是不是神奇数字。----①没有连续3个以上的4。②首位不能为4。数据范围太大,最好按字符读入。#include #include #include using namespace std; char c; int n,num; bool flag; int main() { flag=true; num=0; n=0; while (cin>>c) { if (n==0&&c!='1') { ... 阅读全文

posted @ 2013-07-13 20:17 电子幼体 阅读(184) 评论(0) 推荐(0) 编辑

Topcoder SRM 583 DIV2 解题报告

摘要: -----------------250SwappingDigits给一个数字串,要求交换两个数字的位置得到一个尽可能小的数字。(可以不交换)----从高位向低位枚举,对每一位,从低位向高位找一个比它小的数,若能找到则交换即答案。对首位不能为0进行特殊处理。#include #include #include using namespace std; class SwappingDigits{ private: public: string minNumber(string num) { int n=num.le... 阅读全文

posted @ 2013-07-13 17:45 电子幼体 阅读(233) 评论(0) 推荐(0) 编辑

2013年7月11日

Topcoder SRM 584 DIV2 解题报告

摘要: ------------250TopFox给两个字符串,求有多少种不同的前缀和。----直接枚举前缀,压入set即可。#include #include #include #include #include #include #include using namespace std; class TopFox{ public: int possibleHandles(string a,string b) { int ans; setst; for (int i=0;i... 阅读全文

posted @ 2013-07-11 11:40 电子幼体 阅读(180) 评论(0) 推荐(0) 编辑

2013年7月8日

Codeforces Round #191 (Div. 2) 解题报告

摘要: ------------A. Flipping Game有n个整数a1, a2, ..., an,每个整数只可能为0或1。选择一个区间[i, j](i #include #include #include using namespace std; const int INF=1e9; int a[111]={0}; int f[111]={0}; int n; int main() { int ans; int bas; while (cin>>n) { ans=-INF; bas=0; for (int... 阅读全文

posted @ 2013-07-08 18:20 电子幼体 阅读(171) 评论(0) 推荐(0) 编辑

2013年7月2日

详细解说 STL 排序(Sort)

摘要: 详细解说 STL 排序(Sort)一切复杂的排序操作,都可以通过STL方便实现!0 前言: STL,为什么你必须掌握对于程序员来说,数据结构是必修的一门课。从查找到排序,从链表到二叉树,几乎所有的算法和原理都需要理解,理解不了也要死记硬背下来。幸运的是这些理论都已经比较成熟,算法也基本固定下来,不需要你再去花费心思去考虑其算法原理,也不用再去验证其准确性。不过,等你开始应用计算机语言来工作的时候,你会发现,面对不同的需求你需要一次又一次去用代码重复实现这些已经成熟的算法,而且会一次又一次陷入一些由于自己疏忽而产生的bug中。这时,你想找一种工具,已经帮你实现这些功能,你想怎么用就怎么用,同时不 阅读全文

posted @ 2013-07-02 18:46 电子幼体 阅读(160) 评论(0) 推荐(0) 编辑

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 40 下一页

导航