hdoj
qeatzy
Have a good career; fail fast, fail frequently and fail forwards! ;)
展开
-
hdu 1031 (partial sort problem, nth_element, stable_partition, lambda expression)
partial sort, nth_element, stable_partition, lambda expression原创 2015-06-15 17:47:54 · 523 阅读 · 0 评论 -
hdu 1030 Delta-wave (C++, 0ms, explanatory comments.)
(C++, 0ms, explanatory comments.) plus a nice solution from acmerblog原创 2015-06-15 12:21:59 · 705 阅读 · 0 评论 -
hdu 1033 (bit masking, utilization of switch, '\0' as end of c string)
bit masking, utilization of switch, '\0' as end of c string原创 2015-06-15 21:47:47 · 418 阅读 · 0 评论 -
hdu 1231, dp ,maximum consecutive sum of integers, find the boundaries, possibly all negative, C++
hdu 1231, maximum consecutive sum of integers, finding the boundaries, possibly all negative, C++原创 2015-07-12 03:24:17 · 703 阅读 · 0 评论 -
hdu 1082, stack emulation, and how to remove redundancy
hdu 1082, stack emulation, and how to remove redundancy原创 2015-07-16 02:24:46 · 535 阅读 · 0 评论 -
hdu 1232, disjoint set, linked list vs. rooted tree, a minor but substantial optimization for path c
disjoint set, linked list version with weighted-union heuristic, rooted tree version with rank by union and path compression, and a minor but substantial optimization for path compression version FindSet.原创 2015-07-16 17:13:52 · 661 阅读 · 0 评论 -
hdu, KMP algorithm, linear string search algorithm, a nice reference provided
Rabin-Karp and Knuth-Morris-Pratt Algorithms原创 2015-07-18 13:40:00 · 132 阅读 · 0 评论 -
hdu 1712, multiple-choice knapsack,
multiple-choice knapsack原创 2015-07-18 13:25:57 · 749 阅读 · 0 评论 -
hdu 1503, LCS variants, find a LCS, not just the length, backtrack to find LCS, no extra markup
a typical variant of LCS algo. the key point here is, the dp[][] array contains enough message to determine the LCS, not only the length, but all of LCS candidates, we can backtrack to find all of LCS.原创 2015-07-18 16:24:57 · 777 阅读 · 0 评论 -
one recursive approach for 3, hdu 1016 (with an improved version) , permutations, N-Queens puzzle
one recursive approach to solve hdu 1016 , list all permutations, solve N-Queens puzzle. reference: the video of stanford cs106b lecture 10 by Julie Zelenski https://www.youtube.com/watch?v=NdF1QDTRkck原创 2015-07-19 16:49:37 · 691 阅读 · 0 评论 -
hdu 1159, LCS, dynamic programming, recursive backtrack vs iterative backtrack vs incremental, C++
hdu 1159, LCS, dynamic programming, recursive backtrack vs iterative backtrack vs incremental, C++原创 2015-07-10 04:14:59 · 869 阅读 · 0 评论 -
hdu 1057 (simulation, use sentinel to avoid boudary testing, use swap trick to avoid extra copy.)
use sentinel to avoid boudary testing, use swap trick to avoid extra copy.原创 2015-06-19 11:58:07 · 499 阅读 · 0 评论 -
hdu 1051 (greedy algorithm, how a little modification turn 15ms to 0ms)
(greedy algorithm, how a little modification turn 15ms to 0ms)原创 2015-06-18 12:54:04 · 484 阅读 · 0 评论 -
hdu 1035 (usage of sentinel, proper utilization of switch and goto to make code neat)
make your selection based on what you need to accomplish, not on performance considerations.原创 2015-06-16 12:33:50 · 490 阅读 · 0 评论 -
hdu 1034 (preprocess optimization, property of division to avoid if, decreasing order process)
(preprocess optimization, use floor property of division to avoid if)原创 2015-06-16 13:32:00 · 505 阅读 · 0 评论 -
hdu 1041 (OO approach, private constructor to prevent instantiation, sprintf)
(OO approach, private constructor to prevent instantiation)原创 2015-06-17 15:57:17 · 412 阅读 · 0 评论 -
hdu 1039 (string process, fgets, scanf, neat utilization of switch clause)
(string process, fgets, scanf, neat utilization of switch clause)原创 2015-06-16 22:15:55 · 446 阅读 · 0 评论 -
hdu 1036 (I/O routines, fgets, sscanf, %02d, rounding, atoi, strtol)
(I/O routines, fgets, sscanf, %02d, rounding, atoi, strtol)原创 2015-06-16 19:37:40 · 578 阅读 · 0 评论 -
hdu 1047 (big integer sum, fgets or scanf, make you func return useful infos)
design of func原创 2015-06-18 08:21:08 · 540 阅读 · 0 评论 -
hdu 1052 (greedy algorithm)
(greedy algorithm)原创 2015-06-18 16:49:57 · 641 阅读 · 0 评论 -
hdu 1053 (huffman coding, greedy algorithm, std::partition, std::priority_queue )
huffman coding, greedy algorithm.原创 2015-06-18 19:11:46 · 725 阅读 · 0 评论 -
hdu 1050 (preinitilization or postcleansing, std::fill)
(preinitilization or postcleansing, std::fill)原创 2015-06-18 11:33:36 · 477 阅读 · 0 评论 -
leetcode N-Queens/N-Queens II, backtracking, hdu 2553 count N-Queens, dfs
leetcode N-Queens/N-Queens II, backtracking, hdu 2553 count N-Queens, dfs原创 2015-07-09 02:07:25 · 849 阅读 · 0 评论