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

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

Hello friends, I have a doubt in question D)Catching Cheaters from Codeforces Round #683 (Div. 2, by Meet IT). Question link — https://codeforces.me/contest/1447/problem/D I did this question using dynamic programming with a recursive approach. In my solution https://codeforces.me/contest/1447/submission/98977433 ,verdict came as time limit exceeded but when I shifted line 14->17 two lines forward in my new solution https://codeforces.me/contest/1447/submission/98977715 which you can see in the dynamic function verdict came is accepted. The below shown is the portion which I shifted. int c1=-1; if(str1[a]==str2[b]){ c1=2+dynamic(a+1,b+1); } I am not able to find out the reason for this. I have been working on this since 2 days. So, I shall be thankful if someone helps me in this.

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

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

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

In educational codeforces round 96, I am not able to debug my code for a particular question after trying a lot. The test case(112th) which is giving wrong answer is not shown due to the long list of test cases. Link to the problem https://codeforces.me/contest/1430/problem/D My code- https://codeforces.me/contest/1430/submission/95315759

It would be a great if I could know the 112th test case or any test case for which my code is giving wrong answer. Thank you!

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

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