您的位置:首页 > 其它

F - Binary String Reconstruction CodeForces - 1352F

2020-07-04 11:40 113 查看

在这里插入代码片 `#include<stdio.h>
int main()
{
int a, b, c;
int t;
int i, j;

scanf("%d", &t);
for (i = 0; i < t; i++)
{
scanf("%d%d%d", &a, &b, &c);
if (b==0)
{
for (j = 0;a>0&& j <= a; j++)
{
printf("0");
}
for ( j = 0; c>0&&j <= c; j++)
{
printf("1");
}printf("\n");
}
else
{
for (j = 0; j <= a; j++)
{
printf("0");
}
for (j = 0; j <= c; j++)
{
printf("1");
}
for ( j = 0; j < (b-1)/2; j++)
{
printf("01");
}
if (b%2==0)
{
printf("0");
}printf("\n");
}
}

return 0;

}`

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: