This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "io/ioutil" | |
| "log" | |
| "gopkg.in/yaml.v2" | |
| ) | |
| type Config struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // For documentation on these settings, see: https://aka.ms/terminal-documentation | |
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
| "copyOnSelect": false, | |
| "copyFormatting": false, | |
| "closeOnExit": "always", | |
| "requestedTheme": "light", | |
| "showTabsInTitlebar": true, | |
| "showTerminalTitleInTitlebar": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # coding=utf-8 | |
| __author__ = 'tonnytwo' | |
| """最简单的背包问题,背包最大容量是10 总共4件物品,价值和重量分别如下 | |
| Knapsack Max weight : W = 10 (units) | |
| Total items : N = 4 | |
| Values of items : v[] = {10, 40, 30, 50} | |
| Weight of items : w[] = {5, 4, 6, 3} | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| #coding=utf-8 | |
| def f(num): | |
| print num | |
| if num==1 or num==2: | |
| return 1 | |
| else: | |
| return f(num-1)+f(num-2) |