5773专题

hdu 5773 (The All-purpose Zero)

The All-purpose Zero   Problem Description ?? gets an sequence S with n intergers(0 < n <= 100000,0<= S[i] <= 1000000).?? has a magic so that he can change 0 to any interger(He does not need to c

HDU 5773 The All-purpose Zero (DP最长上升子序列)

Problem Description ?? gets an sequence S with n intergers(0 < n <= 100000,0<= S[i] <= 1000000).?? has a magic so that he can change 0 to any interger(He does not need to change all 0 to the same i

HDU 5773 The All-purpose Zero (LIS)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5773 最大上升子序列,不过子序列中的0可以变成任意的数。 0可以转化成任意整数,包括负数,显然求LIS时尽量把0都放进去必定是正确的。因此我们可以把0拿出来,对剩下的做O(nlogn)的LIS,统计结果的时候再算上0的数量。为了保证严格递增,我们可以将每个权值S[i]减去i前面0的个数

DP-HDU-5773-The All-purpose Zero

The All-purpose Zero Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 279 Accepted Submission(s): 129 Problem Description ?? gets an sequence S