func_code_string: #include <bits/stdc++.h>   using namespace std;   namespace whatever {   const long long inf = 1000000000000000001ll;   template <typename type>   type read() {     char ch = getchar();     while (!isdigit(ch)) ch = getchar();     type value = ch -  0 ;     ch = getchar();     while (isdigit(ch)) {       value = value * 10 + ch -  0 ;       ch = getchar();     }     return value;   }   int n;   string f[201];   char result[202];   int fail[201];   int match(const string &str, int l) {     int cnt = 0;     int cur = 0;     for (char ch : str) {       while (cur && ch != result[cur + 1]) cur = fail[cur];       if (ch == result[cur + 1]) ++cur;       if (cur == l) {         ++cnt;         cur = fail[cur];       }     }     return cnt;   }   long long count(int l) {     static long long cnt[201];     int i;     for (i = 0; i <= n && (i < 2 || int(f[i - 2].size()) <= l); ++i)       cnt[i] = match(f[i], l);     if (i <= n) {       long long span_cnt[2];       span_cnt[i % 2] = match(           f[i - 2].substr(f[i - 2].size() - l + 1) + f[i - 1].substr(0, l - 1),           l);       span_cnt[1 - i % 2] = match(           f[i - 2].substr(f[i - 2].size() - l + 1) + f[i - 2].substr(0, l - 1),           l);       do {         cnt[i] = cnt[i - 2] + cnt[i - 1] + span_cnt[i % 2];         if (cnt[i] >= inf) return inf;       } while (++i <= n);     }     return cnt[n];   }   void insert(int l, char ch) {     result[l] = ch;     if (l == 1) return;     int cur = fail[l - 1];     while (cur && ch != result[cur + 1]) cur = fail[cur];     if (ch == result[cur + 1]) ++cur;     fail[l] = cur;   }   void run() {     n = read<int>();     long long k = read<long long>() + 1;     int m = read<int>();     f[0] =  0 ;     f[1] =  1 ;     int last = n;     for (int i = 2; i <= n; ++i)       if (int(f[i - 2].size()) <= m)         f[i] = f[i - 2] + f[i - 1];       else {         last = i - 1;         break;       }     cerr <<  last:   << last << endl;     fail[1] = 0;     for (int i = 1; i <= m; ++i) {       if (f[last].substr(f[last].size() - i + 1) ==           string(result + 1, result + i)) {         if (--k == 0) break;       }       insert(i,  0 );       long long cnt = count(i);       if (cnt >= k)         putchar( 0 );       else {         k -= cnt;         insert(i,  1 );         putchar( 1 );       }     }     putchar(  n );   }   }  // namespace whatever   int main() { whatever::run(); }   