-
个人简介
1 2 3 https://blog.csdn.net/jiangkun0331/article/details/100057095 https://zhidao.baidu.com/question/1830279224157339348.html https://www.luogu.com.cn/discuss/979470 https://blog.csdn.net/qq_52324409/article/details/121581591 https://www.cnblogs.com/linuxAndMcu/p/10264339.html https://developer.aliyun.com/article/1161003 https://www.runoob.com/cplusplus/cpp-tutorial.html https://majorli.github.io/algo_guide/index.html# https://cloud.tencent.com/developer/article/2400029 https://blog.csdn.net/shenmingxueIT/article/details/122109896 http://60.170.49.195:9999/problemset.php https://blog.csdn.net/GD_ONE/article/details/104660294 https://wenku.baidu.com/view/91b203e049fe04a1b0717fd5360cba1aa9118c5a.html?_wkts_=1734671481473
atcoderuers:FUXIU LHF 2024hyx codeforcesuers:crazy_sea P2433 [CTSC2008] 网络管理 [CTSC2001] 终极情报网 https://enlisted.net/en/play4free/?r=cpmstarcpp_81462&clickid=NDY4MzkzXzEyNjk5MjBfODE0NjJfMF8tODQ5NjE5NzcwODYyNTY3MTE3OV8xODMuNTguMjAuMTk0XzE3MzkxMDIyMTBfMTFfMTAxX19GQTk2QzAxMA2#!/ https://blog.csdn.net/Aatroy/article/details/111639454
#include <iostream> #include <string> #include <stack> bool isColorfulBracketSequence(const std::string& s) { std::stack<char> st; for (char c : s) { if (c == '(' || c == '[' || c == '<') { st.push(c); } else { if (st.empty()) { return false; } char top = st.top(); st.pop(); if ((c == ')' && top != '(') || (c == ']' && top != '[') || (c == '>' && top != '<')) { return false; } } } return st.empty(); } int main() { std::string s; std::cin >> s; if (isColorfulBracketSequence(s)) { std::cout << "Yes" << std::endl; } else { std::cout << "No" << std::endl; } return 0; }
-
通过的题目
-
最近活动
This person is lazy and didn't join any contests or homework. -
最近编写的题解
This person is lazy and didn't write any solutions. -
Stat
-
Rating
题目标签
- 2009
- 1
- 2024
- 1
- 系统测试
- 1
- 单调队列
- 1
- 模拟
- 1
- 线段树
- 1
- 队列
- 1
- 图论
- 1
- USACO
- 1
- 最短路
- 1
- CSP-J
- 1