6 条题解
-
-1
#include<bits/stdc++.h> using namespace std; int main() { int left=0,right=0; string s1; getline(cin,s1); for(int i=0;i<s1.length();i++) { if(s1[i]=='(')left++; if(s1[i]==')')right++; } if(left==right)cout<<"Yes"<<endl; else if(left>right)cout<<"Left"<<endl; else cout<<"Right"<<endl; return 0; }
信息
- ID
- 77
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 4
- 标签
- 递交数
- 501
- 已通过
- 219
- 上传者