{"id":1231,"date":"2023-01-02T09:32:54","date_gmt":"2023-01-02T01:32:54","guid":{"rendered":"http:\/\/www.type59magictank.space\/?p=1231"},"modified":"2023-01-02T09:32:55","modified_gmt":"2023-01-02T01:32:55","slug":"leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0","status":"publish","type":"post","link":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/","title":{"rendered":"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570"},"content":{"rendered":"\n<p>\u4eca\u5929\u6bcf\u65e5\u4e00\u9898\u6709\u70b9\u4e1c\u897f\uff0c\u4e00\u5f00\u59cb\u76f4\u63a5\u7528vector\u52a0\u63d2\u5165\u6392\u5e8f\u7ef4\u62a4\u4e24\u4e2a\u521d\u59cb\u6709\u5e8f\u7684\u5e8f\u5217\u4f46\u662f\u8d85\u65f6\u4e86\uff0c\u5e94\u8be5\u662f\u7ef4\u62a4\u6709\u5e8f\u6570\u5217\u7684\u8fc7\u7a0b\u4e2d\u7684\u63d2\u5165\u5220\u9664\u64cd\u4f5c\u628a\u65f6\u95f4\u590d\u6742\u5ea6\u9876\u5230n\u65b9\uff0c1e5\u7684\u6570\u636e\u8303\u56f4\u7206\u65f6\u95f4\u5c31\u662f\u5408\u7406\u7684\u4e86\uff0c\u7136\u540e\u8003\u8651\u7528\u4f18\u5148\u961f\u5217\u3002\u4f18\u5148\u961f\u5217\u7528\u7684\u662f\u5927\u6839\u5806\u5c0f\u6839\u5806\uff0c\u65f6\u95f4\u590d\u6742\u5ea6\u5728nlogn\u5de6\u53f3\uff0c\u7136\u540e\u624d\u8fc7\u4e86\uff0c\u8fd8\u662f\u6709\u4e00\u70b9\u96be\u5ea6\u7684\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Solution {\r\npublic:\r\n    int getNumberOfBacklogOrders(vector&lt;vector&lt;int>>&amp; orders) {\r\n        priority_queue&lt;pair&lt;int,int>> buy;\/\/buy\u5b58\u91c7\u8d2d\uff0c\u964d\u5e8f\r\n        priority_queue&lt;pair&lt;int,int>,vector&lt;pair&lt;int,int>>,greater&lt;>> sell;\/\/sell\u5b58\u9500\u552e\uff0c\u5347\u5e8f\r\n        int n=orders.size(),ans=0,mod=1e9+7;\r\n        for (int i=0;i&lt;n;i++){\r\n            if (orders&#91;i]&#91;2]==0){\r\n                while(orders&#91;i]&#91;1] &amp;&amp; !sell.empty() &amp;&amp; sell.top().first&lt;=orders&#91;i]&#91;0]){\/\/\u5356\u51fa\u961f\u5217\u6700\u4f4e\u8005\r\n                    auto &#91;price,amoumt]=sell.top();\r\n                    sell.pop();\r\n                    if (amoumt&lt;=orders&#91;i]&#91;1]){\r\n                        ans=(ans-amoumt+mod)%mod;\r\n                        orders&#91;i]&#91;1]-=amoumt;\r\n                    }else{\r\n                        sell.push({price,amoumt-orders&#91;i]&#91;1]});\r\n                        ans=(ans-orders&#91;i]&#91;1]+mod)%mod;\r\n                        orders&#91;i]&#91;1]=0;\r\n                    }\r\n                }\r\n                if (orders&#91;i]&#91;1]){\r\n                        buy.push({orders&#91;i]&#91;0],orders&#91;i]&#91;1]});\/\/\u8bb0\u5f97\u52a0\u5927\u62ec\u53f7\uff0c\u662f\u540c\u4e00\u5143\u7d20\r\n                        ans=(ans+orders&#91;i]&#91;1])%mod;\r\n                    }\r\n            }else{\r\n                while(orders&#91;i]&#91;1] &amp;&amp; !buy.empty() &amp;&amp; buy.top().first>=orders&#91;i]&#91;0]){\/\/\u4e70\u5165\u961f\u5217\u6700\u9ad8\u8005\r\n                    auto &#91;price,amoumt]=buy.top();\r\n                    buy.pop();\r\n                    if (amoumt&lt;=orders&#91;i]&#91;1]){\r\n                        ans=(ans-amoumt+mod)%mod;\r\n                        orders&#91;i]&#91;1]-=amoumt;\r\n                    }else{\r\n                        buy.push({price,amoumt-orders&#91;i]&#91;1]});\r\n                        ans=(ans-orders&#91;i]&#91;1]+mod)%mod;\r\n                        orders&#91;i]&#91;1]=0;\r\n                    }\r\n                }\r\n                if (orders&#91;i]&#91;1]){\r\n                        sell.push({orders&#91;i]&#91;0],orders&#91;i]&#91;1]});\r\n                        ans=(ans+orders&#91;i]&#91;1])%mod;\r\n                    }\r\n            }\r\n        }\r\n        return ans;\r\n    }\r\n};\r\n\/*\r\n        for (int i=0;i&lt;n;i++){\r\n            if (orders&#91;i]&#91;2]==0){\r\n                for (int j=0;j&lt;sell.size();j++)\r\n                    if (sell&#91;j]&#91;0]&lt;=orders&#91;i]&#91;0]){\r\n                        if (sell&#91;j]&#91;1]&lt;=orders&#91;i]&#91;1]){\r\n                            orders&#91;i]&#91;1]=orders&#91;i]&#91;1]-sell&#91;j]&#91;1];\r\n                            sell.erase(sell.begin()+j);\r\n                            j--;\r\n                        }else{\r\n                            sell&#91;j]&#91;1]=sell&#91;j]&#91;1]-orders&#91;i]&#91;1];\r\n                            orders&#91;i]&#91;1]=0;\r\n                            break;\r\n                        }\r\n                    }\r\n            }else{\r\n                for (int j=0;j&lt;buy.size();j++)\r\n                    if (buy&#91;j]&#91;0]>=orders&#91;i]&#91;0]){\r\n                        if (buy&#91;j]&#91;1]&lt;=orders&#91;i]&#91;1]){\r\n                            orders&#91;i]&#91;1]=orders&#91;i]&#91;1]-buy&#91;j]&#91;1];\r\n                            buy.erase(buy.begin()+j);\r\n                            j--;\r\n                        }else{\r\n                            buy&#91;j]&#91;1]=buy&#91;j]&#91;1]-orders&#91;i]&#91;1];\r\n                            orders&#91;i]&#91;1]=0;\r\n                            break;\r\n                        }\r\n                    }\r\n            }\r\n            if (orders&#91;i]&#91;1]!=0){\r\n                if (orders&#91;i]&#91;2]==0){\r\n                    bool increasebuy=0;\r\n                    for (int j=0;j&lt;buy.size();j++)\r\n                        if (buy&#91;j]&#91;0]&lt;=orders&#91;i]&#91;0]){\r\n                            buy.insert(buy.begin()+j,orders&#91;i]);\r\n                            increasebuy=1;\r\n                            break;\r\n                        }\r\n                    if (!increasebuy) buy.insert(buy.end(),orders&#91;i]);\r\n                }else{\r\n                    bool increasesell=0;\r\n                    for (int j=0;j&lt;sell.size();j++)\r\n                        if (sell&#91;j]&#91;0]>=orders&#91;i]&#91;0]){\r\n                            sell.insert(sell.begin()+j,orders&#91;i]);\r\n                            increasesell=1;\r\n                            break;\r\n                        }\r\n                    if (!increasesell) sell.insert(sell.end(),orders&#91;i]);\r\n                }\r\n            }\r\n        }\r\n        int ans=0;\r\n        for (int j=0;j&lt;sell.size();j++)\r\n            ans=(ans+sell&#91;j]&#91;1]) % 1000000007;\r\n        for (int j=0;j&lt;buy.size();j++)\r\n            ans=(ans+buy&#91;j]&#91;1]) % 1000000007;\r\n        return ans;\r\n        *\/<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6bcf\u65e5\u4e00\u9898\u6709\u70b9\u4e1c\u897f\uff0c\u4e00\u5f00\u59cb\u76f4\u63a5\u7528vector\u52a0\u63d2\u5165\u6392\u5e8f\u7ef4\u62a4\u4e24\u4e2a\u521d\u59cb\u6709\u5e8f\u7684\u5e8f\u5217\u4f46\u662f\u8d85\u65f6\u4e86\uff0c\u5e94\u8be5\u662f\u7ef4\u62a4 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,26],"tags":[],"class_list":["post-1231","post","type-post","status-publish","format-standard","hentry","category-leetcode","category-26"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570 - \u6f2b\u6f2b\u5b66\u4e60\u8def<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570 - \u6f2b\u6f2b\u5b66\u4e60\u8def\" \/>\n<meta property=\"og:description\" content=\"\u4eca\u5929\u6bcf\u65e5\u4e00\u9898\u6709\u70b9\u4e1c\u897f\uff0c\u4e00\u5f00\u59cb\u76f4\u63a5\u7528vector\u52a0\u63d2\u5165\u6392\u5e8f\u7ef4\u62a4\u4e24\u4e2a\u521d\u59cb\u6709\u5e8f\u7684\u5e8f\u5217\u4f46\u662f\u8d85\u65f6\u4e86\uff0c\u5e94\u8be5\u662f\u7ef4\u62a4 &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6f2b\u6f2b\u5b66\u4e60\u8def\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-02T01:32:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-02T01:32:55+00:00\" \/>\n<meta name=\"author\" content=\"wxd\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"wxd\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/\"},\"author\":{\"name\":\"wxd\",\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/#\\\/schema\\\/person\\\/45bbe5221da9faf814039c1269f98a36\"},\"headline\":\"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570\",\"datePublished\":\"2023-01-02T01:32:54+00:00\",\"dateModified\":\"2023-01-02T01:32:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/\"},\"wordCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/#\\\/schema\\\/person\\\/45bbe5221da9faf814039c1269f98a36\"},\"articleSection\":[\"leetcode\",\"\u8ba1\u7b97\u673a\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/\",\"url\":\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/\",\"name\":\"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570 - \u6f2b\u6f2b\u5b66\u4e60\u8def\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/#website\"},\"datePublished\":\"2023-01-02T01:32:54+00:00\",\"dateModified\":\"2023-01-02T01:32:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/index.php\\\/2023\\\/01\\\/02\\\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/www.type59magictank.space\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/#website\",\"url\":\"https:\\\/\\\/www.type59magictank.space\\\/\",\"name\":\"type59magictank's web\",\"description\":\"type59magictank&#039;s blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/#\\\/schema\\\/person\\\/45bbe5221da9faf814039c1269f98a36\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.type59magictank.space\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/#\\\/schema\\\/person\\\/45bbe5221da9faf814039c1269f98a36\",\"name\":\"wxd\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg\",\"url\":\"https:\\\/\\\/www.type59magictank.space\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg\",\"contentUrl\":\"https:\\\/\\\/www.type59magictank.space\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg\",\"caption\":\"wxd\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.type59magictank.space\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570 - \u6f2b\u6f2b\u5b66\u4e60\u8def","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570\/","og_locale":"zh_CN","og_type":"article","og_title":"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570 - \u6f2b\u6f2b\u5b66\u4e60\u8def","og_description":"\u4eca\u5929\u6bcf\u65e5\u4e00\u9898\u6709\u70b9\u4e1c\u897f\uff0c\u4e00\u5f00\u59cb\u76f4\u63a5\u7528vector\u52a0\u63d2\u5165\u6392\u5e8f\u7ef4\u62a4\u4e24\u4e2a\u521d\u59cb\u6709\u5e8f\u7684\u5e8f\u5217\u4f46\u662f\u8d85\u65f6\u4e86\uff0c\u5e94\u8be5\u662f\u7ef4\u62a4 &hellip;","og_url":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570\/","og_site_name":"\u6f2b\u6f2b\u5b66\u4e60\u8def","article_published_time":"2023-01-02T01:32:54+00:00","article_modified_time":"2023-01-02T01:32:55+00:00","author":"wxd","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"wxd","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/#article","isPartOf":{"@id":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/"},"author":{"name":"wxd","@id":"https:\/\/www.type59magictank.space\/#\/schema\/person\/45bbe5221da9faf814039c1269f98a36"},"headline":"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570","datePublished":"2023-01-02T01:32:54+00:00","dateModified":"2023-01-02T01:32:55+00:00","mainEntityOfPage":{"@id":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/"},"wordCount":5,"publisher":{"@id":"https:\/\/www.type59magictank.space\/#\/schema\/person\/45bbe5221da9faf814039c1269f98a36"},"articleSection":["leetcode","\u8ba1\u7b97\u673a"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/","url":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/","name":"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570 - \u6f2b\u6f2b\u5b66\u4e60\u8def","isPartOf":{"@id":"https:\/\/www.type59magictank.space\/#website"},"datePublished":"2023-01-02T01:32:54+00:00","dateModified":"2023-01-02T01:32:55+00:00","breadcrumb":{"@id":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.type59magictank.space\/index.php\/2023\/01\/02\/leetcode-1801-%e7%a7%af%e5%8e%8b%e8%ae%a2%e5%8d%95%e4%b8%ad%e7%9a%84%e8%ae%a2%e5%8d%95%e6%80%bb%e6%95%b0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.type59magictank.space\/"},{"@type":"ListItem","position":2,"name":"LeetCode 1801.\u79ef\u538b\u8ba2\u5355\u4e2d\u7684\u8ba2\u5355\u603b\u6570"}]},{"@type":"WebSite","@id":"https:\/\/www.type59magictank.space\/#website","url":"https:\/\/www.type59magictank.space\/","name":"type59magictank's web","description":"type59magictank&#039;s blog","publisher":{"@id":"https:\/\/www.type59magictank.space\/#\/schema\/person\/45bbe5221da9faf814039c1269f98a36"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.type59magictank.space\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.type59magictank.space\/#\/schema\/person\/45bbe5221da9faf814039c1269f98a36","name":"wxd","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.type59magictank.space\/wp-content\/uploads\/2020\/05\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg","url":"https:\/\/www.type59magictank.space\/wp-content\/uploads\/2020\/05\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg","contentUrl":"https:\/\/www.type59magictank.space\/wp-content\/uploads\/2020\/05\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg","caption":"wxd"},"logo":{"@id":"https:\/\/www.type59magictank.space\/wp-content\/uploads\/2020\/05\/c49aad9a659abe1d3a4df3cb5432801ce55afed1.jpg@1320w_1388h.webp_-100x100.jpg"}}]}},"_links":{"self":[{"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/posts\/1231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/comments?post=1231"}],"version-history":[{"count":1,"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/posts\/1231\/revisions"}],"predecessor-version":[{"id":1232,"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/posts\/1231\/revisions\/1232"}],"wp:attachment":[{"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/media?parent=1231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/categories?post=1231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.type59magictank.space\/index.php\/wp-json\/wp\/v2\/tags?post=1231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}