# 其他ZJ題目練習 ### [黃惟Zerojudge練習題目](https://hackmd.io/@10946009/Zerojudge) ## 基本題型 | 題目 | 題解 | | -------- | -------- | | [a225. 明明愛排列](https://zerojudge.tw/ShowProblem?problemid=a225) | [連結](https://hackmd.io/@10946009/zj-a225) | | [a244. 新手訓練 ~ for + if](https://zerojudge.tw/ShowProblem?problemid=a244) | [連結](https://hackmd.io/@10946009/zj-a244) | | [a248. 新手訓練 ~ 陣列應用 ](https://zerojudge.tw/ShowProblem?problemid=a248) | [連結](https://hackmd.io/@10946009/zj-a248) | | [a263. 日期差幾天](https://zerojudge.tw/ShowProblem?problemid=a263) | [連結](https://hackmd.io/@10946009/zj-a263) | | [a524. 手機之謎](https://zerojudge.tw/ShowProblem?problemid=a524) | [連結](https://hackmd.io/@10946009/zj-a524) | | [a528. 大數排序](https://zerojudge.tw/ShowProblem?problemid=a528) | [連結](https://hackmd.io/@10946009/zj-a528) | | [a647. 投資專家](https://zerojudge.tw/ShowProblem?problemid=a647) | [連結](https://hackmd.io/@10946009/zj-a647) | ## 會超時 ### a229. 括號匹配問題 ```python= def left(s,l,r): if l != 0 : left(s+'(',l-1,r) right(s+'(',l-1,r) def right(s,l,r): if r != 0: if r>l and r != l: left(s+')',l,r-1) right(s+')',l,r-1) if l == 0 and r == 0: print(s) while 1: try: a = int(input()) left("",a,a) print() except: break ``` ### a291. nAnB problem ```python= from sys import stdin for s in stdin: if s == '\n' :continue ans = s.split() n = int(stdin.readline()) for i in range(n): tamp_ans = [x for x in ans] a = 0 b = 0 datas = stdin.readline().split() for index,data in enumerate(datas): if datas[index] == tamp_ans[index]: a+=1 tamp_ans[index] = 'A' datas[index] = 'A' for tamp in tamp_ans: if tamp == 'A':continue if tamp in datas: b+=1 print(f'{a}A{b}B') ``` ## APCS | 題目 | 題解 | | -------- | -------- | | [k731. 1. 路徑偵測](https://zerojudge.tw/ShowProblem?problemid=k731) | [連結](https://hackmd.io/@10946009/zj-k731) |