首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
100735G
】的更多相关文章
CodeForcesGym 100735G LCS Revised
LCS Revised Time Limit: 2000ms Memory Limit: 65536KB This problem will be judged on CodeForcesGym. Original ID: 100735G64-bit integer IO format: %I64d Java class name: (Any) The longest common subsequence is a well known DP problem: given two…
100735G
很明显,我们构造出一个串后,无非就是两个结果:最长的是黑的,最长的是白的,因此选两个中小的就可以了 #include<iostream> using namespace std; int main() { string s; cin>>s; ,tot2=; ;i<s.length();i++) { tot1+=s[i]=='; tot2+=s[i]=='; } cout<<min(tot1,tot2)<<endl; ; }…