This commit is contained in:
HuangHai
2025-08-30 18:35:01 +08:00
commit 1f397eca87
6258 changed files with 1487241 additions and 0 deletions

24
TangDou/XiTi/1390.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
//输入+输出重定向
//freopen("../x.in", "r", stdin);
//freopen("../x.out", "w", stdout);
string s;
getline(cin, s);
stack<char> st;
for (int i = 0; i < s.size(); ++i) {
if (s[i] == '(') st.push('(');
if (s[i] == ')') st.pop();
}
if (st.empty()) cout << "YES" << endl;
else cout << "NO" << endl;
//关闭文件
//fclose(stdin);
//fclose(stdout);
return 0;
}