Knapsack 0-1 & rosettacode & qbasic qb64 & WE - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7) +---- Thread: Knapsack 0-1 & rosettacode & qbasic qb64 & WE (/showthread.php?tid=463) |
Knapsack 0-1 & rosettacode & qbasic qb64 & WE - DANILIN - 05-22-2022 Knapsack 0-1 & rosettacode & qbasic qb64 & WE For all people: send yours algorithms to rosettacode otherwise forum may disappear even in google search Classic Knapsack problem is solved in many ways Contents: http://rosettacode.org/wiki/Knapsack_problem Long read: rosettacode.org/wiki/Knapsack_problem/0-1 Previous topics and long programs: Knapsack https://qb64forum.alephc.xyz/index.php?topic=3091 Ordered Combinations Generator https://qb64forum.alephc.xyz/index.php?topic=2999 My newest program synthesizes all ciphers from 0 & 1 adding an extra register and 0 remain on left in cipher Number of comparisons decreases from N! to 2^N for example N=5 N!=120 >> 2^N=32 Random values origin are automatically assigned quantity and quality and integral of value is obtained and in general: integral of quantity and quality and it is possible to divide only anyone will not understand Program write results to qb64 directory Code: (Select All) Open "knapsack.txt" For Output As #1 Main thing is very brief and clear to even all Results is reduced manually: Code: (Select All) 1 2 17 RE: Knapsack 0-1 & rosettacode & qbasic qb64 & WE - DANILIN - 06-01-2022 Knapsack 0-1 binary Python & C# have been created without textbooks using my best practices and I will post later but for now... Learning how to write QB64 programs on rosettacode.org Register and / or / xor log in rosettacode.org We find page where your topic is We look for QB64 in list and find Having not found QB64 we edit nearest one alphabetically above and page will distribute itself =={{header|QB64}}== {{NAME|QB64}} <lang QB64> PROGRAM </lang> {{out}} <pre> RESULTS </pre> PICTURE [[File:Screenshot.png]] RE: Knapsack 0-1 & rosettacode & qbasic qb64 & WE - DANILIN - 08-05-2022 YaBasic online: Danilin Knapsack 0-1 https://www.jdoodle.com/iembed/v0/suj RE: Knapsack 0-1 & rosettacode & qbasic qb64 & WE - TempodiBasic - 08-07-2022 No problem, there are so many tasks not coded into QB64! you can find them following this path: starting from the homepage select from menu EXPLORE and then LANGUAGES, then QB64 Well in this last appeared page look at the second box from the high to the bottom on the right edge of page. You can read "YOUR HELP NEEDED" and into it there is a link that let get you the last (the more adjourned) list of tasks that lack of QB64 code . If you register and then login into Rosetta code you can EDIT (so also add a QB64 section).... I have always put QB64 into Q and not among the different BASIC dialects into Basic section under letter B. This set of tags is very useful... I often use the header and the open/closing tags <lang QB64> ....... </lang> Quote:Having not found QB64 we edit nearest |