角度很重要# Joke - 肚皮舞运动
j*s
1 楼
一个小时时间,,一道也没做出来。。悲催。。
第一题
Given a set of integer, you could apply sign operation to the integer, find
the minimum sum that is close to but no less than 0;
eg.
input 3 5 7 11 13
output 1
第二题
given a set of pairs
find a set of pairs from the above set, so that a_j1 , and w_j1+w_j2+w_j3.. is the max.
order should be maintained.
eg.
input <1,3> <2,2> <3,1>
output 6
input <3,3> <2,2> <1,1>
output 3
updated..
第一题2^n recursion 算法我做出来了,不过超时了。求dp的方法。
第二题。。估计是用recursion..最后没写出来,所以也不知道能不能过。
btw. pg要求还是很高的,求高效的算法。
第一题
Given a set of integer, you could apply sign operation to the integer, find
the minimum sum that is close to but no less than 0;
eg.
input 3 5 7 11 13
output 1
第二题
given a set of pairs
find a set of pairs
order should be maintained.
eg.
input <1,3> <2,2> <3,1>
output 6
input <3,3> <2,2> <1,1>
output 3
updated..
第一题2^n recursion 算法我做出来了,不过超时了。求dp的方法。
第二题。。估计是用recursion..最后没写出来,所以也不知道能不能过。
btw. pg要求还是很高的,求高效的算法。