func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_N = 201;   inline void NEXT(const char *T, int *next, int t_len) {     next[0] = -1;     for (int i = 1; i < t_len; i++) {       int j = next[i - 1];       while (j >= 0 && T[i - 1] != T[j]) j = next[j];       if (j >= 0 && T[i - 1] == T[j])         next[i] = j + 1;       else         next[i] = 0;     }   }   int COUNT_KMP(const char *S, const char *T, int s_len, int t_len) {     int next[t_len];     NEXT(T, next, t_len);     int index, count = 0;     for (index = 0; index < s_len; ++index) {       int pos = 0;       int iter = index;       while (pos < t_len && iter < s_len) {         if (S[iter] == T[pos]) {           ++iter;           ++pos;         } else {           if (pos == 0)             ++iter;           else             pos = next[pos - 1] + 1;         }       }       if (pos == t_len && (iter - index) == t_len) ++count;     }     return count;   }   int my_substr(char *s, char *t, int pos, int len) {     int i;     for (i = 0; i < len; ++i) {       if (t[i + pos] ==   0 ) {         break;       }       s[i] = t[i + pos];     }     s[i] =   0 ;     return i;   }   int64_t cal(const char *s, int n, int64_t k) {     int64_t sum[MAX_N];     memset(sum, 0, sizeof(sum));     char f[MAX_N][MAX_N * 10 + 1];     int len[MAX_N];     memset(len, 0, sizeof(len));     int s_len = strlen(s);     sprintf(f[0],  0 );     sprintf(f[1],  1 );     len[0] = len[1] = 1;     if (s_len == 1) {       if (s[0] ==  0 ) {         sum[0]++;       } else if (s[0] ==  1 ) {         sum[1]++;       }     }     int max_len = s_len - 1;     char tmp_str[MAX_N * 10 + 1];     for (int i = 2; i <= n; ++i) {       len[i] = len[i - 2] + len[i - 1];       sprintf(f[i],  %s%s , f[i - 2], f[i - 1]);       int start = 0;       if (len[i - 2] > max_len) {         start = len[i - 2] - max_len;       }       int my_len = my_substr(tmp_str, f[i - 2], start, max_len);       my_len += my_substr(tmp_str + my_len, f[i - 1], 0, max_len);       int64_t result = COUNT_KMP(tmp_str, s, my_len, s_len);       sum[i] = sum[i - 2] + sum[i - 1] + result;       if (sum[i] > k) {         return sum[i];       }       if (len[i] > max_len * 2) {         int del_num = len[i] - (max_len * 2);         for (int pos = max_len + del_num; pos < len[i]; ++pos) {           f[i][pos - del_num] = f[i][pos];         }         len[i] = max_len * 2;         f[i][len[i]] =   0 ;       }     }     return sum[n];   }   int process() {     int n, m;     int64_t k;     char suffix[] =          110101101011011010110101101101011011010110101101101011011010110101101101           011010110110101101101011010110110101101011011010110110101101011011010110           11010110101101101011010110110101101101011010110110101101 ;     int suffix_len = strlen(suffix);     cin >> n >> k >> m;     char s[MAX_N];     memset(s,   0 , sizeof(s));     for (int i = 0; i < m; ++i) {       int pos = suffix_len - i;       int s_pos = 0;       while (pos < suffix_len) {         if (s[s_pos] != suffix[pos]) {           break;         }         s_pos++;         pos++;       }       if (pos == suffix_len && i > 0) {         if (k == 1) {           break;         }         k--;       }       if (i > 0 && s[i - 1] ==  0 ) {         s[i] =  1 ;         s[i + 1] =   0 ;         continue;       }       if (i > 1 && s[i - 1] ==  1  && s[i - 2] ==  1 ) {         s[i] =  0 ;         s[i + 1] =   0 ;         continue;       }       s[i] =  0 ;       s[i + 1] =   0 ;       int64_t count = cal(s, n, k);       if (count < k) {         k = k - count;         s[i] =  1 ;       }     }     printf( %s n , s);     return 0;   }   int main(int argc, char *argv[]) {     process();     return 0;   }   