首页 > 小苯的括号疑问
头像 Lynn_Eyre
发表于 2025-12-28 13:08:53
#include <iostream> #include <string> using namespace std; void solve() { string s; cin>>s; if(s.size()%2!=0) cout<&l 展开全文
头像 name1ess_别TM送了
发表于 2025-12-24 15:10:02
沟槽的思维题。显然,奇数长度的序列不管怎样进行更改都不可能变为合法。而对于偶数长度的序列而言,必然合法。其中,长度为2的序列只用一种合法序列“()”,而长度不为2的一定有若干种不同的合法序列,如“((((”可以是“()()”也可以是“(())”,其他长度同理。 #include<bits/st 展开全文
头像 牛客254520193号
发表于 2025-12-25 02:55:51
'''import sys from numpy.core.defchararray import count for line in sys.stdin: a = line.split() print(int(a[0]) + int(a[1]))''' t=int(input 展开全文

等你来战

查看全部