博客
关于我
Problem 1342B - Binary Period (思维)
阅读量:398 次
发布时间: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/

你可能感兴趣的文章
C++中找资源或者函数的方法
查看>>
一些留给自己的思考题(只求回过头来能够有所获)
查看>>
SQL函数返回表的写法
查看>>
delete对象时会自动调用类的析构函数
查看>>
C++ 子类对象直接赋值给父类对象可行,反过来不行
查看>>
linux下同一个动态库名为何辣么多的.so文件
查看>>
SQL联表的方式(逗号, Left Join, Right Join)
查看>>
牛客网输入输出举例
查看>>
字符串初始化时的注意点
查看>>
软考相关试题
查看>>
顺序表的操作
查看>>
常量表达式
查看>>
POD类型
查看>>
const与常量,傻傻分不清楚~
查看>>
Head First设计模式——迭代器模式
查看>>
MongoDB版本及存储引擎区别
查看>>
shell echo单行和多行文字定向写入到文件中
查看>>
AtCoder Beginner Contest 100 题解
查看>>
【数据结构】可持久化线段树初步
查看>>
Java高性能编程之CAS与ABA及解决方法
查看>>