VSC++=》 美丽字符串()

缘由https://bbs.csdn.net/topics/396428505

cpp 复制代码
void 美丽字符串()
{
	string zf = ""; int j = 0, b = 0, sl[47]{}, wi = 0;
	cin >> zf; zf += "0";// zf.push_back('0');
	while (zf[j] != '0')if (zf[b] == zf[j])++sl[b], b = 0, ++j; else ++b;
	//if ((wi = zf.find(zf[j++])) != string::npos)++sl[wi]; 
	j = 0;
	while (sl[j])if (sl[j++] % 2){ cout << "No"; return; }
	cout << "Yes";
}
相关推荐
Dwzun16 小时前
基于SpringBoot3+Vue3的油莎豆种植管理系统
java·前端·vue.js·spring boot·后端·python·计算机网络
学长毕设1 天前
基于SpringBoot的实验室资产管理系统
java·spring boot·后端
C^h1 天前
c++ string
开发语言·c++
raindayinrain1 天前
c++高性能--原子操作,无锁编程,操作顺序
开发语言·c++·性能优化
学逆向的1 天前
C++ 合并命名空间
开发语言·c++·网络安全
Zhao-Jichao1 天前
VS2026 打包 C++ 程序生成 EXE,借助 Installer Project 扩展工具
开发语言·c++
zzu123zsw1 天前
从臃肿的模板调用到声明式契约:深入 UniHttp 动态代理与多渠道生命周期扩展
java·spring boot·microsoft·unihttp
小徐不徐说1 天前
C++ 接口与插件设计:从工厂注册到 Qt 动态插件
数据库·c++·qt·系统架构·程序设计
大都督会赢的1 天前
C++第一节课
开发语言·c++
UIU1141 天前
P1233 [ICPC 2001 Taejon R] 木棍加工
数据结构·c++·算法·动态规划