MotaSanyal's blog

By MotaSanyal, history, 5 weeks ago, In English,

Hello Everyone! I am stuck at this problem. I would highly appreciate if somebody explains me how the approach to this problem.

P.S. : This problem doesn't have an editorial yet.

Read more »

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

By MotaSanyal, history, 2 months ago, In English,

Hi everyone!

I was trying to solve this problem which came in last year ICPC Gwalior-Pune Onsite Round.

My approach :

I first checked whether C is present either in A or in B, if so, then answer will be length(A) + length(B) Otherwise , found the longest prefix of C that occurs as a suffix of A (say, X) and longest suffix of C that occurs as prefix of B (say, Y). Then if X+Y <= length(C), answer will be length(A) + length(B) + (length(C) — (X+Y)) , else if X+Y > length(C), then answer is length(A) + length(B) + (length(C) — max(X,Y)).

The verdict I am getting is Wrong Answer. Can anyone please point out where am I going wrong?

Read more »

 
 
 
 
  • Vote: I like it
  • +5
  • Vote: I do not like it

By MotaSanyal, history, 5 months ago, In English,

Hello everyone ! It would be nice if anyone helps me with the solution to this problem — Constrained GCD Array

Problem Source — Codenation Hiring Test

Read more »

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

By MotaSanyal, history, 5 months ago, In English,

Hello everyone ! It would be nice if anyone helps me with the solution to this problem — Even Paths

Problem Source — Codenation Hiring Test

Read more »

 
 
 
 
  • Vote: I like it
  • +4
  • Vote: I do not like it

By MotaSanyal, history, 6 months ago, In English,

Hello everyone. It would be nice if anyone helps me with the solution to this problem — Integer Expression

Problem Source : TCS Codevita 2018

Read more »

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