2022-03-27 20:46:41 +08:00
{
"data" : {
"question" : {
"questionId" : "763" ,
"questionFrontendId" : "761" ,
"categoryTitle" : "Algorithms" ,
"boundTopicId" : 1839 ,
"title" : "Special Binary String" ,
"titleSlug" : "special-binary-string" ,
2023-12-09 18:42:21 +08:00
"content" : "<p><strong>Special binary strings</strong> are binary strings with the following two properties:</p>\n\n<ul>\n\t<li>The number of <code>0</code>'s is equal to the number of <code>1</code>'s.</li>\n\t<li>Every prefix of the binary string has at least as many <code>1</code>'s as <code>0</code>'s.</li>\n</ul>\n\n<p>You are given a <strong>special binary</strong> string <code>s</code>.</p>\n\n<p>A move consists of choosing two consecutive, non-empty, special substrings of <code>s</code>, and swapping them. Two strings are consecutive if the last character of the first string is exactly one index before the first character of the second string.</p>\n\n<p>Return <em>the lexicographically largest resulting string possible after applying the mentioned operations on the string</em>.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "11011000"\n<strong>Output:</strong> "11100100"\n<strong>Explanation:</strong> The strings "10" [occuring at s[1]] and "1100" [at s[3]] are swapped.\nThis is the lexicographically largest string possible after some number of swaps.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "10"\n<strong>Output:</strong> "10"\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 50</code></li>\n\t<li><code>s[i]</code> is either <code>'0'</code> or <code>'1'</code>.</li>\n\t<li><code>s</code> is a special binary string.</li>\n</ul>\n" ,
2022-03-27 20:46:41 +08:00
"translatedTitle" : "特殊的二进制序列" ,
"translatedContent" : "<p>特殊的二进制序列是具有以下两个性质的二进制序列:</p>\n\n<ul>\n\t<li>0 的数量与 1 的数量相等。</li>\n\t<li>二进制序列的每一个前缀码中 1 的数量要大于等于 0 的数量。</li>\n</ul>\n\n<p>给定一个特殊的二进制序列 <code>S</code>,以字符串形式表示。定义一个<em>操作 </em>为首先选择 <code>S</code> 的两个连续且非空的特殊的子串,然后将它们交换。(两个子串为连续的当且仅当第一个子串的最后一个字符恰好为第二个子串的第一个字符的前一个字符。)</p>\n\n<p>在任意次数的操作之后,交换后的字符串按照字典序排列的最大的结果是什么?</p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> S = "11011000"\n<strong>输出:</strong> "11100100"\n<strong>解释:</strong>\n将子串 "10" ( 在S[1]出现) 和 "1100" ( 在S[3]出现)进行交换。\n这是在进行若干次操作后按字典序排列最大的结果。\n</pre>\n\n<p><strong>说明:</strong></p>\n\n<ol>\n\t<li><code>S</code> 的长度不超过 <code>50</code>。</li>\n\t<li><code>S</code> 保证为一个满足上述定义的<em>特殊 </em>的二进制序列。</li>\n</ol>\n" ,
"isPaidOnly" : false ,
"difficulty" : "Hard" ,
2023-12-09 18:42:21 +08:00
"likes" : 230 ,
2022-03-27 20:46:41 +08:00
"dislikes" : 0 ,
"isLiked" : null ,
2023-12-09 18:42:21 +08:00
"similarQuestions" : "[{\"title\": \"Valid Parenthesis String\", \"titleSlug\": \"valid-parenthesis-string\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u6709\\u6548\\u7684\\u62ec\\u53f7\\u5b57\\u7b26\\u4e32\", \"isPaidOnly\": false}]" ,
2022-03-27 20:46:41 +08:00
"contributors" : [ ] ,
2023-12-09 18:42:21 +08:00
"langToValidPlayground" : "{\"cpp\": true, \"java\": true, \"python\": true, \"python3\": true, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false}" ,
2022-03-27 20:46:41 +08:00
"topicTags" : [
{
"name" : "Recursion" ,
"slug" : "recursion" ,
"translatedName" : "递归" ,
"__typename" : "TopicTagNode"
} ,
{
"name" : "String" ,
"slug" : "string" ,
"translatedName" : "字符串" ,
"__typename" : "TopicTagNode"
}
] ,
"companyTagStats" : null ,
"codeSnippets" : [
{
"lang" : "C++" ,
"langSlug" : "cpp" ,
"code" : "class Solution {\npublic:\n string makeLargestSpecial(string s) {\n\n }\n};" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Java" ,
"langSlug" : "java" ,
"code" : "class Solution {\n public String makeLargestSpecial(String s) {\n\n }\n}" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Python" ,
"langSlug" : "python" ,
"code" : "class Solution(object):\n def makeLargestSpecial(self, s):\n \"\"\"\n :type s: str\n :rtype: str\n \"\"\"" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Python3" ,
"langSlug" : "python3" ,
"code" : "class Solution:\n def makeLargestSpecial(self, s: str) -> str:" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "C" ,
"langSlug" : "c" ,
2023-12-09 18:42:21 +08:00
"code" : "char* makeLargestSpecial(char* s) {\n \n}" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "C#" ,
"langSlug" : "csharp" ,
"code" : "public class Solution {\n public string MakeLargestSpecial(string s) {\n\n }\n}" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "JavaScript" ,
"langSlug" : "javascript" ,
"code" : "/**\n * @param {string} s\n * @return {string}\n */\nvar makeLargestSpecial = function(s) {\n\n};" ,
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "TypeScript" ,
"langSlug" : "typescript" ,
"code" : "function makeLargestSpecial(s: string): string {\n \n};" ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "PHP" ,
"langSlug" : "php" ,
"code" : "class Solution {\n\n /**\n * @param String $s\n * @return String\n */\n function makeLargestSpecial($s) {\n\n }\n}" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Swift" ,
"langSlug" : "swift" ,
"code" : "class Solution {\n func makeLargestSpecial(_ s: String) -> String {\n\n }\n}" ,
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Kotlin" ,
"langSlug" : "kotlin" ,
"code" : "class Solution {\n fun makeLargestSpecial(s: String): String {\n\n }\n}" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Dart" ,
"langSlug" : "dart" ,
"code" : "class Solution {\n String makeLargestSpecial(String s) {\n \n }\n}" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Go" ,
"langSlug" : "golang" ,
"code" : "func makeLargestSpecial(s string) string {\n\n}" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Ruby" ,
"langSlug" : "ruby" ,
"code" : "# @param {String} s\n# @return {String}\ndef make_largest_special(s)\n\nend" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Scala" ,
"langSlug" : "scala" ,
"code" : "object Solution {\n def makeLargestSpecial(s: String): String = {\n\n }\n}" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
2023-12-09 18:42:21 +08:00
"lang" : "Rust" ,
"langSlug" : "rust" ,
"code" : "impl Solution {\n pub fn make_largest_special(s: String) -> String {\n\n }\n}" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Racket" ,
"langSlug" : "racket" ,
2023-12-09 18:42:21 +08:00
"code" : "(define/contract (make-largest-special s)\n (-> string? string?)\n )" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Erlang" ,
"langSlug" : "erlang" ,
"code" : "-spec make_largest_special(S :: unicode:unicode_binary()) -> unicode:unicode_binary().\nmake_largest_special(S) ->\n ." ,
"__typename" : "CodeSnippetNode"
} ,
{
"lang" : "Elixir" ,
"langSlug" : "elixir" ,
2023-12-09 18:42:21 +08:00
"code" : "defmodule Solution do\n @spec make_largest_special(s :: String.t) :: String.t\n def make_largest_special(s) do\n \n end\nend" ,
2022-03-27 20:46:41 +08:00
"__typename" : "CodeSnippetNode"
}
] ,
2023-12-09 18:42:21 +08:00
"stats" : "{\"totalAccepted\": \"17.2K\", \"totalSubmission\": \"22.9K\", \"totalAcceptedRaw\": 17211, \"totalSubmissionRaw\": 22933, \"acRate\": \"75.0%\"}" ,
2022-03-27 20:46:41 +08:00
"hints" : [
"Draw a line from (x, y) to (x+1, y+1) if we see a \"1\", else to (x+1, y-1).\r\nA special substring is just a line that starts and ends at the same y-coordinate, and that is the lowest y-coordinate reached.\r\nCall a mountain a special substring with no special prefixes - ie. only at the beginning and end is the lowest y-coordinate reached.\r\nIf F is the answer function, and S has mountain decomposition M1,M2,M3,...,Mk, then the answer is:\r\nreverse_sorted(F(M1), F(M2), ..., F(Mk)).\r\nHowever, you'll also need to deal with the case that S is a mountain, such as 11011000 -> 11100100."
] ,
"solution" : null ,
"status" : null ,
"sampleTestCase" : "\"11011000\"" ,
"metaData" : "{\n \"name\": \"makeLargestSpecial\",\n \"params\": [\n {\n \"name\": \"s\",\n \"type\": \"string\"\n }\n ],\n \"return\": {\n \"type\": \"string\"\n }\n}" ,
"judgerAvailable" : true ,
"judgeType" : "large" ,
"mysqlSchemas" : [ ] ,
"enableRunCode" : true ,
2023-12-09 18:42:21 +08:00
"envInfo" : " { \ " c p p \ " : [ \ " C + + \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > c l a n g 1 1 < \ \ / c o d e > \ \ u 9 1 c 7 \ \ u 7 5 2 8 \ \ u 6 7 0 0 \ \ u 6 5 b 0 C + + 2 0 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 7 f 1 6 \ \ u 8 b d 1 \ \ u 6 5 f 6 \ \ u f f 0 c \ \ u 5 c 0 6 \ \ u 4 f 1 a \ \ u 9 1 c 7 \ \ u 7 5 2 8 < c o d e > - O 2 < \ \ / c o d e > \ \ u 7 e a 7 \ \ u 4 f 1 8 \ \ u 5 3 1 6 \ \ u 3 0 0 2 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / g i t h u b . c o m \ \ / g o o g l e \ \ / s a n i t i z e r s \ \ / w i k i \ \ / A d d r e s s S a n i t i z e r \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > A d d r e s s S a n i t i z e r < \ \ / a > \ \ u 4 e 5 f \ \ u 8 8 a b \ \ u 5 f 0 0 \ \ u 5 4 2 f \ \ u 6 7 6 5 \ \ u 6 8 c 0 \ \ u 6 d 4 b < c o d e > o u t - o f - b o u n d s < \ \ / c o d e > \ \ u 5 4 8 c < c o d e > u s e - a f t e r - f r e e < \ \ / c o d e > \ \ u 9 5 1 9 \ \ u 8 b e f \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 5 e 9 3 \ \ u 7 6 8 4 \ \ u 5 9 3 4 \ \ u 6 5 8 7 \ \ u 4 e f 6 \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 8 8 a b \ \ u 8 1 e a \ \ u 5 2 a 8 \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ " ] , \ " j a v a \ " : [ \ " J a v a \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > O p e n J D K 1 7 < \ \ / c o d e > \ \ u 3 0 0 2 \ \ u 5 3 e f \ \ u 4 e e 5 \ \ u 4 f 7 f \ \ u 7 5 2 8 J a v a 8 \ \ u 7 6 8 4 \ \ u 7 2 7 9 \ \ u 6 0 2 7 \ \ u 4 f 8 b \ \ u 5 9 8 2 \ \ u f f 0 c l a m b d a e x p r e s s i o n s \ \ u 5 4 8 c s t r e a m A P I \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u 8 d 7 7 \ \ u 8 9 c 1 \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 5 e 9 3 \ \ u 7 6 8 4 \ \ u 5 9 3 4 \ \ u 6 5 8 7 \ \ u 4 e f 6 \ \ u 5 d f 2 \ \ u 8 8 a b \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 5 3 0 5 \ \ u 5 4 2 b P a i r \ \ u 7 c 7 b : h t t p s : \ \ / \ \ / d o c s . o r a c l e . c o m \ \ / j a v a s e \ \ / 8 \ \ / j a v a f x \ \ / a p i \ \ / j a v a f x \ \ / u t i l \ \ / P a i r . h t m l < \ \ / p > \ " ] , \ " p y t h o n \ " : [ \ " P y t h o n \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > P y t h o n 2 . 7 . 1 2 < \ \ / c o d e > < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u 8 d 7 7 \ \ u 8 9 c 1 \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 5 e 3 8 \ \ u 7 5 2 8 \ \ u 5 e 9 3 \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 8 8 a b \ \ u 8 1 e a \ \ u 5 2 a 8 \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u f f 0 c \ \ u 5 9 8 2 \ \ u f f 1 a < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / d o c s . p y t h o n . o r g \ \ / 2 \ \ / l i b r a r y \ \ / a r r a y . h t m l \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > a r r a y < \ \ / a > , < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / d o c s . p y t h o n . o r g \ \ / 2 \ \ / l i b r a r y \ \ / b i s e c t . h t m l \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > b i s e c t < \ \ / a > , < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / d o c s . p y t h o n . o r g \ \ / 2 \ \ / l i b r a r y \ \ / c o l l e c t i o n s . h t m l \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > c o l l e c t i o n s < \ \ / a > \ \ u 3 0 0 2 \ \ u 5 9 8 2 \ \ u 6 7 9 c \ \ u 6 0 a 8 \ \ u 9 7 0 0 \ \ u 8 9 8 1 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 5 1 7 6 \ \ u 4 e d 6 \ \ u 5 e 9 3 \ \ u 5 1 f d \ \ u 6 5 7 0 \ \ u f f 0 c \ \ u 8 b f 7 \ \ u 8 1 e a \ \ u 8 8 4 c \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 6 c e 8 \ \ u 6 1 0 f P y t h o n 2 . 7 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / w w w . p y t h o n . o r g \ \ / d e v \ \ / p e p s \ \ / p e p - 0 3 7 3 \ \ / \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > \ \ u 5 c 0 6 \ \ u 5 7 2 8 2 0 2 0 \ \ u 5 e 7 4 \ \ u 5 4 0 e \ \ u 4 e 0 d \ \ u 5 1 8 d \ \ u 7 e f 4 \ \ u 6 2 a 4 < \ \ / a > \ \ u 3 0 0 2 \ \ u 5 9 8 2 \ \ u 6 0 f 3 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 6 7 0 0 \ \ u 6 5 b 0 \ \ u 7 2 4 8 \ \ u 7 6 8 4 P y t h o n \ \ u f f 0 c \ \ u 8 b f 7 \ \ u 9 0 0 9 \ \ u 6 2 e 9 P y t h o n 3 \ \ u 3 0 0 2 < \ \ / p > \ " ] , \ " c \ " : [ \ " C \ " , \ " < p > \ \ u 7 2 4 8 \ \ u 6 7 2 c \ \ u f f 1 a < c o d e > G C C 8 . 2 < \ \ / c o d e > \ \ u f f 0 c \ \ u 9 1 c 7 \ \ u 7 5 2 8 G N U 1 1 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 7 f 1 6 \ \ u 8 b d 1 \ \ u 6 5 f 6 \ \ u f f 0 c \ \ u 5 c 0 6 \ \ u 4 f 1 a \ \ u 9 1 c 7 \ \ u 7 5 2 8 < c o d e > - O 1 < \ \ / c o d e > \ \ u 7 e a 7 \ \ u 4 f 1 8 \ \ u 5 3 1 6 \ \ u 3 0 0 2 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / g i t h u b . c o m \ \ / g o o g l e \ \ / s a n i t i z e r s \ \ / w i k i \ \ / A d d r e s s S a n i t i z e r \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > A d d r e s s S a n i t i z e r < \ \ / a > \ \ u 4 e 5 f \ \ u 8 8 a b \ \ u 5 f 0 0 \ \ u 5 4 2 f \ \ u 6 7 6 5 \ \ u 6 8 c 0 \ \ u 6 d 4 b < c o d e > o u t - o f - b o u n d s < \ \ / c o d e > \ \ u 5 4 8 c < c o d e > u s e - a f t e r - f r e e < \ \ / c o d e > \ \ u 9 5 1 9 \ \ u 8 b e f \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 4 e 3 a \ \ u 4 e 8 6 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 6 5 b 9 \ \ u 4 f b f \ \ u f f 0 c \ \ u 5 9 2 7 \ \ u 9 0 e 8 \ \ u 5 2 0 6 \ \ u 6 8 0 7 \ \ u 5 1 c 6 \ \ u 5 e 9 3 \ \ u 7 6 8 4 \ \ u 5 9 3 4 \ \ u 6 5 8 7 \ \ u 4 e f 6 \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 8 8 a b \ \ u 8 1 e a \ \ u 5 2 a 8 \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > \ \ u 5 9 8 2 \ \ u 6 0 f 3 \ \ u 4 f 7 f \ \ u 7 5 2 8 \ \ u 5 4 c 8 \ \ u 5 e 0 c \ \ u 8 8 6 8 \ \ u 8 f d 0 \ \ u 7 b 9 7 , \ \ u 6 0 a 8 \ \ u 5 3 e f \ \ u 4 e e 5 \ \ u 4 f 7 f \ \ u 7 5 2 8 < a h r e f = \ \ \ " h t t p s : \ \ / \ \ / t r o y d h a n s o n . g i t h u b . i o \ \ / u t h a s h \ \ / \ \ \ " t a r g e t = \ \ \ " _ b l a n k \ \ \ " > u t h a s h < \ \ / a > \ \ u 3 0 0 2 \ \ \ " u t h a s h . h \ \ \ " \ \ u 5 d f 2 \ \ u 7 e c f \ \ u 9 e d 8 \ \ u 8 b a 4 \ \ u 8 8 a b \ \ u 5 b f c \ \ u 5 1 6 5 \ \ u 3 0 0 2 \ \ u 8 b f 7 \ \ u 7 7 0 b \ \ u 5 9 8 2 \ \ u 4 e 0 b \ \ u 7 9 3 a \ \ u 4 f 8 b : < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > < b > 1 . \ \ u 5 f 8 0 \ \ u 5 4 c 8 \ \ u 5 e 0 c \ \ u 8 8 6 8 \ \ u 4 e 2 d \ \ u 6 d f b \ \ u 5 2 a 0 \ \ u 4 e 0 0 \ \ u 4 e 2 a \ \ u 5 b f 9 \ \ u 8 c 6 1 \ \ u f f 1 a < \ \ / b > \ \ r \ \ n < p r e > \ \ r \ \ n s t r u c t h a s h _ e n t r y { \ \ r \ \ n i n t i d ; \ \ / * w e ' l l u s e t h i s f i e l d a s t h e k e y * \ \ / \ \ r \ \ n c h a r n a m e [ 1 0 ] ; \ \ r \ \ n U T _ h a s h _ h a n d l e h h ; \ \ / * m a k e s t h i s s t r u c t u r e h a s h a b l e * \ \ / \ \ r \ \ n } ; \ \ r \ \ n \ \ r \ \ n s t r u c t h a s h _ e n t r y * u s e r s = N U L L ; \ \ r \ \ n \ \ r \ \ n v o i d a d d _ u s e r ( s t r u c t h a s h _ e n t r y * s ) { \ \ r \ \ n H A S H _ A D D _ I N T ( u s e r s , i d , s ) ; \ \ r \ \ n } \ \ r \ \ n < \ \ / p r e > \ \ r \ \ n < \ \ / p > \ \ r \ \ n \ \ r \ \ n < p > < b > 2 . \ \ u 5728 \ \ u 54 c 8 \ \ u 5e0 c \ \ u 8868 \ \ u 4e2 d \ \ u 67e5 \ \ u 627 e \ \ u 4e00 \ \ u 4e2 a \ \ u 5 b f 9 \ \ u 8 c 61 \ \ u f f 1 a < \ \ / b > \ \ r \ \ n < p r e > \ \ r \ \ n s t r u c t h a s h _ e n t r y * f i n d _ u s e r ( i n t u s e r _ i d ) { \ \ r \ \ n s t r u c t h a s h _ e n t r y * s ; \ \ r \ \ n H A S H _ F I N D _ I N T ( u s e r s , & u s e r _ i d , s ) ; \ \ r \ \ n r e
2022-03-27 20:46:41 +08:00
"book" : null ,
"isSubscribed" : false ,
"isDailyQuestion" : false ,
"dailyRecordStatus" : null ,
"editorType" : "CKEDITOR" ,
"ugcQuestionId" : null ,
"style" : "LEETCODE" ,
"exampleTestcases" : "\"11011000\"\n\"10\"" ,
"__typename" : "QuestionNode"
}
}
}