锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲午夜无码AV毛片久久,久久超碰97人人做人人爱,91亚洲国产成人久久精品网址http://www.shnenglu.com/Uriel/category/11829.htmlResearch Associate @ Harvard University / Research Interests: Computer Vision, Biomedical Image Analysis, Machine Learningzh-cnThu, 25 Jan 2024 15:42:23 GMTThu, 25 Jan 2024 15:42:23 GMT60[LeetCode]1457. Pseudo-Palindromic Paths in a Binary Tree (Medium) Python-2024.01.24http://www.shnenglu.com/Uriel/articles/230262.htmlUrielUrielWed, 24 Jan 2024 11:26:00 GMThttp://www.shnenglu.com/Uriel/articles/230262.htmlhttp://www.shnenglu.com/Uriel/comments/230262.htmlhttp://www.shnenglu.com/Uriel/articles/230262.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/230262.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/230262.html
 1 #1457
 2 #Runtime: 911 ms (Beats 96.43%)
 3 #Memory: 136.7 MB (Beats 10.71%)
 4 
 5 # Definition for a binary tree node.
 6 # class TreeNode(object):
 7 #     def __init__(self, val=0, left=None, right=None):
 8 #         self.val = val
 9 #         self.left = left
10 #         self.right = right
11 class Solution(object):
12     def pseudoPalindromicPaths (self, root, cnt = 0):
13         """
14         :type root: TreeNode
15         :rtype: int
16         """
17         if not root:
18             return 0
19         cnt ^= 1 << (root.val - 1)
20         if root.left is None and root.right is None:
21             return 1 if cnt & (cnt - 1) == 0 else 0
22         return self.pseudoPalindromicPaths(root.left, cnt) + self.pseudoPalindromicPaths(root.right, cnt)
23         


Uriel 2024-01-24 19:26 鍙戣〃璇勮
]]>
[LeetCode]808. Soup Servings (Medium) Python3-2023.07.29http://www.shnenglu.com/Uriel/articles/229996.htmlUrielUrielSat, 29 Jul 2023 10:07:00 GMThttp://www.shnenglu.com/Uriel/articles/229996.htmlhttp://www.shnenglu.com/Uriel/comments/229996.htmlhttp://www.shnenglu.com/Uriel/articles/229996.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229996.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229996.html

 1 #808
 2 #Runtime: 36 ms (Beats 100%)
 3 #Memory: 17 MB (Beats 79.25%)
 4 
 5 class Solution:
 6     def soupServings(self, n: int) -> float:
 7         if n >= 4276: 
 8             return 1.0
 9         @lru_cache(None)
10         def dp(x, y):
11             if x <= 0 and y > 0:
12                 return 1
13             if x <= 0 and y <= 0:
14                 return 0.5
15             if x > 0 and y <= 0:
16                 return 0
17             return (dp(x - 100, y) + dp(x - 75, y - 25) + dp(x - 50, y - 50) + dp(x - 25, y - 75)) * 0.25
18         
19         return dp(1.0 * n, 1.0 * n)


Uriel 2023-07-29 18:07 鍙戣〃璇勮
]]>
[LeetCode]486. Predict the Winner (Medium) Python3-2023.07.28http://www.shnenglu.com/Uriel/articles/229995.htmlUrielUrielFri, 28 Jul 2023 09:37:00 GMThttp://www.shnenglu.com/Uriel/articles/229995.htmlhttp://www.shnenglu.com/Uriel/comments/229995.htmlhttp://www.shnenglu.com/Uriel/articles/229995.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229995.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229995.html

 1 #486
 2 #Runtime: 41 ms (Beats 96.36%)
 3 #Memory: 16.7 MB (Beats 19.78%)
 4 
 5 class Solution:
 6     def PredictTheWinner(self, nums: List[int]) -> bool:
 7         n = len(nums)
 8         @lru_cache(None)
 9         def dp(i, j):
10             return 0 if i > j else max(-dp(i + 1, j) + nums[i], -dp(i, j - 1) + nums[j])
11 
12         return dp(0, n -1) >= 0


Uriel 2023-07-28 17:37 鍙戣〃璇勮
]]>
[LeetCode]956. Tallest Billboard (Hard) Python-2023.06.24http://www.shnenglu.com/Uriel/articles/229943.htmlUrielUrielSun, 25 Jun 2023 14:34:00 GMThttp://www.shnenglu.com/Uriel/articles/229943.htmlhttp://www.shnenglu.com/Uriel/comments/229943.htmlhttp://www.shnenglu.com/Uriel/articles/229943.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229943.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229943.html閫掑綊DP+memorization錛屽弬鑰冧簡Discussion -> https://leetcode.com/problems/tallest-billboard/solutions/3675264/python3-solution/


 1 #956
 2 #Runtime: 960 ms (Beats 33.33%)
 3 #Memory: 121.3 MB (Beats 11.11%)
 4 
 5 class Solution(object):
 6     def tallestBillboard(self, rods):
 7         """
 8         :type rods: List[int]
 9         :rtype: int
10         """
11         ans = {}
12         def DFS(i, dif):
13             if (i, dif) in ans:
14                 return ans[(i, dif)]
15             if i >= len(rods):
16                 if dif:
17                     return float('-inf')
18                 return 0
19             l = DFS(i + 1, dif + rods[i])
20             skip = DFS(i + 1, dif)
21             s = DFS(i + 1, abs(rods[i] - dif)) + min(dif, rods[i])
22             ans[(i, dif)] = max(l, s, skip)
23             return ans[(i, dif)]
24 
25 
26         return DFS(0, 0)


Uriel 2023-06-25 22:34 鍙戣〃璇勮
]]>
[LeetCode]1575. Count All Possible Routes (Hard) Python3-2023.06.25http://www.shnenglu.com/Uriel/articles/229942.htmlUrielUrielSun, 25 Jun 2023 14:30:00 GMThttp://www.shnenglu.com/Uriel/articles/229942.htmlhttp://www.shnenglu.com/Uriel/comments/229942.htmlhttp://www.shnenglu.com/Uriel/articles/229942.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229942.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229942.html
緇欏嚭姣忎釜鍩庡競i鐨刲ocations[i]錛屼互鍙婅搗濮嬨佺粓鐐瑰煄甯傚拰鍒濆姹芥補閲忥紝浠庡煄甯俰鍒癹闇瑕佽楄垂姹芥補锝渓ocations[i]-locations[j]锝滐紝闂竴鍏辨湁澶氬皯鏉¤礬綰?/div>
閫掑綊DP+memorization錛堢敤python3鐨刲ru_cache錛?br />鍙傝冧簡Discussion -> https://leetcode.com/problems/count-all-possible-routes/solutions/3678855/python3-solution/


 1 #1575
 2 #Runtime: 2024 ms (Beats 68.42%)
 3 #Memory: 41.4 MB (Beats 12.3%)
 4 
 5 class Solution:
 6     def countRoutes(self, locations: List[int], start: int, finish: int, fuel: int) -> int:
 7         MOD = 10 ** 9 + 7
 8 
 9         @lru_cache(None)
10         def DP(p, x):
11             if x < 0:
12                 return 0
13             t = 0
14             if p == finish:
15                 t += 1
16             for i in range(len(locations)):
17                 if i != p:
18                     t += DP(i, x - abs(locations[i] - locations[p]))
19             return t
20         
21         return DP(start, fuel) % MOD


Uriel 2023-06-25 22:30 鍙戣〃璇勮
]]>
[LeetCode]2328. Number of Increasing Paths in a Grid (Hard) Python3-2023.06.18http://www.shnenglu.com/Uriel/articles/229934.htmlUrielUrielSun, 18 Jun 2023 13:10:00 GMThttp://www.shnenglu.com/Uriel/articles/229934.htmlhttp://www.shnenglu.com/Uriel/comments/229934.htmlhttp://www.shnenglu.com/Uriel/articles/229934.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229934.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229934.html鍙傝冧簡Discussion-> https://leetcode.com/problems/number-of-increasing-paths-in-a-grid/solutions/3650130/python3-solution/


 1 #2328
 2 #Runtime: 2652 ms (Beats 28.65%)
 3 #Memory: 78.9 MB (Beats 49.52%)
 4 
 5 class Solution:
 6     def countPaths(self, grid: List[List[int]]) -> int:
 7         MOD = 10 ** 9 + 7
 8         n, m = len(grid), len(grid[0])
 9         dp = [[-1 for _ in range(m)] for _ in range(n)]
10 
11         def cal(r, c, pre):
12             nonlocal n, m
13             if r < 0 or c < 0 or r >= n or c >= m or grid[r][c] <= pre:
14                 return 0
15             if dp[r][c] != -1:
16                 return dp[r][c]
17             dir = [[1, 0], [-1, 0], [0, -1], [0, 1]]
18             t = 1
19             for d in dir:
20                 tr = r + d[0]
21                 tc = c + d[1]
22                 t += cal(tr, tc, grid[r][c])
23             dp[r][c] = t
24             return t
25         
26         ans = 0
27         for r in range(n):
28             for c in range(m):
29                 ans = (ans + cal(r, c, -1)) % MOD
30         return ans


Uriel 2023-06-18 21:10 鍙戣〃璇勮
]]>
[LeetCode]1569. Number of Ways to Reorder Array to Get Same BST (Hard) Python3-2023.06.16http://www.shnenglu.com/Uriel/articles/229931.htmlUrielUrielFri, 16 Jun 2023 09:23:00 GMThttp://www.shnenglu.com/Uriel/articles/229931.htmlhttp://www.shnenglu.com/Uriel/comments/229931.htmlhttp://www.shnenglu.com/Uriel/articles/229931.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229931.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229931.html鍋囪褰撳墠鏁板垪闀縧錛岄偅涔堢涓涓暟瀛楀喅瀹氫簡root鐨勪綅緗紝鏃犳硶縐誨姩錛屼箣鍚庣殑鏁板瓧姣攔oot澶х殑鏁板拰姣攔oot灝忕殑鏁扮殑鏁伴噺鏄竴瀹氱殑錛屽亣璁炬湁m涓暟姣攔oot澶э紝n涓暟姣攔oot灝忥紙m+n+1=l錛夈傞偅涔堟墦涔遍『搴忚繕鍙互鏋勬垚涓鏍風殑BST鐨勬暟閲忓氨鏄粍鍚堟暟C(m, m+n)銆傝屽乏瀛愭爲鍜屽彸瀛愭爲鍙堝皢榪涜鍚屾牱鐨勮綆椼傛敞鎰忔渶緇堢粨鏋滆-1錛堝噺鍘誨師鏈殑閭g鎺掑垪鏂瑰紡錛?br />

 1 #1569
 2 #Runtime: 173 ms (Beats 71.74%)
 3 #Memory: 21.8 MB (Beats 51.9%)
 4 
 5 class Solution:
 6     def numOfWays(self, nums: List[int]) -> int:
 7         MOD = 10 ** 9 + 7
 8 
 9         def cal(seq):
10             if not seq:
11                 return 1
12             root = seq[0]
13             l_tree = [num for num in seq if num < root]
14             r_tree = [num for num in seq if num > root]
15             return math.comb(len(l_tree) + len(r_tree), len(l_tree)) * cal(l_tree) * cal(r_tree) % MOD
16         return (cal(nums) - 1) % MOD


Uriel 2023-06-16 17:23 鍙戣〃璇勮
]]>
[LeetCode]1547. Minimum Cost to Cut a Stick (Hard) Python-2023.05.28http://www.shnenglu.com/Uriel/articles/229909.htmlUrielUrielSun, 28 May 2023 13:52:00 GMThttp://www.shnenglu.com/Uriel/articles/229909.htmlhttp://www.shnenglu.com/Uriel/comments/229909.htmlhttp://www.shnenglu.com/Uriel/articles/229909.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229909.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229909.html鍜孌iscussion鍐嶆瀛﹀埌lru_cache鐨勭敤娉?br />

 1 #1547
 2 #Runtime: 761 ms (Beats 87.80%)
 3 #Memory: 20.5 MB (Beats 5.95%)
 4 
 5 class Solution:
 6     def minCost(self, n: int, cuts: List[int]) -> int:
 7         cuts.append(0)
 8         cuts.append(n)
 9         cuts.sort()
10 
11         @functools.lru_cache(None)
12         def dp(x, y):
13             if x >= y - 1:
14                 return 0
15             return cuts[y] - cuts[x] + min((dp(x, k) + dp(k, y) for k in range(x + 1, y)), default = 0)
16         return dp(0, len(cuts) - 1)


Uriel 2023-05-28 21:52 鍙戣〃璇勮
]]>
[LeetCode]87. Scramble String (Hard) Python-2023.03.30http://www.shnenglu.com/Uriel/articles/229792.htmlUrielUrielThu, 30 Mar 2023 08:51:00 GMThttp://www.shnenglu.com/Uriel/articles/229792.htmlhttp://www.shnenglu.com/Uriel/comments/229792.htmlhttp://www.shnenglu.com/Uriel/articles/229792.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229792.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229792.html
鐢ㄤ簡姣旇緝鏆村姏鐨勫仛娉曪紝絀蜂婦鎵鏈夋搷浣滅殑鍙兘鎬э紝鐢ㄤ簡Discussion涓褰曚笅宸茬粡鏆村姏鏋氫婦榪囩殑緇撴灉錛屽惁鍒欎細TLE
https://leetcode.com/problems/scramble-string/solutions/3357439/easy-solutions-in-java-python-and-c-look-at-once-with-exaplanation


 1 #1402
 2 #Runtime: 222 ms (Beats 21.95%)
 3 #Memory: 20.5 MB (Beats 7.32%)
 4 
 5 class Solution(object):
 6     def isScramble(self, s1, s2):
 7         """
 8         :type s1: str
 9         :type s2: str
10         :rtype: bool
11         """
12         if len(s1) != len(s2):
13             return False
14         if s1 == s2:
15             return True
16         if len(s1) == 1:
17             return False
18         t = s1 + " " + s2
19         if t in self.solved:
20             return self.solved[t]
21         for i in range(1, len(s1)):
22             if self.isScramble(s1[0:i], s2[0:i]) and self.isScramble(s1[i:], s2[i:]):
23                 self.solved[t] = True
24                 return True
25             if self.isScramble(s1[0:i], s2[len(s1)-i:]) and self.isScramble(s1[i:], s2[0:len(s1)-i]):
26                 self.solved[t] = True
27                 return True
28         self.solved[t] = False
29         return False
30     solved = {}


Uriel 2023-03-30 16:51 鍙戣〃璇勮
]]>
[LeetCode]427. Construct Quad Tree (Medium) Python-2023.02.27http://www.shnenglu.com/Uriel/articles/229704.htmlUrielUrielMon, 27 Feb 2023 12:57:00 GMThttp://www.shnenglu.com/Uriel/articles/229704.htmlhttp://www.shnenglu.com/Uriel/comments/229704.htmlhttp://www.shnenglu.com/Uriel/articles/229704.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229704.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229704.html

 1 #427
 2 #Runtime: 100 ms (Beats 98.35%)
 3 #Memory: 14.7 MB (Beats 86.50%)
 4 
 5 class Node:
 6     def __init__(self, val, isLeaf, topLeft = None, topRight = None, bottomLeft = None, bottomRight = None):
 7         self.val = val
 8         self.isLeaf = isLeaf
 9         self.topLeft = topLeft
10         self.topRight = topRight
11         self.bottomLeft = bottomLeft
12         self.bottomRight = bottomRight
13 
14 
15 class Solution:
16     def isLeaf(self, grid, x, y, w):
17         for i in range(x, x + w):
18             for j in range(y, y + w):
19                 if grid[x][y] != grid[i][j]:
20                     return False
21         return True
22 
23     def BuildTree(self, grid, x, y, w):
24         if self.isLeaf(grid, x, y, w):
25             return Node(grid[x][y] == 1, True)
26         r = Node(True, False)
27         r.topLeft = self.BuildTree(grid, x, y, w // 2)
28         r.topRight = self.BuildTree(grid, x, y + w // 2, w // 2)
29         r.bottomLeft = self.BuildTree(grid, x + w // 2, y, w // 2)
30         r.bottomRight = self.BuildTree(grid, x + w // 2, y + w // 2, w // 2)
31         return r
32 
33     def construct(self, grid: List[List[int]]) -> Node:
34         return self.BuildTree(grid, 0, 0, len(grid))


Uriel 2023-02-27 20:57 鍙戣〃璇勮
]]>
[LeetCode]222. Count Complete Tree Nodes (Medium) Python-2022.11.15http://www.shnenglu.com/Uriel/articles/229519.htmlUrielUrielTue, 15 Nov 2022 10:58:00 GMThttp://www.shnenglu.com/Uriel/articles/229519.htmlhttp://www.shnenglu.com/Uriel/comments/229519.htmlhttp://www.shnenglu.com/Uriel/articles/229519.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229519.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229519.html
鏂規硶涓錛氬厛DFS錛屼笉鏂蛋宸﹀瓙鏍戠殑璺緞錛岀畻鍑轟簩鍙夋爲灞傛暟max_depth錛岄偅涔堟渶鍚庝竴灞傝妭鐐圭殑鏁伴噺涓篬1, 2^(max_depth-1)]錛岀洿鎺ヤ簩鍒嗚繖涓寖鍥達紝鐒跺悗綆楀嚭鏈鍚庝竴涓彾瀛愮粨鐐硅惤鍦ㄥ摢閲岋紝鐞嗚澶嶆潅搴(logn)*O(logn)

 1 #222
 2 #Runtime: 156 ms
 3 #Memory Usage: 29.2 MB
 4 
 5 # Definition for a binary tree node.
 6 # class TreeNode(object):
 7 #     def __init__(self, val=0, left=None, right=None):
 8 #         self.val = val
 9 #         self.left = left
10 #         self.right = right
11 class Solution(object):
12     def binarySearch(self, root, depth, mid, l, r):
13         if depth == self.max_depth - 1: 
14             if root:
15                 return True
16             return False
17         if mid <= (l + r)//2:
18             return self.binarySearch(root.left, depth + 1, mid, l, (l + r)//2)
19         else:
20             return self.binarySearch(root.right, depth + 1, mid, (l + r)//2, r) 
21             
22     def countNodes(self, root):
23         """
24         :type root: TreeNode
25         :rtype: int
26         """
27         self.max_depth = 0
28         rt = root
29         while rt:
30             rt = rt.left
31             self.max_depth = self.max_depth + 1
32         if not self.max_depth:
33             return 0
34         l = 1
35         r = 2**(self.max_depth - 1)
36         while l < r:
37             mid = (l + r) // 2 + (l + r) % 2
38             if self.binarySearch(root, 0, mid, 1, 2**(self.max_depth - 1)):
39                 l = mid
40             else:
41                 r = mid - 1
42         return l + 2**(self.max_depth - 1) - 1

鏂規硶浜岋細鐩存帴涓嶆柇浜屽垎鍦伴掑綊鎵懼乏鍙沖瓙鏍戯紝鐩村埌閬囧埌鏌愪釜婊′簩鍙夋爲鑺傜偣錛岀劧鍚巗um(宸﹀瓙鏍戠殑鎼滅儲緇撴灉)+sum(鍙沖瓙鏍戠殑鎼滅儲緇撴灉)+1錛堟牴緇撶偣錛夛紝鐞嗚澶嶆潅搴(logn)*O(logn)

 1 #222
 2 #Runtime: 137 ms
 3 #Memory Usage: 29.2 MB
 4 
 5 # Definition for a binary tree node.
 6 # class TreeNode(object):
 7 #     def __init__(self, val=0, left=None, right=None):
 8 #         self.val = val
 9 #         self.left = left
10 #         self.right = right
11 class Solution(object):
12     def DFS(self, root, fg):
13         if not root:
14             return 1
15         if fg == 0:
16             return self.DFS(root.left, 0) + 1
17         return self.DFS(root.right, 1) + 1
18             
19     def countNodes(self, root):
20         """
21         :type root: TreeNode
22         :rtype: int
23         """
24         if not root:
25             return 0
26         depth_l = self.DFS(root.left, 0)
27         depth_r = self.DFS(root.right, 1)
28         if depth_l == depth_r:
29             return 2**depth_l - 1
30         return self.countNodes(root.left) + self.countNodes(root.right) + 1

鏂規硶涓夛細鐩存帴DFS鏁存5鏍戞眰鑺傜偣鏁伴噺錛屽鏉傚害O(n)錛屾病鎯沖埌榪欎釜鏂規硶鍙嶈屾渶蹇?..

 1 #222
 2 #Runtime: 87 ms
 3 #Memory Usage: 29.4 MB
 4 
 5 # Definition for a binary tree node.
 6 # class TreeNode(object):
 7 #     def __init__(self, val=0, left=None, right=None):
 8 #         self.val = val
 9 #         self.left = left
10 #         self.right = right
11 class Solution(object):
12     def DFS(self, root):
13         if not root:
14             return
15         self.ans += 1
16         self.DFS(root.left)
17         self.DFS(root.right)
18             
19     def countNodes(self, root):
20         """
21         :type root: TreeNode
22         :rtype: int
23         """
24         self.ans = 0
25         self.DFS(root)
26         return self.ans


Uriel 2022-11-15 18:58 鍙戣〃璇勮
]]>
[LeetCode]22. Generate Parentheses (Medium) Python-2022.10.21http://www.shnenglu.com/Uriel/articles/229448.htmlUrielUrielFri, 21 Oct 2022 22:10:00 GMThttp://www.shnenglu.com/Uriel/articles/229448.htmlhttp://www.shnenglu.com/Uriel/comments/229448.htmlhttp://www.shnenglu.com/Uriel/articles/229448.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/229448.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/229448.html鐢熸垚鍖歸厤鐨勬嫭鍙峰錛岀畝鍗旸FS
 1 class Solution(object):
 2     ans = []
 3     def DFS(self, str, n, pp):
 4         if n == 0:
 5             if pp == 0:
 6                 self.ans.append(str)
 7                 str = ''
 8                 return
 9         if n > 0:
10             self.DFS(str+'(', n-1, pp+1)
11         if pp > 0:
12             self.DFS(str+')', n, pp-1)
13         
14         
15     def generateParenthesis(self, n):
16         """
17         :type n: int
18         :rtype: List[str]
19         """
20         self.ans = []
21         self.DFS('', n, 0)
22         return self.ans


Uriel 2022-10-22 06:10 鍙戣〃璇勮
]]>
POJ 1977 Odd Loving Bakers---浜屽垎鐭╅樀榪炰箻http://www.shnenglu.com/Uriel/articles/106771.htmlUrielUrielFri, 29 Jan 2010 19:17:00 GMThttp://www.shnenglu.com/Uriel/articles/106771.htmlhttp://www.shnenglu.com/Uriel/comments/106771.htmlhttp://www.shnenglu.com/Uriel/articles/106771.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/106771.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/106771.html闃呰鍏ㄦ枃

Uriel 2010-01-30 03:17 鍙戣〃璇勮
]]>
POJ 1747 Expression---閫掑綊http://www.shnenglu.com/Uriel/articles/97776.htmlUrielUrielFri, 02 Oct 2009 17:36:00 GMThttp://www.shnenglu.com/Uriel/articles/97776.htmlhttp://www.shnenglu.com/Uriel/comments/97776.htmlhttp://www.shnenglu.com/Uriel/articles/97776.html#Feedback0http://www.shnenglu.com/Uriel/comments/commentRss/97776.htmlhttp://www.shnenglu.com/Uriel/services/trackbacks/97776.html鍔犲叆涓嬫爣搴旇涓嶇敤榪欎箞楹葷儲銆傘俿scanf閭d簺紲炲鐨勪笢瑗塊兘榪樹笉浼氥傘傚氨鐢ㄧ尌鐞愭柟娉曠‖鏉ヤ簡銆傘傘? -||
澶х墰浠笉鍚濇寚鏁欍傘傚姞涓嬫爣閭i噷鎬庝箞鏀逛笅銆傘?br>
/*Problem: 1747  User: Uriel 
   Memory: 1184K  Time: 141MS 
   Language: C++  Result: Accepted
*/
 

#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>

char str[105][10000];
char temp[102][4]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30",
                   
"31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59","60",
                   
"61","62","63","64","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89",
                   
"90","91","92","93","94","95","96","97","98","99","100"}
;
int n,st;

int min(int a,int b)
{
    
return a < b ? a: b;
}


void Sov(int a)
{
    
if(a==1)return ;
    Sov(a
-1);
    strcpy(str[a],
"((A");
    strcat(str[a],temp[a
-1]);
    strcat(str[a],
"|B");
    strcat(str[a],temp[a
-1]);
    strcat(str[a],
")|(");
    strcat(str[a],str[a
-1]);
    strcat(str[a],
"|((A");
    strcat(str[a],temp[a
-1]);
    strcat(str[a],
"|A");
    strcat(str[a],temp[a
-1]);
    strcat(str[a],
")|(B");
    strcat(str[a],temp[a
-1]);
    strcat(str[a],
"|B");
    strcat(str[a],temp[a
-1]);
    strcat(str[a],
"))))");
}


int main()
{
    scanf(
"%d",&n);
    memset(str,
0x00,sizeof(str));
    strcpy(str[
1],"((A0|B0)|(A0|B0))");
    st
=1;
    Sov(n);
    
for(int i=0;i<min(strlen(str[n]),50*n);i++)
    
{
        printf(
"%c",str[n][i]);
    }

    printf(
"\n");
    
return 0;
}




Uriel 2009-10-03 01:36 鍙戣〃璇勮
]]>
POJ 3233 Matrix Power Series---浜屽垎錛岃漿縐葷煩闃?/title><link>http://www.shnenglu.com/Uriel/articles/94201.html</link><dc:creator>Uriel</dc:creator><author>Uriel</author><pubDate>Sun, 23 Aug 2009 14:32:00 GMT</pubDate><guid>http://www.shnenglu.com/Uriel/articles/94201.html</guid><wfw:comment>http://www.shnenglu.com/Uriel/comments/94201.html</wfw:comment><comments>http://www.shnenglu.com/Uriel/articles/94201.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/Uriel/comments/commentRss/94201.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/Uriel/services/trackbacks/94201.html</trackback:ping><description><![CDATA[<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id=Codehighlighter1_0_93_Open_Image onclick="this.style.display='none'; Codehighlighter1_0_93_Open_Text.style.display='none'; Codehighlighter1_0_93_Closed_Image.style.display='inline'; Codehighlighter1_0_93_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_0_93_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_0_93_Closed_Text.style.display='none'; Codehighlighter1_0_93_Open_Image.style.display='inline'; Codehighlighter1_0_93_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top><span id=Codehighlighter1_0_93_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span id=Codehighlighter1_0_93_Open_Text><span style="COLOR: #008000">/*</span><span style="COLOR: #008000">Problem: 3233  User: Uriel <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>   Memory: 208K  Time: 172MS <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>   Language: C++  Result: Accepted</span><span style="COLOR: #008000">*/</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stdio.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">stdlib.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> MAX</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">65</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>typedef </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> M[MAX][MAX];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n,m;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>M </span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> copy(M x,M y)<br><img id=Codehighlighter1_211_293_Open_Image onclick="this.style.display='none'; Codehighlighter1_211_293_Open_Text.style.display='none'; Codehighlighter1_211_293_Closed_Image.style.display='inline'; Codehighlighter1_211_293_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_211_293_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_211_293_Closed_Text.style.display='none'; Codehighlighter1_211_293_Open_Image.style.display='inline'; Codehighlighter1_211_293_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_211_293_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_211_293_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i,j;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">n;</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">i) <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">n;</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">j)<br><img id=Codehighlighter1_267_291_Open_Image onclick="this.style.display='none'; Codehighlighter1_267_291_Open_Text.style.display='none'; Codehighlighter1_267_291_Closed_Image.style.display='inline'; Codehighlighter1_267_291_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_267_291_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_267_291_Closed_Text.style.display='none'; Codehighlighter1_267_291_Open_Image.style.display='inline'; Codehighlighter1_267_291_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_267_291_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_267_291_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            x[i][j]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">y[i][j];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> mu(M x,M y)<br><img id=Codehighlighter1_313_546_Open_Image onclick="this.style.display='none'; Codehighlighter1_313_546_Open_Text.style.display='none'; Codehighlighter1_313_546_Closed_Image.style.display='inline'; Codehighlighter1_313_546_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_313_546_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_313_546_Closed_Text.style.display='none'; Codehighlighter1_313_546_Open_Image.style.display='inline'; Codehighlighter1_313_546_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_313_546_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_313_546_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    M C;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i,j,k;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> t;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">n;</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">i)<br><img id=Codehighlighter1_365_532_Open_Image onclick="this.style.display='none'; Codehighlighter1_365_532_Open_Text.style.display='none'; Codehighlighter1_365_532_Closed_Image.style.display='inline'; Codehighlighter1_365_532_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_365_532_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_365_532_Closed_Text.style.display='none'; Codehighlighter1_365_532_Open_Image.style.display='inline'; Codehighlighter1_365_532_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_365_532_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_365_532_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">n;</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">j)<br><img id=Codehighlighter1_390_529_Open_Image onclick="this.style.display='none'; Codehighlighter1_390_529_Open_Text.style.display='none'; Codehighlighter1_390_529_Closed_Image.style.display='inline'; Codehighlighter1_390_529_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_390_529_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_390_529_Closed_Text.style.display='none'; Codehighlighter1_390_529_Open_Image.style.display='inline'; Codehighlighter1_390_529_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_390_529_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_390_529_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            t</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(k</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;k</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">n;</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">k)<br><img id=Codehighlighter1_425_511_Open_Image onclick="this.style.display='none'; Codehighlighter1_425_511_Open_Text.style.display='none'; Codehighlighter1_425_511_Closed_Image.style.display='inline'; Codehighlighter1_425_511_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_425_511_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_425_511_Closed_Text.style.display='none'; Codehighlighter1_425_511_Open_Image.style.display='inline'; Codehighlighter1_425_511_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>            </span><span id=Codehighlighter1_425_511_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_425_511_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(x[i][k] </span><span style="COLOR: #000000">&&</span><span style="COLOR: #000000"> y[k][j])<br><img id=Codehighlighter1_470_506_Open_Image onclick="this.style.display='none'; Codehighlighter1_470_506_Open_Text.style.display='none'; Codehighlighter1_470_506_Closed_Image.style.display='inline'; Codehighlighter1_470_506_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_470_506_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_470_506_Closed_Text.style.display='none'; Codehighlighter1_470_506_Open_Image.style.display='inline'; Codehighlighter1_470_506_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>                </span><span id=Codehighlighter1_470_506_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_470_506_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>                    t</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">(t</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">x[i][k]</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">y[k][j])</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">m;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>                }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>            }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            C[i][j]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">t;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    copy(x,C);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> BS(M x,</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> k)<br><img id=Codehighlighter1_568_666_Open_Image onclick="this.style.display='none'; Codehighlighter1_568_666_Open_Text.style.display='none'; Codehighlighter1_568_666_Closed_Image.style.display='inline'; Codehighlighter1_568_666_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_568_666_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_568_666_Closed_Text.style.display='none'; Codehighlighter1_568_666_Open_Image.style.display='inline'; Codehighlighter1_568_666_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_568_666_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_568_666_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(k</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_581_611_Open_Image onclick="this.style.display='none'; Codehighlighter1_581_611_Open_Text.style.display='none'; Codehighlighter1_581_611_Closed_Image.style.display='inline'; Codehighlighter1_581_611_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_581_611_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_581_611_Closed_Text.style.display='none'; Codehighlighter1_581_611_Open_Image.style.display='inline'; Codehighlighter1_581_611_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_581_611_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_581_611_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        copy(x,</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    BS(x,k</span><span style="COLOR: #000000">/</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    mu(x,x);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(k </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)  <br><img id=Codehighlighter1_649_664_Open_Image onclick="this.style.display='none'; Codehighlighter1_649_664_Open_Text.style.display='none'; Codehighlighter1_649_664_Closed_Image.style.display='inline'; Codehighlighter1_649_664_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_649_664_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_649_664_Closed_Text.style.display='none'; Codehighlighter1_649_664_Open_Image.style.display='inline'; Codehighlighter1_649_664_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_649_664_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_649_664_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        mu(x,</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img id=Codehighlighter1_680_1057_Open_Image onclick="this.style.display='none'; Codehighlighter1_680_1057_Open_Text.style.display='none'; Codehighlighter1_680_1057_Closed_Image.style.display='inline'; Codehighlighter1_680_1057_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align=top><img id=Codehighlighter1_680_1057_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_680_1057_Closed_Text.style.display='none'; Codehighlighter1_680_1057_Open_Image.style.display='inline'; Codehighlighter1_680_1057_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align=top></span><span id=Codehighlighter1_680_1057_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_680_1057_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> k;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d %d %d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">n,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">k,</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">m) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i,j;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">n;i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_750_906_Open_Image onclick="this.style.display='none'; Codehighlighter1_750_906_Open_Text.style.display='none'; Codehighlighter1_750_906_Closed_Image.style.display='inline'; Codehighlighter1_750_906_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_750_906_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_750_906_Closed_Text.style.display='none'; Codehighlighter1_750_906_Open_Image.style.display='inline'; Codehighlighter1_750_906_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>     </span><span id=Codehighlighter1_750_906_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_750_906_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;j</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">n;j</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">)<br><img id=Codehighlighter1_773_879_Open_Image onclick="this.style.display='none'; Codehighlighter1_773_879_Open_Text.style.display='none'; Codehighlighter1_773_879_Closed_Image.style.display='inline'; Codehighlighter1_773_879_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_773_879_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_773_879_Closed_Text.style.display='none'; Codehighlighter1_773_879_Open_Image.style.display='inline'; Codehighlighter1_773_879_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_773_879_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_773_879_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>             scanf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">&</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">[i][j]);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>             </span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">[i][j</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">n]</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">[i][j];<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>             </span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">[i</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">n][j]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>             </span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">[i</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">n][j</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">n]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">in</span><span style="COLOR: #000000">[i</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">n][i</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">n]</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    M x;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    BS(x,k);  <br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;i</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">n;</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">i)<br><img id=Codehighlighter1_948_1025_Open_Image onclick="this.style.display='none'; Codehighlighter1_948_1025_Open_Text.style.display='none'; Codehighlighter1_948_1025_Closed_Image.style.display='inline'; Codehighlighter1_948_1025_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_948_1025_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_948_1025_Closed_Text.style.display='none'; Codehighlighter1_948_1025_Open_Image.style.display='inline'; Codehighlighter1_948_1025_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </span><span id=Codehighlighter1_948_1025_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_948_1025_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        </span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000">(j</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">n;j</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">n;</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">j)<br><img id=Codehighlighter1_973_1004_Open_Image onclick="this.style.display='none'; Codehighlighter1_973_1004_Open_Text.style.display='none'; Codehighlighter1_973_1004_Closed_Image.style.display='inline'; Codehighlighter1_973_1004_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><img id=Codehighlighter1_973_1004_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_973_1004_Closed_Text.style.display='none'; Codehighlighter1_973_1004_Open_Image.style.display='inline'; Codehighlighter1_973_1004_Open_Text.style.display='inline';" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </span><span id=Codehighlighter1_973_1004_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_973_1004_Open_Text><span style="COLOR: #000000">{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>            printf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%d </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,x[i][j]) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>        printf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">) ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    system(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">PAUSE</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align=top>    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000"> ;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</span></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> 榪欓鎼炰簡寰堜箙銆傘傜涓嬈″啓浜屽垎錛岀涓嬈$敤鍋氱煩闃典箻娉曘傘?br>杞Щ鐭╅樀濂藉己澶?br>| A  A |<br>| 0   I  |<br><br> <img src ="http://www.shnenglu.com/Uriel/aggbug/94201.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/Uriel/" target="_blank">Uriel</a> 2009-08-23 22:32 <a href="http://www.shnenglu.com/Uriel/articles/94201.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.thinkct.com.cn" target="_blank">国产精品一区二区久久不卡</a>| <a href="http://www.tuomao8.cn" target="_blank">久久久久AV综合网成人</a>| <a href="http://www.9xz.com.cn" target="_blank">99久久精品免费国产大片</a>| <a href="http://www.z9432.cn" target="_blank">久久99国产精品一区二区</a>| <a href="http://www.glkk.net.cn" target="_blank">久久99精品久久久久久秒播</a>| <a href="http://www.baochong.com.cn" target="_blank">草草久久久无码国产专区</a>| <a href="http://www.kanqiuwang.cn" target="_blank">日本精品久久久久久久久免费</a>| <a href="http://www.zzjiale.cn" target="_blank">免费精品久久天干天干</a>| <a href="http://www.twhx.org.cn" target="_blank">国产精品久久国产精品99盘</a>| <a href="http://www.touzhi8.cn" target="_blank">久久久久亚洲精品无码网址</a>| <a href="http://www.18xh.cn" target="_blank">久久久久久午夜成人影院</a>| <a href="http://www.shxwy.cn" target="_blank">日本加勒比久久精品</a>| <a href="http://www.sj0524.cn" target="_blank">狠狠狠色丁香婷婷综合久久五月</a>| <a href="http://www.cysq88.cn" target="_blank">久久久久国产一级毛片高清板</a>| <a href="http://www.http321.cn" target="_blank">午夜欧美精品久久久久久久</a>| <a href="http://www.05958.cn" target="_blank">国内精品欧美久久精品</a>| <a href="http://www.playt.cn" target="_blank">精品久久无码中文字幕</a>| <a href="http://www.ytljc.cn" target="_blank">久久精品国产99久久久古代 </a>| <a href="http://www.cad77.cn" target="_blank">欧美一级久久久久久久大</a>| <a href="http://www.pingpangq.cn" target="_blank">国产A级毛片久久久精品毛片</a>| <a href="http://www.acesolo.cn" target="_blank">99精品伊人久久久大香线蕉</a>| <a href="http://www.fcsyx.cn" target="_blank">午夜天堂精品久久久久</a>| <a href="http://www.j8hq8.cn" target="_blank">久久人妻AV中文字幕</a>| <a href="http://www.annean.cn" target="_blank">久久综合九色欧美综合狠狠</a>| <a href="http://www.jrsddk.cn" target="_blank">成人久久综合网</a>| <a href="http://www.kqb8.cn" target="_blank">2021久久国自产拍精品</a>| <a href="http://www.lyrisme.cn" target="_blank">色8久久人人97超碰香蕉987</a>| <a href="http://www.fyhd.net.cn" target="_blank">亚洲人成无码网站久久99热国产</a>| <a href="http://www.sdxlhc.cn" target="_blank">99久久国产综合精品网成人影院</a>| <a href="http://www.jianluanwang.cn" target="_blank">无码人妻久久一区二区三区免费</a>| <a href="http://www.88815755.cn" target="_blank">日韩美女18网站久久精品</a>| <a href="http://www.yangyongfu.com.cn" target="_blank">99久久精品无码一区二区毛片</a>| <a href="http://www.yjpute.cn" target="_blank">97久久香蕉国产线看观看</a>| <a href="http://www.t55n3z.cn" target="_blank">亚洲va久久久噜噜噜久久</a>| <a href="http://www.gallery2.cn" target="_blank">久久无码AV中文出轨人妻</a>| <a href="http://www.hhyskj.com.cn" target="_blank">亚洲国产成人久久综合碰</a>| <a href="http://www.fiyhigh.com.cn" target="_blank">久久国产成人午夜aⅴ影院</a>| <a href="http://www.foundxy.cn" target="_blank">久久精品国产精品亚洲下载</a>| <a href="http://www.qqhaobofangqi.cn" target="_blank">国产精品99久久久久久猫咪</a>| <a href="http://www.qianzifu.net.cn" target="_blank">国产精品成人久久久久三级午夜电影 </a>| <a href="http://www.llqu.cn" target="_blank">欧美粉嫩小泬久久久久久久</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>