| 6 | string S; |
| 7 | |
| 8 | int main() { |
| 9 | // ���� |
| 10 | cin >> N >> S; |
| 11 | |
| 12 | // '(' �̐� - ')' �̐��� depth �Ƃ��� |
| 13 | // �r���� depth �����ɂȂ����炱�̎��_�� No |
| 14 | for (int i = 0; i < N; i++) { |
| 15 | if (S[i] == '(') depth += 1; |
| 16 | if (S[i] == ')') depth -= 1; |
| 17 | if (depth < 0) { |
| 18 | cout << "No" << endl; |
| 19 | return 0; |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | // �Ō�Adepth = 0 ['(' �� ')' �̐�������] ���ǂ����ŏꍇ���� |
| 24 | if (depth == 0) cout << "Yes" << endl; |
| 25 | else cout << "No" << endl; |
| 26 | return 0; |
| 27 | } |
nothing calls this directly
no outgoing calls
no test coverage detected