题库练习 Genius's Gambit
← 上一题 下一题 →

A14104 | Genius's Gambit

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

You are given three integers $a$ , $b$ , $k$ .

Find two binary integers $x$ and $y$ ( $x \ge y$ ) such that

1. both $x$ and $y$ consist of $a$ zeroes and $b$ ones;
2. $x - y$ (also written in binary form) has exactly $k$ ones.

You are not allowed to use leading zeros for $x$ and $y$ .

输入格式

The only line contains three integers $a$ , $b$ , and $k$ ( $0 \leq a$ ; $1 \leq b$ ; $0 \leq k \leq a + b \leq 2 \cdot 10^5$ ) — the number of zeroes, ones, and the number of ones in the result.

输出格式

If it's possible to find two suitable integers, print "Yes" followed by $x$ and $y$ in base-2.

Otherwise print "No".

If there are multiple possible answers, print any of them.

输入输出样例

输入 #1
4 2 3
输出 #1
Yes
101000
100001
输入 #2
3 2 1
输出 #2
Yes
10100
10010
输入 #3
3 2 5
输出 #3
No
C++ 编辑器
输入
输出