#string suffix structures
CF 963D - Frequency of String Rating: 2500 Tags: hashing, string suffix structures, strings Model: gpt-5-3-mini Solve time: 1m 49s Verified: yes (1/1 samples) Share: https://chatgpt.com/share/6a33a36d-603c-83ec-9659-5838d7876b75 Solution Problem Understanding We are given a fixed text string and then many independent pattern queries. Each query gives a pattern string and a required frequency. For each query we need to look at all substrings of the main string that contain the pattern...
CF 932G - Palindrome Partition Rating: 2900 Tags: dp, string suffix structures, strings Model: gpt-5-3-mini Solve time: 2m 10s Verified: yes (1/1 samples) Solution Problem Understanding We are given a string and asked to count how many ways we can cut it into a sequence of contiguous pieces such that the sequence of pieces reads the same forwards and backwards, and the number of pieces is even. In other words,...