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

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

Hello all, I am solving Problem and it is running fine in my computer. I also checked on ideone.com and there also it is giving expected output but it is giving runtime error on codeforces(Exit code is -1073741819) Submission. Can anyone help me and tell reason for this weird behavior? Thanks in advance.

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

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

Автор samurai123, 6 лет назад, По-английски

Happy new year all. I was solving this Problem which uses idea of dp+sorting. I saw it's editorial and somewhat understood. In editorial it is mentioned that we will calculate answer by knapsack dp. Other fact mentioned in editorial is that we will always use every small items before any large items to minimize penalty. But, I have doubt that in knapsack dp,we are not considering this fact.How can we be sure that the order we took by dp will minimize penalty as we are taking some large items before some small items in dp without violating constraints? Thanks in advance.

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

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

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

Hello Codeforces, Can anyone help me in the Problem? There is no editorial for these round. I read others codes but it is hard to find out logic from that. Any help will be appreciated. Thanks.

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

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

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

I was solving SHPATH on spoj LINK. It is direct implementation of dijkstra's algorithm but my code is constantly giving runtime error. The error is always occuring when it is extracting last element from priority queue. Can anybody help and tell the reason ? LINK OF CODE

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

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

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

I was solving LABYR1 spoj problem LINK and the problem reduced to finding diameter of tree. But when I submitted it is constantly giving WA. Any help will be appreciated. LINK OF MY CODE

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

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

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

Happy new year to everyone, I was solving ACPC10D problem from spoj LINK but I am constantly getting RTE SIGSEGV while submitting. I have tried all the testcases which are mentioned in the forum and my solution gives correct output to every testcase. Then Can you help me in finding bug the code CODE? The people in the forum commented that it is not possible to solve it with top down approach. Howeever it is simple dp problem and my solution seems to be correct. So please, help me out.

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

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

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

Hello all, I was solving Fibosum on spoj LINK and in that the matrix is to be formed which will calculate nth fibonacci number in log(n) time. But I am not getting,what to put in entry of that matrix and how to formulate that matrix i.e.  Can anyone give steps to do in such type of problems?No resources are there on internet.

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

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

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

I have solved the problem LINK with sliding window. But in comments, some people mentioned about solving it with binary search. What should be the search function for binary search in the problem? Can that function be made without using concept of sliding window.

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

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