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

Автор 3905, история, 8 лет назад, По-английски

Hello my submission for the problem http://mirror.codeforces.com/problemset/problem/691/D gets MLE while I have seen similar solutions getting passed using lesser memory.Can someone explain what is the reason behind it. My submission http://mirror.codeforces.com/contest/691/submission/19745411 & other similar solutions are http://mirror.codeforces.com/contest/691/submission/19081882 & http://mirror.codeforces.com/contest/691/submission/19274092 & http://mirror.codeforces.com/contest/691/submission/19107997. Thanks!

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

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

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

You are given N numbers and you have to determine total possible ways to arrange them such that N1 < N2 > N3 < N4 > N5 < N6 > N7....so on.N1,N2 are the numbers of the list.The interviewer didn't specify the constraints and asked instead for best possible solution.How to solve it?

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

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

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

Google search just says that execution time is proportional to certainty with the relation that (1 — 1/2^certainity) is less than actual probability of returning a prime but no explicit formula is mentioned ! It would be great if someone can tell that! Thank you !

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

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

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

Hello my submission here gives WA on test 3 due to precision issues.My question is how to detect playing with doubles would give a WA.Because there are many instances I recall where intended solution was to manipulate with doubles but still there was no precision errors unlike this case.So if someone can help me it would be great.And yeah in above solution I am trying to find all the coordinates first (0,0) & (a1,0) being the first two and then remaining coordinates and then using the standard way of finding area of triangle if coordinates are given.

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

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

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

I was trying to solve this problem .I read the editorial here but I am unable to figure out why C(i) = sum of C(j) just on the property that C(i) is in between 0 & M — 1 && that M divides (C(i) — sum of C(j)). If someone can help it will be highly appreciated. Thanx.

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

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

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

Can someone please explain the suffix automaton algorithm as I have read from all possible sources but still no clue. And also what does this algorithm give (I mean like in suffix array it is sorted suffixes of string).Also is Finite Automata same as suffix automaton.If no please can you mention the purpose of FA. I understood its algorithm but _ am unable to get its intuition and the purpose it's used.If someone can explain, I'll be highly obliged._ I know this is lot of work to explain but you can downvote the post if you like but please explain. Thanx .

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

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