POJ 1068 题解
这是没什么用的目录 原题地址 AC代码 题解和思路 原题地址 这是地址 AC代码 #include < iostream > #include < vector > #include < algorithm > using namespace std ; int main ( ) { int t ; cin >> t ; for ( int i = 0 ; i < t ; ++ i ) { int n ; cin >> n ; vector < char > kuohao ; int temp = 0 ; for ( int j = 0 ; j < n ; ++ j ) { int a ; cin >> a ; for ( int k = 0 ; k < a - temp ; ++ k ) { kuohao . push_back ( '(' ) ; } temp = a ; kuohao . push_back ( ')' ) ; } vector < char > : : iterator it = kuohao . begin ( ) ; while ( it != kuohao . end ( ) ) { if ( * it == '(' ) { it ++ ; continue ; } else { int num = 1 ; int counter = 1 ;