题目链接:http://codeforces.com/contest/918/problem/C 知识点: 贪心 解题思路: 枚举起点(当起点就是\(')'\)时直接跳过)并在此基础上遍历字符串,用一个\(nowmin\)和一个\(nowmax\)来记录当前\('('\)最多有\(nowmax\)个,最少有\(nowmin\)个.当遍历到\('('\)时,\(nowmin++,nowmax++\):当遍历到\('?'\)时,\(nowmin--,nowmax++\)(因为\('?'\)既有可能是…