某岛

… : "…アッカリ~ン . .. . " .. .
June 28, 2015

LeetCode 22. Generate Parentheses


https://leetcode.com/problems/generate-parentheses/
暴搜。。
C++:
[C++]
void dfs(int n, int a, vector& z, string& s){
if (n == a){
for (int i=0;i generateParenthesis(int n) {
vector z; string s; dfs(n*2, 0, z, s);
return z;
}
};
[/cpp]