博客
关于我
Problem 1342B - Binary Period (思维)
阅读量:399 次
发布时间:2019-03-06

本文共 351 字,大约阅读时间需要 1 分钟。

AC代码:

#include
using namespace std;int main() { //freopen("in.txt", "r", stdin); ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); int t; cin >> t; while (t--) { string s, a = ""; cin >> s; for (auto p : s) a += "01"; if (s.find('0') == string::npos || s.find('1') == string::npos) cout << s << endl; else cout << a << endl; }}

转载地址:http://rbykz.baihongyu.com/

你可能感兴趣的文章
【Java远程debug】
查看>>
asp.net 5 中应用程序根目录及物理文件根目录的获取方式 此文已过期,不再适应rc1以后的版本
查看>>
最通俗易懂的囚徒困境
查看>>
递推的思维构建与技巧实现
查看>>
五道逻辑思维题
查看>>
第八届蓝桥杯程序设计大赛 国赛 填空题第一题 平方十位数
查看>>
get和post的区别
查看>>
MySQL下载安装图文
查看>>
MySQL 1064 You have an error in your SQL syntax 错误解决办法
查看>>
liteide错误: 进程无法启动--解决方法
查看>>
Java程序中的代理作用和应用场景及实现
查看>>
Oracle 用户
查看>>
Java 前台后台数据传递、中文乱码解决方法
查看>>
Git报错:Permission denied (publickey)
查看>>
常见的图文布局
查看>>
Laravel - 上手实现 - 文件上传、保存到 public 目录下
查看>>
一次性搞懂 PHP 中面向对象的所有知识点。
查看>>
JQuery.validate.js 表单验证
查看>>
vi 编辑器基本命令
查看>>
将mongo设置为windows的服务
查看>>