wretched's blog

By wretched, history, 3 months ago, In English

I can findout the farthest nodes of a tree using dfs or bfs.How can I solve this problem using these technique or anything is new to solve this problem? Problem link : https://lightoj.com/problem/visiting-islands Help plz.

Read more »

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

By wretched, history, 12 months ago, In English

I have to count the sum where sum is LCM(1,N)+LCM(2,N)....+LCM(N,N). There also will be test case, T<=50000 and N<=1000000.Now I want to generate the sum for each number.How can I solve this,help me.

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By wretched, history, 12 months ago, In English

Recently,I have started to try DP problems.But for this problem(Rooks-lightoj 1005) though I have already thought much but I am not getting any idea how can i solve this problem by using DP technique.Can anyone help me what's the actual idea behind this problem!!

Read more »

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