qeatzy

2015年6月18日

hdu 1053 (huffman coding, greedy algorithm, std::partition, std::priority_queue ) 分类: hdoj 2015-06-18 19:11 22人阅读 评论(0) 收藏

摘要: huffman coding, greedy algorithm. std::priority_queue, std::partition, when i use the three commented lines, excution time increase to 15ms f... 阅读全文

posted @ 2015-06-18 19:11 qeatzy 阅读(105) 评论(0) 推荐(0)

hdu 1052 (greedy algorithm) 分类: hdoj 2015-06-18 16:49 35人阅读 评论(0) 收藏

摘要: thanks to http://acm.hdu.edu.cn/discuss/problem/post/reply.php?action=support&postid=19638&messageid=1&deep=0 for the test case provided. belo... 阅读全文

posted @ 2015-06-18 16:49 qeatzy 阅读(89) 评论(0) 推荐(0)

hdu 1051 (greedy algorithm, how a little modification turn 15ms to 0ms) 分类: hdoj 2015-06-18 12:54 29人阅读 评论(0) 收藏

摘要: the 2 version are essentially the same, except version 2 search from the larger end, which reduce the search time in extreme condition from l... 阅读全文

posted @ 2015-06-18 12:54 qeatzy 阅读(122) 评论(0) 推荐(0)

hdu 1050 (preinitilization or postcleansing, std::fill) 分类: hdoj 2015-06-18 11:33 34人阅读 评论(0) 收藏

摘要: errors, clauses in place, logical ones, should be avoided.#include #include #include int main() { //freopen("input.txt","r",stdin); cons... 阅读全文

posted @ 2015-06-18 11:33 qeatzy 阅读(165) 评论(0) 推荐(0)

hdu 1047 (big integer sum, fgets or scanf, make you func return useful infos) 分类: hdoj 2015-06-18 08:21 39人阅读 评论(0) 收藏

摘要: errors made, boundary conditions, #include char* sum(char *to, char *from) { static const int charzero='0',oublecharzero='0'+'0'; int s... 阅读全文

posted @ 2015-06-18 08:21 qeatzy 阅读(143) 评论(0) 推荐(0)

导航