Apple_Method's blog

By Apple_Method, history, 3 years ago, In English

Hi codeforces!

A group of friends and I were recently working towards proposing a contest, since we had many ideas and one of my friends recently reached master. After figuring out most of the problems, we decided to propose the contest earlier today, but I encountered an interesting problem that I did not find a blog for, explaining the solution.

After my friend sent the invitation to coauthor the contest, I could see all of the problems that we had written so far, but I could not edit or create any new problems.

On my friend's screen, he could see the normal 5 bars which allows him to create problems:

However, on my screen, I can only see:

No matter what I do, it does not seem like I am able to propose a problem. For now, I have sent all of the information to my friends through discord and they have uploaded the problems, but it is super inconvenient and also very unproductive. Is this intentional (and if so, why would codeforces want to block me and not my friends), or is this a bug?

If it is a bug, I would appreciate it so much if it were fixed.

Note: this is not a complaint; the systems that the codeforces staff has been able to create is wonderful and much appreciated. Rather, this is an inquiry into why I do not have the ability to propose problems, as I have not found any other resources on codeforces that answer my question. If anyone can link a blog, that would also be excellent!

Full text and comments »

  • Vote: I like it
  • +76
  • Vote: I do not like it

By Apple_Method, history, 3 years ago, In English

Hi everyone,

I was thinking about the following string problem:

You are given a string of length n, and q queries. Each query is a substring of the original string (s[l ... r]). For each query, you want to find the number of prefixes of the substring that are equal to a suffix. For example:

abcabc

2

1 3

1 5

For the first query, the answer should be 1, and the second query, the answer should be 2 (abcab == abcab, and ab == ab).

I haven't made much progress so far (I tried getting aho-corasick and suffix array to work, but I didn't find a way). Assuming $$$n \le 10^5$$$ and $$$q \le 10^5$$$, none of my ideas work.

Is there a solution to this problem, or is the lower bound on the time complexity $$$O(n^2+q)$$$ or $$$O(nq)$$$ (the best solutions i have found so far).

Because the problem has no source (I was thinking about problem ideas and stumbled upon this one) there might be no answer, but the problem seems so simple that there has to be one.

Excuse me if there are any mistakes here, as this is my first blog ever

Full text and comments »

  • Vote: I like it
  • +40
  • Vote: I do not like it