알고리즘/Codeforces19 Codeforces Round #653 (Div. 3) ABC #include using namespace std; int T, x, y, n; int main() { cin.tie(NULL); cout.tie(NULL); ios::sync_with_stdio(0); cin >> T; while (T--) { cin >> x >> y >> n; int k; if ((n / x) * x + y L; string s = ""; for (int i = 0; i > input; s += input; } int cnt = 0, res = 0; for (int i = 0; i < L; ++i) { if (s[i] == '(') cnt++; else { if (cnt == 0) res++; else cnt--; } } cout 2020. 8. 6. 이전 1 2 3 4 다음