
Topcoder SRM
文章平均质量分 74
cyendra
Azarath Metrion Zinthos
展开
-
Topcoder SRM 584 DIV2 解题报告
------------250 TopFox给两个字符串,求有多少种不同的前缀和。----直接枚举前缀,压入set即可。#include #include #include #include #include #include #include using namespace std;class TopFox{ public: in原创 2013-07-11 11:40:57 · 812 阅读 · 0 评论 -
Topcoder SRM 583 DIV2 解题报告
-----------------250 SwappingDigits给一个数字串,要求交换两个数字的位置得到一个尽可能小的数字。(可以不交换)----从高位向低位枚举,对每一位,从低位向高位找一个比它小的数,若能找到则交换即答案。对首位不能为0进行特殊处理。#include #include #include using namespace std;class原创 2013-07-13 17:45:32 · 893 阅读 · 0 评论 -
Topcoder SRM 585 DIV2 解题报告 //缺1000
------------LISNumberDivTwo最小的连续递增子序列的个数。。。----从前往后扫描一遍即可。。#include #include #include #include using namespace std;class LISNumberDivTwo{ private:原创 2013-07-21 22:50:54 · 891 阅读 · 0 评论 -
Topcoder SRM 596 DIV 1
250 IncrementAndDoublingclass IncrementAndDoubling { private: int n; int a[55]; bool ok(){ for (int i=0;i<n;i++){ if (a[i]!=0) return false;原创 2013-11-21 12:31:34 · 857 阅读 · 0 评论 -
Topcoder SRM 597 DIV 1
250 LittleElephantAndStringclass LittleElephantAndString { private: int ch[300]; public: int getNumber(string A, string B) { int ans=0; int n=A.length(); int p原创 2013-11-21 12:27:44 · 985 阅读 · 0 评论 -
Topcoder SRM 598 DIV 1
-------不服-------class BinPacking { private: int a[1000]; int n,m; int ans; public: int minBins(vector item) { memset(a,0,sizeof(a)); n=item.size();原创 2013-11-29 21:07:49 · 635 阅读 · 0 评论