1 solutions
-
1
#include <iostream> using namespace std; int main(int argc, char **argv){ char s; int l; do{ cin >> s; if (s == '('){ l++; } if (s == ')'){ l--; } if (l < 0){ printf("NO"); return 0; } }while(s != '@'); if (l == 0){ printf("YES"); }else{ printf("NO"); } return 0; }
- 1
Information
- ID
- 716
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 1
- Tags
- # Submissions
- 38
- Accepted
- 5
- Uploaded By