| 45 | i != next[cur.first].end();++i){ |
| 46 | S.push(ii((*i).second, 0)); } } } } |
| 47 | string lexicok(ll k){ |
| 48 | int st = 0; string res; map<char,int>::iterator i; |
| 49 | while(k){ |
| 50 | for(i = next[st].begin(); i != next[st].end(); ++i){ |
| 51 | if(k <= cnt[(*i).second]){ st = (*i).second; |
| 52 | res.push_back((*i).first); k--; break; |
| 53 | } else { k -= cnt[(*i).second]; } } } |
| 54 | return res; } |
| 55 | void countoccur(){ |
| 56 | for(int i = 0; i < sz; ++i){ occur[i] = 1 - isclone[i]; } |
| 57 | vii states(sz); |