Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t;cin>>t;
- while(t--)
- {
- int x;cin>>x;
- if(x%2!=0)
- {
- cout<<-1<<endl;
- }
- else
- {
- int a[x];
- for(int i = 0;i <= (x/2-1);i++ )
- {
- a[i] = 1;
- }
- for(int i = x/2;i <= x-1;i++ )
- {
- a[i] = 0;
- }
- for(int i = 0;i <= x-1;i++ )
- {
- cout<<a[i];
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement