Lotte10's blog

By Lotte10, 6 years ago, In English

Hello codeforces recently I've met the following problem https://codeforces.me/gym/101856/problem/B (problem B, Breaking the Curse).

For those who are too lazy to go through the link I will try to explain the problem as briefly as possible: We are given the two string $$$S, T$$$ and $$$Q$$$ queries. Queries are described by two integers $$$L$$$ and $$$R$$$, as a response we should print the number of intervals $$$i, j$$$ such that $$$L ≤ i ≤ j ≤ R$$$ and $$$S[i...j]$$$ is the substring of $$$T$$$.

Can someone give a hint or idea how to solve this ? (I would like to know the solution with Suffix Array:) )

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Lotte10, 7 years ago, In English

Hi Codeforses, first of all Ramadan Mubarak. For those who do not know what Ramadan is, in short, this is a holy month for Muslims when they fast from dawn to sunset(eating, drinking and intimate activity are forbidden).

So, I try to never miss contests, even during this month. The fact is that the start time of the regular contest will exactly coincide with the sunset time in my region, in other words with the time when I break my fast. In fact, I only have time to drink a glass of water before the contest starts.

I noticed that with the beginning of the month of Ramadan, my usual results in contests (div. 2 A, B, C and sometimes D or E) worsened (I hardly solve A and B). After the contest I eat something and have a rest, then I solve remaining C, D more or less normally (sometimes with the help of editorial). Naturally, I could lose my shape and become dumb, but I wonder if this could happen because I fast and start contests with the feeling of starvation.

And also am I only one who experiences this or there are people who are also exposed to this? If it happened only to me, then probably I became dumb:(

UPD: Downvote this post how much you want guys, because this is fake account, I do not care. May be you hate religion stuff in Codeforces, but this is community after all

Full text and comments »

  • Vote: I like it
  • -30
  • Vote: I do not like it