Блог пользователя hurt_FOR_heart

Автор hurt_FOR_heart, история, 9 месяцев назад, По-английски

I have been on codeforces for almost 5 years, i just take a break from cp for 1 year and i have seen a lot of changes in our community. Now i just want to recall and save some good old memories from everyone. Feel free to share your memories.

OK, me first.

You know you are old when you have seen purple vovuh single handled div 3 rounds

You know you are old when you have seen awoo was once pikmike

You know you are old when you have seen the retired blog of rng_58

You know you are old when you have seen red SecondThread provide useful solution

You know you are old when you have seen Wind_Eagle trolling cheater

And you are elderly people if you have participated in a contest and there's no cheaters.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +196
  • Проголосовать: не нравится

Автор hurt_FOR_heart, история, 3 года назад, По-английски

Recently, i have been thinking about this problem : You are given 2 permutations P and Q od length N and 1,2,3,...N appear exactly 1 time in each permutation. You have to answer Q query (Q <= N <= 2e5) with form L1 R1 L2 R2 means that how many element are "on" in range L2 R2 of Q if all element in range L1 R1 of P is "on" all other element in this query is "off"

Ex input : 6

3 2 4 5 1 6

1 2 3 4 5 6

1

2 4 4 6

output : 2

I have tried to use Mo + segment tree with O(N*sqrt(N)*logN) but it seems to be too slow. Anyone have better idea ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +4
  • Проголосовать: не нравится

Автор hurt_FOR_heart, история, 4 года назад, По-английски

Hello, at problem E last contest I have do segment tree and binary search which reach a good complexity O((n+q)log(maxY)log(n)) but i dont know why It just give me a TLE judgement on test 18 Maybe my poor implementation ? Or there's some infinite loop ? Or I just make a wrong calculation in complexity ? I still cant find my mistake so I hope u guy could help me. Here is my code: https://mirror.codeforces.com/contest/1440/submission/98824111 Thanks in advance.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится