s*u
2 楼
Several manuscripts will be submitted to building energy related journals (
IF from 2 to 5) soon and suggested reviewers are needed.
If you are interested, please send me your name, institution, email address
and a short description of yourself.
Thanks a lot!
IF from 2 to 5) soon and suggested reviewers are needed.
If you are interested, please send me your name, institution, email address
and a short description of yourself.
Thanks a lot!
N*n
3 楼
It's been almost 30 months since Silver last visited 20/oz area. Silver
bears are trying hard to drive it down now.
bears are trying hard to drive it down now.
S*1
4 楼
朋友让我帮忙买香奈儿的钱包,香包不是只有店里才买得到的嘛,我也不想专门帮她跑
一趟看价格,有哪位好心的MM告知一下哈。给个价格范围也行~~谢谢啦啦啦~~
一趟看价格,有哪位好心的MM告知一下哈。给个价格范围也行~~谢谢啦啦啦~~
k*r
5 楼
我写了一个,不知道可用不,先用DP找到最长subsequence的长度,complexity is O(
nlongn);
再用recursive找到所有可行解。
public static List
nlongn);
再用recursive找到所有可行解。
public static List
- > AllLongestIncreasingSubsequence(int[] nums
) {
int[] m = new int[nums.length + 1];
int L = 0;
for (int i = 0; i < nums.length; i++) {
int lo = 1;
int hi = L;
while (lo <= hi) {
int mid = (lo + hi) / 2;
if (nums[m[mid]] < nums[i]) lo = mid + 1;
else hi = mid - 1;
}
int newL = lo;
m[newL] = i;
if (newL > L) {
L = newL;
}
}
List
- > res = new ArrayList<>();
Helper(nums, L, 0, new ArrayList
return res;
}
public static void Helper(int[] nums, int len, int index, List
List
- > res) {
if (tmp.size() == len) {
res.add(new ArrayList
return;
}
for (int i = index; i < nums.length; i++) {
if (tmp.size() == 0 || tmp.get(tmp.size() - 1) < nums[i]) {
tmp.add(nums[i]);
Helper(nums, len, i + 1, tmp, res);
tmp.remove(tmp.size() - 1);
}
}
}
public static void main(String[] args) {
int[] input = {2,7,1,3,10,4,5,6};
int[] res = LongestIncreasingSubsequence(input);
for (int i : res) {
System.out.print(i + ",");
}
int[] input2 = {1,6,2,7,3,8,9,10,4,5};
List
- > res2 = AllLongestIncreasingSubsequence(input2);
for (List
for (Integer i : l) {
System.out.print(i + ",");
}
System.out.println();
}
}
B*h
6 楼
3折的那种915刀,2折760刀
s*x
7 楼
nums
Thanks a million !!
【在 k****r 的大作中提到】
: 我写了一个,不知道可用不,先用DP找到最长subsequence的长度,complexity is O(
: nlongn);
: 再用recursive找到所有可行解。
: public static List
- > AllLongestIncreasingSubsequence(int[] nums
: ) {
: int[] m = new int[nums.length + 1];
: int L = 0;
: for (int i = 0; i < nums.length; i++) {
: int lo = 1;
: int hi = L;
a*e
9 楼
相关阅读
最近哪里会有LA MER DEAL?雅斯兰黛在那个店会有可能打折?NM The CASHMERE EVENT $50 OFF with purchase + Free online shipping at ANY PRICElvmh 是个啥?大家每个月买衣服什么都花多少钱啊?有个关于ABC的长相的奇怪现象很喜欢超高跟的鞋子为什么现在很多牌子都打折了30%--.....$2.99 Kate Ann® 'Bianca' Thong Sandal奔个上衣, 帮忙看看那个t-shirt更合适呢很多人这里姐妹多,偶实在不知改怎么办。得到建议立刻删上个世纪的流行发型Re: [奔] 秋天的一些搭配 (转载)愁!最近想买CHANEL太阳眼镜Fall Must-Haves Free Gift w/ $28 H2Oplus请问哪位姐妹知道这里哪儿可以买到妈富隆类的口服避孕药呀??(已删)MK的包包值得吗?去哪里买男士鞋子?L'Occitane 6 Hour Offer