#include using namespace std; #include using namespace atcoder; //using mint = static_modint<998244353>; //using mint = modint; using mint = static_modint<1000000007>; using vm = vector; using vvm = vector; ostream &operator<<(ostream &o,const mint &m){cout<; using vvl = vector; using pl = pair; #define rep(i,n) for(ll i=0;i<(ll)(n);++i) #define reps(i,s,n) for(ll i=(s);i<(ll)(n);++i) #define rep1(i,n) for(ll i=1;i<=(ll)(n);++i) #define ts(i) to_string(i) #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) const long long INF = 1e18; #ifdef DEBUG #include #endif string solve(){ ll N,M,K; cin >> N>>M>>K; #ifdef DEBUG cout<<"N="<0&&M>0) return "-1"; if(N>0){ rep(i,N)s+='0'; }else{ rep(i,M)s+='1'; } return s; } ll a,b; if(K%2){ a=(K+1)/2;b=(K+1)/2; }else{ a=K/2+1;b=K/2; } #ifdef DEBUG cout<<"a="< v0(a,"0"),v1(b,"1"); rep(i,N-a){ v0.at(0)+='0'; } rep(i,M-b){ v1.back()+='1'; } rep(i,K+1){ if(i%2)s0+=v1.at(i/2); else s0+=v0.at(i/2); } vector w0(b,"0"),w1(a,"1"); rep(i,M-a){ w1.back()+='1'; } rep(i,N-b){ w0.at(0)+='0'; } rep(i,K+1){ if(i%2)s1+=w0.at(i/2); else s1+=w1.at(i/2); } if(s0