{"id":437890,"date":"2021-04-18T16:56:14","date_gmt":"2021-04-18T08:56:14","guid":{"rendered":"http:\/\/4563.org\/?p=437890"},"modified":"2021-04-18T16:56:14","modified_gmt":"2021-04-18T08:56:14","slug":"%e4%b8%8d%e7%9f%a5%e9%81%93%e6%9c%89%e6%b2%a1%e6%9c%89%e6%9b%b4%e5%a5%bd%e7%9a%84%e8%a7%a3%e6%b3%95","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=437890","title":{"rendered":"\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u66f4\u597d\u7684\u89e3\u6cd5~"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u66f4\u597d\u7684\u89e3\u6cd5~               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zzzrf <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h2>\u539f\u9898\u76f4\u63a5\u770b\u8fd9\u91cc\u5427~<\/h2>\n<p>\u6211\u5c31\u5199\u4e86\u4e00\u79cd\u89e3\u6cd5\u3002\u4e5f\u4e0d\u77e5\u9053\u662f\u4e0d\u662f\u6700\u4f18\u89e3\u3002\u5927\u5bb6\u5e2e\u5fd9\u770b\u770b~<\/p>\n<h3>\u89e3\u91ca:<\/h3>\n<p>\u6bcf\u4e00\u4e2a\u7269\u54c1\u90fd\u4fdd\u6301\u539f\u4ef7\uff0c\u4ed6\u4eec\u7684\u53f3\u8fb9\u90fd\u6ca1\u6709\u7b49\u4e8e\u6216\u8005\u66f4\u4f4e\u4ef7\u683c\u7684\u7269\u54c1<\/p>\n<p>\u5355\u8c03\u975e\u9012\u51cf\u6808\u6765\u5b58\u50a8\u4e4b\u524d\u7684\u503c\uff0c\u5f53\u51fa\u73b0\u6bd4\u6808\u9876\u6240\u5b58\u503c\u66f4\u5c0f\u7684\u503c\u5219\u53ef\u4ee5\u66f4\u65b0\u4e4b\u524d\u7684\u4ef7\u683c\u3002<\/p>\n<h3>\u4ee3\u7801<\/h3>\n<pre><code>class Solution:     \"\"\"     @param prices: a list of integer     @return: return the actual prices     \"\"\"     def FinalDiscountedPrice(self, prices):         # write your code here         s, res = [], [prices[i] for i in range(len(prices))]          for i in range(len(prices)):                 while len(s) != 0 and prices[s[-1]] &gt;= prices[i]:                         index = s[-1]                         s.pop()                         res[index] = prices[index] - prices[i]                 s.append(i);         return res <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u66f4\u597d\u7684\u89e3\u6cd5~ \u8cc7\u6df1\u5927\u4f6c&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/437890"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=437890"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/437890\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=437890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=437890"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=437890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}