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;
}`
相关文章推荐
- binary string codeforces 862D 交互题,二分答案
- Mahmoud and Ehab and the binary string CodeForces - 862D 二分+交互题
- String Reconstruction CodeForces - 827A 贪心 伪字符串匹配
- Educational Codeforces Round 16 E. Generate a String-DP
- Educational Codeforces Round 31 E. Binary Matrix 并查集
- Codeforces Round #447 (Div. 2) D. Ralph And His Tour in Binary Country(dfs)
- Codeforces Round #402 (Div. 1) A. String Game
- Educational Codeforces Round 9 C. The Smallest String Concatenation —— 贪心 + 字符串
- Educational Codeforces Round 31 E. Binary Matrix 并查集
- 【Educational Codeforces Round 16】 Codeforces 710E Generate a String
- Educational Codeforces Round 20 A - Maximal Binary Matrix
- 【Educational Codeforces Round 1B】【字符串平移 水题】Queries on a String 字符串平移水题
- codeforces F.Fibonacci String Subsequences
- Educational Codeforces Round 8 C. Bear and String Distance 贪心
- The Smallest String Concatenation CodeForces - 632C (string sort)
- codeforces AIM Tech Round 3 (Div. 2)D. Recover the String
- Educational Codeforces Round 9-C. The Smallest String Concatenation(string)
- Codeforces Round #147 (Div. 2) E Build String(最小费用流)
- F. Binary String Reconstruction
- Codeforces Round #282 Div.1 B Obsessive String --DP