### MotaSanyal's blog

By MotaSanyal, history, 5 weeks ago, ,

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.

• -2

By MotaSanyal, history, 2 months ago, ,

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?

• +5

By MotaSanyal, history, 5 months ago, ,

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

Problem Source — Codenation Hiring Test

• -9

By MotaSanyal, history, 5 months ago, ,

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

Problem Source — Codenation Hiring Test

• +4

By MotaSanyal, history, 6 months ago, ,

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

Problem Source : TCS Codevita 2018