(int pos, int len)
| 156 | |
| 157 | // 从整个文章的pos位置,往后len的长度,这些内容找到,写入进str |
| 158 | public static void get(int pos, int len) { |
| 159 | find(pos); |
| 160 | int curb = bi; |
| 161 | pos = pi; |
| 162 | int done = (len < siz[curb] - pos) ? len : (siz[curb] - pos); |
| 163 | System.arraycopy(space[curb], pos, str, 0, done); |
| 164 | curb = nxt[curb]; |
| 165 | while (curb != -1 && done + siz[curb] <= len) { |
| 166 | System.arraycopy(space[curb], 0, str, done, siz[curb]); |
| 167 | done += siz[curb]; |
| 168 | curb = nxt[curb]; |
| 169 | } |
| 170 | if (curb != -1 && done < len) { |
| 171 | System.arraycopy(space[curb], 0, str, done, len - done); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | public static void main(String[] args) throws Exception { |
| 176 | FastReader in = new FastReader(); |
no test coverage detected