Welcome Guest ( Log In | Register )

5664 Pages V « < 5511 5512 5513 5514 5515 > »   
Closed TopicStart new topic
> 舊中文樓, The dead and old Chinese discussion (spam) thread

 
post Dec 29 2021, 21:06
Post #110241
fmnijk



初心者
******
Group: Gold Star Club
Posts: 999
Joined: 31-August 19
Level 500 (Ponyslayer)


QUOTE(winnerthis @ Dec 29 2021, 18:35) *

这种题如果追求效率可以用线性规划/非线性规划
线性规划需要事先假设能换几次 然后从结果倒推方案 我这里求到22的解只用了几秒钟 23的解可能有但10分钟还没解出来
非线性规划本质穷举 效率很低 10分钟才解求到19的解
如果你看重时间效率可以先拿线性规划算一算

附件是22的解
Attached Image


感謝分享,叫線性規劃是吧,記住了,有空學
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 01:48
Post #110242
jy-laji



The man who became an island.
********
Group: Members
Posts: 2,924
Joined: 21-May 11
Level 500 (Ponyslayer)


QUOTE(winnerthis @ Dec 30 2021, 00:35) *

这种题如果追求效率可以用线性规划/非线性规划
线性规划需要事先假设能换几次 然后从结果倒推方案 我这里求到22的解只用了几秒钟 23的解可能有但10分钟还没解出来
非线性规划本质穷举 效率很低 10分钟才解求到19的解
如果你看重时间效率可以先拿线性规划算一算

附件是22的解
Attached Image

线性规划是存在Polynomial算法的,而且就算不用最优解法而只用单纯形法 也应该是近似Polynomial的,所以用线性规划解NP-Hard问题我觉得不太靠谱。

比如注意到你的结果里惊人的浪费:5994 出现了4次、5593、5544、5643等超过5500的也出现了6次,说明几乎肯定还有优化空间。
如果用你表里的结果,注意到849有60个是最多的,而5*849+1*799只浪费44,那先把849用光,剩下
CODE
(5*849+1*799)*12
404 799 999
25  23  30

然后此时最优的方法是 999*3+799*1+404*3=5008 (我想这个应该是最优组合了?)
剩下
CODE
(999*3+799*1+404*3)*8
404 799 999
1   15  6

然后 999*1+799*5+404=5398
剩下
CODE
(999*1+799*5+404)*1
799 999
10  5

然后799*5+999*2=5993
剩下
CODE
(799*5+999*2)*2
999
1

轻易得到 12+8+1+2=23的结果。
~~~~~~~~~~~~~~~~~~~~~~~~~
然后,按照我的Greedy Algorithm的算法:
从上面的组合里 浪费最低的是 404*3+799+999*3。能用这个就一直用。然后每次找浪费最小的组合 (Greedy的组合是猜的,不过我想应该不难算?):
(括号里的是用掉的,下一行是剩下的)
CODE
404 799 849 999
25   35   60   30
(3    1    3) *8
1    27   60  6
(1         2  3)*1
     27   58  3
     (1    5)*11
     16   3   3
     (2   3   1)*1
     14       2
     (4       2)*1
     10
    (6)       *1
     4

最终结果=8+1+11+1+1+1=23
所以得到23并不困难,多种算法都能给出。你的算法找不到,那就不知道问题出在哪里了。
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 02:00
Post #110243
FAhentai



Active Poster
*******
Group: Gold Star Club
Posts: 1,377
Joined: 27-October 08
Level 500 (Godslayer)


新年到了,2022,希望一切安好吧,妈的2020-2021这简直是让我破产了
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 02:25
Post #110244
Ming28561



1080P
*******
Group: Catgirl Camarilla
Posts: 1,302
Joined: 7-July 17
Level 500 (Dovahkiin)


QUOTE(ericeric91 @ Dec 29 2021, 15:58) *

催化劑之前被連續退回噁心到了,沒打算維持HVM那邊,不然臨時又要逃好累
有需要買的話可以發C給我

話說我前幾天有提到又能交易的事情呀,哈


因为表世界近期不确定什么时候改版,改版后催化剂不可交易
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 02:54
Post #110245
--一虹--



我王守义今天就要看看你的十三香不香
********
Group: Gold Star Club
Posts: 2,540
Joined: 26-April 16
Level 500 (Ponyslayer)


无双毁灭风啊,这个月彩票出了2个好棍子了
我没钱去争
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 03:08
Post #110246
ok1995



Newcomer
*****
Group: Members
Posts: 743
Joined: 1-October 11
Level 463 (Dovahkiin)


QUOTE(--一虹-- @ Dec 30 2021, 02:54) *

无双毁灭风啊,这个月彩票出了2个好棍子了
我没钱去争

(IMG:[invalid] style_emoticons/default/cool.gif) 我的建议是all in
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 03:27
Post #110247
SoDick



我要唆爆世上所有美少女的菊花!
***
Group: Members
Posts: 211
Joined: 22-January 14
Level 361 (Dovahkiin)


QUOTE(jy-laji @ Dec 30 2021, 07:48) *

然后此时最优的方法是 999*3+799*1+404*3=5008 (我想这个应该是最优组合了?)

有404*2 + 799*4 + 999 = 5003
404*2 + 799*1 + 849*4 = 5003
我还没写完。

————————————————————

QUOTE(fmnijk @ Dec 30 2021, 03:06) *

感謝分享,叫線性規劃是吧,記住了,有空學


学习成本挺大的,
力扣刷到PTSD。
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 03:45
Post #110248
jy-laji



The man who became an island.
********
Group: Members
Posts: 2,924
Joined: 21-May 11
Level 500 (Ponyslayer)


QUOTE(SoDick @ Dec 30 2021, 09:27) *

有404*2 + 799*4 + 999 = 5003
404*2 + 799*1 + 849*4 = 5003
我还没写完。

嗯。不过这些其实是细节问题了,因为404×25+799×35+849×60+999×30-5000×23=3975,所以肯定不可能超过23了。
更一般的情况会复杂得多。不过如果能凑出一个达到最大值的答案就不用关心别的了。
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 03:47
Post #110249
winnerthis



Lurker
Group: Lurkers
Posts: 3
Joined: 5-August 17
Level 20 (Apprentice)


QUOTE(jy-laji @ Dec 30 2021, 01:48) *

线性规划是存在Polynomial算法的,而且就算不用最优解法而只用单纯形法 也应该是近似Polynomial的,所以用线性规划解NP-Hard问题我觉得不太靠谱。

比如注意到你的结果里惊人的浪费:5994 出现了4次、5593、5544、5643等超过5500的也出现了6次,说明几乎肯定还有优化空间。
如果用你表里的结果,注意到849有60个是最多的,而5*849+1*799只浪费44,那先把849用光,剩下
CODE
(5*849+1*799)*12
404 799 999
25  23  30

然后此时最优的方法是 999*3+799*1+404*3=5008 (我想这个应该是最优组合了?)
剩下
CODE
(999*3+799*1+404*3)*8
404 799 999
1   15  6

然后 999*1+799*5+404=5398
剩下
CODE
(999*1+799*5+404)*1
799 999
10  5

然后799*5+999*2=5993
剩下
CODE
(799*5+999*2)*2
999
1

轻易得到 12+8+1+2=23的结果。
~~~~~~~~~~~~~~~~~~~~~~~~~
然后,按照我的Greedy Algorithm的算法:
从上面的组合里 浪费最低的是 404*3+799+999*3。能用这个就一直用。然后每次找浪费最小的组合 (Greedy的组合是猜的,不过我想应该不难算?):
(括号里的是用掉的,下一行是剩下的)
CODE
404 799 849 999
25   35   60   30
(3    1    3) *8
1    27   60  6
(1         2  3)*1
     27   58  3
     (1    5)*11
     16   3   3
     (2   3   1)*1
     14       2
     (4       2)*1
     10
    (6)       *1
     4

最终结果=8+1+11+1+1+1=23
所以得到23并不困难,多种算法都能给出。你的算法找不到,那就不知道问题出在哪里了。

excel的规划求解算法确实不行 按照你的方法一步步算能得出另一种最优解
所以这类题比较简单的解法是用excel规划求解求出单次浪费最小的解(404*2+799*4+999*1=5003)然后一步步算?
Attached Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 04:07
Post #110250
SoDick



我要唆爆世上所有美少女的菊花!
***
Group: Members
Posts: 211
Joined: 22-January 14
Level 361 (Dovahkiin)


QUOTE(winnerthis @ Dec 30 2021, 09:47) *

excel的规划求解算法确实不行 按照你的方法一步步算能得出另一种最优解
所以这类题比较简单的解法是用excel规划求解求出单次浪费最小的解(404*2+799*4+999*1=5003)然后一步步算?
Attached Image

先把所有可能的情况找出来然后多排序几次,代码量++,时间消耗--。
这题有90种可能能大于5000,我按超过余数排序了一组order,然后又根据各个数的系数排序了4组指向上述order的order

[]嵌套到蛋痛。 (IMG:[invalid] style_emoticons/default/rolleyes.gif)

后面的写法应该会跟jy-laji解释的算法差不多。
想了半天没想到该如何让遗留的数值最大化。

——————————————————————

QUOTE(jy-laji @ Dec 30 2021, 10:30) *

其实Greedy algorithm是个十分简单粗暴的算法了。对于随机问题的平均结果,我觉得应该足够好了。
但是效率分析就极其困难了。比如,说不定有可能设计出来一组数据,实际的最优解是 n,但这个算法得到的结果最多只能达到 lg n 的数量。而另一种算法则可以证明一定能达到至少n/2的数量。
组合优化问题里这种坑太多了,很困难的,不投入个几年的钻研是很难有深刻理解的。

我道行不够,不想了。 (IMG:[invalid] style_emoticons/default/rolleyes.gif)

This post has been edited by SoDick: Dec 30 2021, 08:21
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 04:30
Post #110251
jy-laji



The man who became an island.
********
Group: Members
Posts: 2,924
Joined: 21-May 11
Level 500 (Ponyslayer)


QUOTE(SoDick @ Dec 30 2021, 10:07) *

先把所有可能的情况找出来然后多排序几次,代码量++,时间消耗--。
这题有90种可能能大于5000,我按超过余数排序了一组order,然后又根据各个数的系数排序了4组指向上述order的order

[]嵌套到蛋痛。 (IMG:[invalid] style_emoticons/default/rolleyes.gif)

后面的写法应该会跟jy-laji解释的算法差不多。
想了半天没想到该如何让遗留的数值最大化。

其实Greedy algorithm是个十分简单粗暴的算法了。对于随机问题的平均结果,我觉得应该足够好了。
但是效率分析就极其困难了。比如,说不定有可能设计出来一组数据,实际的最优解是 n,但这个算法得到的结果最多只能达到 lg n 的数量。而另一种算法则可以证明一定能达到至少n/2的数量。
组合优化问题里这种坑太多了,很困难的,不投入个几年的钻研是很难有深刻理解的。

This post has been edited by jy-laji: Dec 30 2021, 04:31
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 05:27
Post #110252
AdamAbbott



Regular Poster
******
Group: Members
Posts: 818
Joined: 10-March 18
Level 411 (Godslayer)


这几天打开新闻页面又没有每日奖励的提示了,也不知道领没领到,之前就有过这种问题,我还以为只是起太早没
到每日刷新的时间,但是今天十一点才打开页面也没有
有人也有遇到过这种情况吗
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 05:55
Post #110253
--一虹--



我王守义今天就要看看你的十三香不香
********
Group: Gold Star Club
Posts: 2,540
Joined: 26-April 16
Level 500 (Ponyslayer)


QUOTE(ok1995 @ Dec 30 2021, 03:08) *

(IMG:[invalid] style_emoticons/default/cool.gif) 我的建议是all in

让我看看你的棍子



问一下异界献祭2级是升3级献祭还是升5级献祭合算
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 06:16
Post #110254
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,642
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(--一虹-- @ Dec 30 2021, 11:55) *
问一下异界献祭2级是升3级献祭还是升5级献祭合算


升级越高越划算 (IMG:[invalid] style_emoticons/default/tongue.gif) 所以我异世界装备都是自己打、或去买,然后献祭直接升级 T5
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 06:50
Post #110255
evelove



Regular Poster
*****
Group: Gold Star Club
Posts: 617
Joined: 28-August 14
Level 479 (Dovahkiin)


講到潤色,之前翻了篇燒陰毛的短篇漫畫,整篇氣氛都滿鬧的,
所以就會把用詞改的更接近鬧劇。沒想到評論區更厲害XD
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 07:28
Post #110256
ok1995



Newcomer
*****
Group: Members
Posts: 743
Joined: 1-October 11
Level 463 (Dovahkiin)


QUOTE(--一虹-- @ Dec 30 2021, 05:55) *

让我看看你的棍子
问一下异界献祭2级是升3级献祭还是升5级献祭合算

http://hentaiverse.org/equip/276528465/62ed96a8cb
凄凄惨惨的入门杖
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 07:38
Post #110257
--一虹--



我王守义今天就要看看你的十三香不香
********
Group: Gold Star Club
Posts: 2,540
Joined: 26-April 16
Level 500 (Ponyslayer)


QUOTE(ok1995 @ Dec 30 2021, 07:28) *
g感觉还不如我花1.5m买的棍子 (IMG:[invalid] style_emoticons/default/tongue.gif)
[277896792] Legendary Shocking Willow Staff of Destruction (Lv.500)
等后面装备齐了再锻
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 07:52
Post #110258
fiiz



FFFinal
*****
Group: Gold Star Club
Posts: 515
Joined: 18-May 20
Level 500 (Ponyslayer)


QUOTE(ok1995 @ Dec 30 2021, 13:28) *

我的是250k买的流拍后的,是在场最烂的杖 (IMG:[invalid] style_emoticons/default/rolleyes.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 08:21
Post #110259
chanman2021



AFK already
*******
Group: Gold Star Club
Posts: 1,562
Joined: 19-January 21
Level 500 (Ponyslayer)


Legendary Tempestuous Willow Staff of Focus
這是我的入門杖,在拍賣以底價50k買來的垃圾/玩具,鍛一鍛用來過渡還不錯的(早期用4件光頭相位+加速手套).
5p4s是用單手盾戰打iw,第一埸出2p一直打就完成了,運氣不錯.
現在我主要用來打ar或iw,gf的話比LTWD多300至500t,所以己很少用它下gf了.

This post has been edited by chanman2021: Dec 30 2021, 08:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 30 2021, 09:53
Post #110260
鸡巴好痒



Casual Poster
***
Group: Members
Posts: 178
Joined: 12-December 21
Level 500 (Ponyslayer)


https://hentaiverse.org/equip/278266555/0eaf264dca
这个值钱吗 (IMG:[invalid] style_emoticons/default/huh.gif) ?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


5664 Pages V « < 5511 5512 5513 5514 5515 > » 
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 16th October 2025 - 08:31