 Given *n* items with size *A[i]* (i from 0 to n - 1), an integer *m* denotes the size of a backpack. How full you can fill this [backpack](https://helloacm.com/algorithms-series-0-1-backpack-dynamic-programming-and-backtracking/)? Put this mathematically, you are trying to: > max(sum(j[i] * A[i])) subject to: j[i] = {0, 1} and sum(j[i] * A[i]) <= m where 0 =< i < n *j[i]* indicates that whether you put item *i* in the backpack. ## Backtracking If we start from the first item, we have two choices, put it or do not put it in the bag. So it is a decision binary tree of depth n where each level corresponding to a item. The complexity is O(2^n) . If the remaining capacity is enough (bigger than the current size of item), otherwise we can choose skipping current item. ``` class Solution { public: /** * @param m: An integer m denotes the size of a backpack * @param A: Given n items with size A[i] * @return: The maximum size */ int backPack(int m, vector<int> &A) { pack(0, m, A); return curMax; } void pack(int n, int weight, vector<int> &A) { int sz = A.size(); int m = 0; for (int i = n; i < sz; i ++) { pack(n + 1, weight, A); // do not put it if (weight >= A[i]) { // we can put it m += A[i]; if (m > curMax) { curMax = m; } weight -= A[i]; pack(n + 1, weight, A); // put it } } } private: int curMax = 0; }; ``` However, this recursion backtracking is too slow because of the large search space especially if n is large. ## Dynamic Programming If, we use *dp[i][j]* to represent that if we can use first *i* items (maximum, could use less) to pack at most *j* weight. Thus, the following stands: > dp[i][j] = dp[i - 1][j] || dp[i - 1][j - A[i - 1]]; This can be interpreted as: 1. by achieving dp[i][j] we automatically achieve dp[i + 1][j] 2. by achieving dp[i][j] we automatically achieve dp[i + 1][j + A[i + 1]] The [DP solution](https://helloacm.com/software-engineer-interview-question-how-to-improve-dynamic-programming-space-complexity/) allows you to cache intermediate results so you don't have to calculate them over and over again. ``` class Solution { public: /** * @param m: An integer m denotes the size of a backpack * @param A: Given n items with size A[i] * @return: The maximum size */ int backPack(int m, vector<int> &A) { int size = A.size(); vector< vector<bool> > dp(size + 1, vector<bool>(m + 1, false)); for (int i = 0; i < size + 1; ++ i) { dp[i][0] = true; } for(int i = 1; i < A.size() + 1; i++) { for(int j = 1; j < m + 1; j++) { if(j < A[i - 1]) { // insufficient capacity dp[i][j] = dp[i - 1][j]; } else { dp[i][j] = dp[i - 1][j] || dp[i - 1][j - A[i - 1]]; } } } for (int i = m; i >= 0; i--) { // reverse checking the maximum weight if (dp[size][i]) { return i; } } return 0; } }; ``` The O(nm) solution (with O(mn) space) fills the DP array and in the end, we need to check if we can fulfil the backpack from *m* downards to *zero* (get the maximum) ## Memory Optimisation We can see that the dp[i] is fully dependent on the dp[i-1], thus, we can optimise the memory consumption from O(mn) to O(m). ``` class Solution { public: /** * @param m: An integer m denotes the size of a backpack * @param A: Given n items with size A[i] * @return: The maximum size */ int backPack(int m, vector<int> &A) { int size = A.size(); vector<bool> dp(m + 1, false); dp[0] = true; for (int i = 1; i < A.size() + 1; i++) { for (int j = m; j >= 1; --j) { if(j >= A[i - 1]) { dp[j] = dp[j] || dp[j - A[i - 1]]; } } } for (int i = m; i >= 0; i--) { if (dp[i]) { return i; } } return 0; } }; ``` The runtime complexity is still O(mn) where you need to reverse the inner loop from m downwards to 1. ----------------------------------- ## Support me and my work as a [witness](https://steemit.com/witness-category/@justyy/justyy-just-another-witness) by 1. voting me [here](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy), or 2. voting me as [a proxy](https://v2.steemconnect.com/sign/account-witness-proxy?proxy=justyy&approve=1). Some of my contributions: **[SteemIt Tools, Bots, APIs and Tutorial](https://helloacm.com/tools/steemit/)** ------------------------------------------------------------------ [0/1背包问题](https://justyy.com/archives/6271)是非常经典的算法问题。要求是:给定 n 个物件,每个物件的重量(或体积)是 A[i] 那么请问一个最多装重(或体积) m 的背包最多可以装下多少这些物件。 如果用数学表示这个问题: > max(sum(j[i] * A[i])) subject to: j[i] = {0, 1} and sum(j[i] * A[i]) <= m where 0 =< i < n *j[i]* 就是控制是否装下第 i 个 物件 的变量(0或者1) ## 回溯算法 把整个搜索空间从第一个物件开始当成树根,那么这是一棵二叉树,每层的节点就能对应到每个物品,两个分叉分别代表是否把当前节点(物品)装入背包中。 不难想像,时间复杂度为 O(2^n)。如果当前背包并不能装下当前物件,那么我们需要继续尝试下一个物品,直到所有物品尝试完并回溯。 ``` class Solution { public: /** * @param m: An integer m denotes the size of a backpack * @param A: Given n items with size A[i] * @return: The maximum size */ int backPack(int m, vector<int> &A) { pack(0, m, A); return curMax; } void pack(int n, int weight, vector<int> &A) { int sz = A.size(); int m = 0; for (int i = n; i < sz; i ++) { pack(n + 1, weight, A); // 不放 if (weight >= A[i]) { // 可以放 m += A[i]; if (m > curMax) { curMax = m; } weight -= A[i]; pack(n + 1, weight, A); // 放 } } } private: int curMax = 0; }; ``` 这个算法的问题就是慢。特别是物品数量多的时候,整个搜索空间就变得巨大。 ## 动态规化 如果我们用 *dp[i][j]* 来表示是否可以用最多 前 i 件物品来装最多重量(或者体积) 为 j 。那么: > dp[i][j] = dp[i - 1][j] || dp[i - 1][j - A[i - 1]]; 我们可以反过来理解: 1. 如果dp[i][j] 那么下一件物品我们不装的话: dp[i + 1][j] 2. 如果dp[i][j] 那么装下下一件物品: dp[i + 1][j + A[i + 1]] [动态规化](https://justyy.com/archives/5004)的优点就是可以把中间结果给缓存起来,这样就不会像递规回溯一样有些结果(中间节点)会重复计算。 ``` class Solution { public: /** * @param m: An integer m denotes the size of a backpack * @param A: Given n items with size A[i] * @return: The maximum size */ int backPack(int m, vector<int> &A) { int size = A.size(); vector< vector<bool> > dp(size + 1, vector<bool>(m + 1, false)); for (int i = 0; i < size + 1; ++ i) { dp[i][0] = true; } for(int i = 1; i < A.size() + 1; i++) { for(int j = 1; j < m + 1; j++) { if(j < A[i - 1]) { // 装不下了 dp[i][j] = dp[i - 1][j]; } else { dp[i][j] = dp[i - 1][j] || dp[i - 1][j - A[i - 1]]; } } } for (int i = m; i >= 0; i--) { // 反过来从大到小检查能装下的最大重量 if (dp[size][i]) { return i; } } return 0; } }; ``` 时间复杂度和空间复杂度都是 O(nm)。最后面我们只要反过来检查 dp[A.size()][j] 为 true 的第一个下标 j 就是当前背包能装下的最大重量。 ## 内存优化 上面的DP公式我们不难发现, 在计算 dp[i] 的时候只依赖于 dp[i-1], 这样我们就可以只用一维来存取 dp[i-1] 的情况。这样,空间复杂度从 O(mn) 就降到了 O(m). ``` class Solution { public: /** * @param m: An integer m denotes the size of a backpack * @param A: Given n items with size A[i] * @return: The maximum size */ int backPack(int m, vector<int> &A) { int size = A.size(); vector<bool> dp(m + 1, false); dp[0] = true; for (int i = 1; i < A.size() + 1; i++) { for (int j = m; j >= 1; --j) { // 内循环需要从 m 到 1 的检查 if(j >= A[i - 1]) { dp[j] = dp[j] || dp[j - A[i - 1]]; } } } for (int i = m; i >= 0; i--) { if (dp[i]) { return i; } } return 0; } }; ``` ----------------------------------- ## 支持我的工作 支持我成为 [见证人](https://steemit.com/cn/@justyy/5h6gyv-cn) 1. [请在 这里 投我一票](https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy), 或者 2. 设置我 为[代理](https://v2.steemconnect.com/sign/account-witness-proxy?proxy=justyy&approve=1). 谢谢您! 您可能还会喜欢:**[SteemIt 工具、API接口、机器人和教程](https://helloacm.com/tools/steemit-tools/)** .
author | justyy |
---|---|
permlink | algorithms-series-0-1-backpack-acm-0-1 |
category | programming |
json_metadata | {"community":"busy","app":"steemit/0.1","format":"markdown","tags":["programming","cn","steemstem","cn-programming","busy"],"image":["https://gateway.ipfs.io/ipfs/QmfZeF9fBXMi4skDgmtiHpLjfW5Zfy8rwafYq2h4HrmyEJ"],"links":["https://helloacm.com/algorithms-series-0-1-backpack-dynamic-programming-and-backtracking/","https://helloacm.com/software-engineer-interview-question-how-to-improve-dynamic-programming-space-complexity/","https://steemit.com/witness-category/@justyy/justyy-just-another-witness","https://steemconnect.com/sign/account_witness_vote?approve=1&witness=justyy","https://v2.steemconnect.com/sign/account-witness-proxy?proxy=justyy&approve=1","https://helloacm.com/tools/steemit/","https://justyy.com/archives/6271","https://justyy.com/archives/5004","https://steemit.com/cn/@justyy/5h6gyv-cn","https://helloacm.com/tools/steemit-tools/"]} |
created | 2018-04-22 02:11:54 |
last_update | 2018-04-22 09:56:27 |
depth | 0 |
children | 7 |
last_payout | 2018-04-29 02:11:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 39.340 HBD |
curator_payout_value | 8.326 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 9,021 |
author_reputation | 280,616,224,641,976 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 51,403,756 |
net_rshares | 7,447,406,821,937 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
abit | 0 | 179,048,219,856 | 100% | ||
adm | 0 | 4,823,272,354,209 | 30% | ||
ubg | 0 | 305,334,630 | 1% | ||
bbrewer | 0 | 14,225,910,373 | 100% | ||
ace108 | 0 | 175,244,254,347 | 16% | ||
bullionstackers | 0 | 20,006,838,116 | 4% | ||
magicmonk | 0 | 60,639,198,741 | 30% | ||
bestmz | 0 | 4,861,101,676 | 100% | ||
elguille | 0 | 10,586,129,347 | 75% | ||
justyy | 0 | 1,065,196,012,265 | 85% | ||
luneknight | 0 | 253,036,524 | 100% | ||
busy.pay | 0 | 432,248,632,395 | 1.86% | ||
dapeng | 0 | 8,937,689,895 | 5% | ||
happyukgo | 0 | 1,562,515,907 | 85% | ||
nokeh | 0 | 246,695,201 | 98.92% | ||
elizacheng | 0 | 2,254,491,707 | 10% | ||
cqf | 0 | 30,638,861,507 | 100% | ||
zainalabidin | 0 | 237,657,701 | 100% | ||
manuel78 | 0 | 69,841,952 | 1% | ||
frankintaiwan | 0 | 80,958,102 | 20% | ||
helo | 0 | 2,712,182,644 | 10% | ||
shenchensucc | 0 | 2,979,653,201 | 20% | ||
victorialuxx | 0 | 169,501,482 | 100% | ||
robinlee | 0 | 501,293,942 | 98.79% | ||
catwomanteresa | 0 | 11,136,764,824 | 10% | ||
rainyapril | 0 | 583,833,458 | 98.95% | ||
al2ping | 0 | 102,837,255 | 98.96% | ||
oldman28 | 0 | 12,105,111,393 | 50% | ||
liangfengyouren | 0 | 1,038,581,576 | 50% | ||
idx | 0 | 16,478,023,143 | 100% | ||
yasu24 | 0 | 35,162,810,056 | 100% | ||
jiangchen | 0 | 98,411,548 | 1% | ||
shengjian | 0 | 20,003,192,154 | 83.87% | ||
mangoanddaddy | 0 | 1,395,976,213 | 80% | ||
kangnajiang | 0 | 236,961,718 | 98.94% | ||
geass | 0 | 662,246,485 | 98.84% | ||
moonvoid | 0 | 614,503,785 | 100% | ||
boontjie | 0 | 25,289,728,450 | 100% | ||
irenett | 0 | 1,213,603,091 | 100% | ||
davidke20 | 0 | 2,092,681,793 | 15% | ||
rosatravels | 0 | 98,648,858,401 | 50% | ||
xuran | 0 | 5,075,463,584 | 100% | ||
awiwea1974 | 0 | 403,301,865 | 100% | ||
superbing | 0 | 9,356,286,559 | 85% | ||
dailyfortune | 0 | 6,168,002,334 | 85% | ||
dancingapple | 0 | 4,566,803,563 | 20% | ||
xiaoshancun | 0 | 608,248,598 | 100% | ||
dailystats | 0 | 15,372,062,482 | 85% | ||
ayman101 | 0 | 406,237,089 | 100% | ||
bobdos | 0 | 3,598,899,074 | 7% | ||
steemline | 0 | 248,464,148 | 100% | ||
winniex | 0 | 3,747,888,091 | 10% | ||
kimxinfo | 0 | 18,028,518,328 | 100% | ||
jianan | 0 | 581,030,564 | 98.93% | ||
nada101 | 0 | 466,907,648 | 100% | ||
cnbuddy | 0 | 3,232,956,722 | 0.1% | ||
nileelily | 0 | 6,031,064,988 | 100% | ||
chann | 0 | 5,573,326,616 | 20% | ||
daxiang | 0 | 256,682,626 | 98.92% | ||
jrvacation | 0 | 142,210,109,600 | 100% | ||
anxin | 0 | 7,304,149,317 | 85.33% | ||
lebin | 0 | 16,555,948,292 | 15% | ||
coindzs | 0 | 124,558,357 | 100% | ||
cryptonewsly | 0 | 213,554,226 | 100% | ||
tdre | 0 | 38,932,609,087 | 100% | ||
moobear | 0 | 238,179,540 | 98.95% | ||
maiyude | 0 | 6,626,789,338 | 5% | ||
jjay | 0 | 650,410,111 | 100% | ||
yumisee | 0 | 330,420,351 | 20% | ||
prch | 0 | 2,659,292,207 | 36% | ||
nean | 0 | 581,289,153 | 98.96% | ||
joeliew | 0 | 280,507,970 | 6% | ||
foodielifestyle | 0 | 1,235,640,989 | 84.86% | ||
woolfe19861008 | 0 | 1,691,158,395 | 85.53% | ||
comingback | 0 | 80,451,353 | 12% | ||
dailychina | 0 | 10,422,214,602 | 85% | ||
vamos-amigo | 0 | 1,714,483,329 | 40% | ||
mycat | 0 | 153,394,048 | 12% | ||
jinluan | 0 | 1,626,119,748 | 100% | ||
vincenthan | 0 | 583,590,121 | 98.96% | ||
yuxuan | 0 | 181,250,828 | 94.76% | ||
iipoh06 | 0 | 68,629,099 | 10% | ||
dongfengman | 0 | 8,162,565,332 | 85.49% | ||
historylover | 0 | 380,955,553 | 100% | ||
serenazz | 0 | 886,903,627 | 86.58% | ||
annabellenoelle | 0 | 1,202,889,037 | 20% | ||
yedda | 0 | 581,338,948 | 98.96% | ||
shentrading | 0 | 964,680,538 | 80.72% | ||
zasilla | 0 | 578,504,860 | 98.93% | ||
aaronstar | 0 | 57,101,388 | 98.95% | ||
ayanamoon | 0 | 50,063,068 | 98.95% | ||
ethanlee | 0 | 7,238,058,006 | 65.06% | ||
andrewnoel | 0 | 1,040,900,597 | 100% | ||
kamel101 | 0 | 501,777,431 | 100% | ||
twinsnicole | 0 | 579,182,248 | 98.93% | ||
deepthinking | 0 | 582,776,626 | 98.95% | ||
herryazmi11 | 0 | 587,211,339 | 100% | ||
fishbb | 0 | 423,600,481 | 2.5% | ||
wilfredn | 0 | 9,225,671,442 | 60% | ||
iswanisamion | 0 | 64,180,866 | 100% | ||
fanso | 0 | 894,166,127 | 76.29% | ||
aellly | 0 | 0 | 0% | ||
abss | 0 | 92,666,914 | 11% | ||
lilypang22 | 0 | 6,069,987,683 | 92.93% | ||
klw | 0 | 3,340,090,700 | 100% | ||
zens | 0 | 580,836,563 | 98.97% | ||
ashi0 | 0 | 579,797,859 | 98.93% | ||
steemitvip | 0 | 581,928,779 | 98.93% | ||
irelandscape | 0 | 1,843,894,990 | 100% | ||
regals | 0 | 583,346,207 | 98.96% | ||
liuzg | 0 | 59,288,987 | 25% | ||
joelone | 0 | 578,433,409 | 98.92% | ||
shaphir | 0 | 1,978,372,770 | 100% | ||
sweet-jenny8 | 0 | 13,975,661,902 | 81.04% | ||
agoha | 0 | 208,263,044 | 50% | ||
pgr | 0 | 496,912,823 | 100% | ||
laijihua | 0 | 612,628,018 | 100% | ||
rsmartt777 | 0 | 250,777,059 | 90% | ||
myapple | 0 | 116,714,598 | 100% | ||
bambugrove | 0 | 125,306,115 | 30% |
Hi @justyy. I just voted for you as witness. I had no problem doing so because I have used your tools at helloacm.com and find them very handy! Thanks for all you do!
author | bbrewer |
---|---|
permlink | re-justyy-algorithms-series-0-1-backpack-acm-0-1-20180422t033014602z |
category | programming |
json_metadata | {"tags":["programming"],"users":["justyy"],"app":"steemit/0.1"} |
created | 2018-04-22 03:30:18 |
last_update | 2018-04-22 03:30:18 |
depth | 1 |
children | 1 |
last_payout | 2018-04-29 03:30:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.070 HBD |
curator_payout_value | 0.019 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 166 |
author_reputation | 7,852,511,958,185 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 51,412,395 |
net_rshares | 14,457,225,989 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
bbrewer | 0 | 14,457,225,989 | 100% |
Thank you very much.
author | justyy |
---|---|
permlink | re-bbrewer-re-justyy-algorithms-series-0-1-backpack-acm-0-1-20180422t094151812z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-04-22 09:41:57 |
last_update | 2018-04-22 09:41:57 |
depth | 2 |
children | 0 |
last_payout | 2018-04-29 09:41:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.064 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 20 |
author_reputation | 280,616,224,641,976 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 51,455,940 |
net_rshares | 10,214,283,893 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
happyukgo | 0 | 370,766,486 | 20% | ||
superbing | 0 | 2,220,181,432 | 20% | ||
dailyfortune | 0 | 1,476,120,237 | 20% | ||
dailystats | 0 | 3,650,620,213 | 20% | ||
dailychina | 0 | 2,496,595,525 | 20% |
Nice, is great program
author | munawire |
---|---|
permlink | re-justyy-algorithms-series-0-1-backpack-acm-0-1-20180422t022944063z |
category | programming |
json_metadata | {"tags":["programming"],"community":"busy","app":"busy/2.4.0"} |
created | 2018-04-22 02:29:48 |
last_update | 2018-04-22 02:29:48 |
depth | 1 |
children | 0 |
last_payout | 2018-04-29 02:29:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 23 |
author_reputation | 3,038,463,002,553 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 51,405,765 |
net_rshares | 0 |
学习了,先复制粘贴下来,慢慢看。
author | myapple |
---|---|
permlink | re-justyy-algorithms-series-0-1-backpack-acm-0-1-20180422t025056277z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-04-22 02:51:00 |
last_update | 2018-04-22 02:51:00 |
depth | 1 |
children | 1 |
last_payout | 2018-04-29 02:51:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 16 |
author_reputation | 48,560,130,638 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 51,408,036 |
net_rshares | 0 |
steem 就这点不好, 以前的文章没有收藏功能。
author | justyy |
---|---|
permlink | re-myapple-re-justyy-algorithms-series-0-1-backpack-acm-0-1-20180423t085833463z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-04-23 08:58:33 |
last_update | 2018-04-23 08:58:33 |
depth | 2 |
children | 0 |
last_payout | 2018-04-30 08:58:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.066 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 25 |
author_reputation | 280,616,224,641,976 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 51,640,174 |
net_rshares | 10,237,462,021 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
happyukgo | 0 | 370,772,191 | 20% | ||
superbing | 0 | 2,223,621,331 | 20% | ||
dailyfortune | 0 | 1,478,521,891 | 20% | ||
dailystats | 0 | 3,662,132,249 | 20% | ||
dailychina | 0 | 2,502,414,359 | 20% |
赞,只要着重讲解动态规划方程就行,程序实现写多了感觉帮助不大,看着方程自己实现就好了。
author | objc0 |
---|---|
permlink | re-justyy-algorithms-series-0-1-backpack-acm-0-1-20180425t082614129z |
category | programming |
json_metadata | {"tags":["programming"],"app":"steemit/0.1"} |
created | 2018-04-25 08:26:15 |
last_update | 2018-04-25 08:26:15 |
depth | 1 |
children | 0 |
last_payout | 2018-05-02 08:26:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 43 |
author_reputation | 3,456,457,068 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 52,022,034 |
net_rshares | 0 |
Hello justyy! Congratulations! This post has been randomly Resteemed! For a chance to get more of your content resteemed join the [Steem Engine Team](https://steemit.com/steemit/@steemengineteam/join-steemengine-today)
author | resteemsupport |
---|---|
permlink | re-algorithms-series-0-1-backpack-acm-0-1-20180422t022007 |
category | programming |
json_metadata | "" |
created | 2018-04-22 02:20:09 |
last_update | 2018-04-22 02:20:09 |
depth | 1 |
children | 0 |
last_payout | 2018-04-29 02:20:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 219 |
author_reputation | -6,530,562,082,764 |
root_title | "Algorithms Series: 0/1 BackPack ACM题解 - 经典0/1背包问题" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 51,404,703 |
net_rshares | -280,140,617 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
resteemsupport | 0 | 116,196,801 | 100% | ||
thisflagisfor | 0 | -396,337,418 | -1.5% |