Why in the suffix array is it necessary to put a character like '$' in the end?

I do not understand why it does not work if that character is missing!

Thanks in advance!

# | User | Rating |
---|---|---|

1 | tourist | 3624 |

2 | Um_nik | 3468 |

3 | mnbvmar | 3363 |

4 | Petr | 3330 |

5 | wxhtxdy | 3329 |

6 | LHiC | 3300 |

7 | sunset | 3278 |

8 | V--o_o--V | 3275 |

9 | Vn_nV | 3182 |

10 | dotorya | 3156 |

# | User | Contrib. |
---|---|---|

1 | Radewoosh | 191 |

2 | Errichto | 184 |

3 | rng_58 | 160 |

4 | PikMike | 159 |

5 | Petr | 156 |

6 | Vovuh | 153 |

6 | Um_nik | 153 |

6 | neal | 153 |

9 | Ashishgup | 152 |

10 | majk | 151 |

10 | 300iq | 151 |

I do not understand why it does not work if that character is missing!

Thanks in advance!

I need help with this knapsack variant

Thanks

What data structures are needed in competitive programming?

I know all stl structures, segment tree and BIT. But I have heard

others like treap, AVL tree, persistents, but I don't know if those

structures are really neccesary for competitive programming or

all their uses can be replaced by others and if not,

What are all the necessary data structures?

And recommend me some problems, please?

Lately I've done some combinatorial problems. And I am wondering.

What methods are used to calculate the binomial coefficients?

What is the most effective?

I have used dynamic programming, although it is effective for many

queries and can be modulated with any number, the range is too limited.

When the number is a bit higher, I have used modular arithmetic

but I need to precalculate all factorials and is needed a prime number

as a module and really the range is not so large just 10 ^ 5 maybe.

If the problem have higher numbers, I'm lost

Can you tell me what techniques you use and when they can be used are?

I hope you can help me

Thank you

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Mar/18/2019 17:31:14 (d3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|