摘要: 疯牛时间限制:1000ms | 内存限制:65535KB难度:4描述农夫 John 建造了一座很长的畜栏,它包括N (2 #include #include using namespace std;bool judge(vector& x, int c, int value){ int cnt... 阅读全文
posted @ 2014-04-13 23:18 OpenSoucre 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 每天早上起床看一遍,时刻警惕自己,每天至少要浏览http://www.cplusplus.com1.把C++当成一门新的语言学习(和C没啥关系!真的。);2.看《Thinking In C++》,不要看《C++变成死相》;3.看《The C++ Programming Language》和《Insi... 阅读全文
posted @ 2014-04-13 22:54 OpenSoucre 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Color the fence时间限制:1000ms | 内存限制:65535KB难度:2描述TomhasfalleninlovewithMary.NowTomwantstoshowhisloveandwriteanumberonthefenceoppositetoMary’shouse.Tomth... 阅读全文
posted @ 2014-04-13 20:19 OpenSoucre 阅读(250) 评论(0) 推荐(0) 编辑
摘要: Haffman编码时间限制:1000ms | 内存限制:65535KB难度:3描述哈弗曼编码大家一定很熟悉吧(不熟悉也没关系,自己查去。。。)。现在给你一串字符以及它们所对应的权值,让你构造哈弗曼树,从而确定每个字符的哈弗曼编码。当然,这里有一些小规定:1.规定哈弗曼树的左子树编码为0,右子树编码为... 阅读全文
posted @ 2014-04-13 16:50 OpenSoucre 阅读(624) 评论(0) 推荐(0) 编辑