-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1352F.cpp
More file actions
45 lines (40 loc) · 699 Bytes
/
Copy path1352F.cpp
File metadata and controls
45 lines (40 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <bits/stdc++.h>
#define ll long long
using namespace std;
void solve()
{
ll n0, n1, n2;
cin >> n0 >> n1 >> n2;
int curr = 1;
if (n1 == 0)
{
if (n0)
{
cout << string(n0 + 1, '0') << endl;
}
else
cout << string(n2 + 1, '1') << endl;
}
else
{
cout << string(n0 + 1, '0') << string(n2 + 1, '1');
--n1;
curr = 0;
while (n1--)
{
cout << curr;
curr ^= 1;
}
cout << endl;
}
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--)
solve();
return 0;
}