Jastin's blog

By Jastin, 3 weeks ago, In English

If you remember me , I am the boron .

I have got negative delta in today contest but that is brought me in beast mode .

I AM Not-Afraid (just to color not-afraid).

Nothing is possible without fire and now fire is inside me.

Read more »

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

By Jastin, history, 5 months ago, In English

It might be very dumb doubt , could someone help in how to quote someone while writing comment or blog ? For example first line of this comment .

Read more »

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

By Jastin, 5 months ago, In English

I usually make observations whenever i am not able to solve some problem.

In round 682 , I found that problem C,D,E were not solved by many people but after hints and editorials was given lot of people upsolved them.

Let us take problem E :

I was not able to solve this problem on my own . But if we see the editorial , it's just based on simple observation that sum of elements should have bit higher than border elements . Prove for efficiency is also very easy.

I did not asked these questions to myself while solving the problem.

Usually i see that i have solve lot problems before i am able to solve some problem of similar type.But this way of practicing will take lot of time to become good coder.

You see that understanding the solution is a cakewalk , but coming up by yourself is difficult . Is this due to laziness i.e out brain not used to it ?

So i ask people for their opinions on it.

I would also like to hear the suggestions of people of all colors (from unrated,newbie to LGM).

I have watched stream of these red coders and i see that they solve problems without much thinking but i am sure this was not the case when they were 2 to 3 year experienced in the field.

I genuinely want you people opinions. After getting around -15 votes it will automatically become invisible from recent actions.

Read more »

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

By Jastin, 8 months ago, In English

I have watched screen cast of few red coders like SecondThread and i have seen that they debug just by looking at code . I usually use GDB for c++ for debugging. I wanted to know what are different possible ways to debug our program without using any print statement or any other tool like GDB.

Also i have to debug a lot . Is there some way to improve in this regard ?

Read more »

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

By Jastin, 8 months ago, In English

Please share your ideas and ask for help for kickstart round E . Unfortunately someone made a blog previously and after few people discussed he/she deleted it .Please don't delete blogs after there is even one comment with positive votes. So many heavy downvotes , please don't do this ! . Blog becomes draft i.e invisible if it gets around -30 downvotes .

Read more »

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

By Jastin, 11 months ago, In English

Can someone share any resource / link which has solution or explanation or atleast well written code for most of the DP problems on the spoj ?

Thanks

Read more »

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

By Jastin, 11 months ago, In English

I don't have proof but i have gut feeling that , suppose s1 is string which needs to be converted to s2 then we can keep the largest common subsequence in s1 as it is and edit distance is number of elements we need to replace/remove/insert.

For example : s1 = "adjsjvnejnv"
              s2 = "djpppne"

Here LCS is "djne" , now we need to remove 3 element string "jnv" at right side of "djne" ,we can replace "sjv" with "ppp" in s1 and and we can delete "a" from s1. so total edit distance is 3+3+1 = 7 .

Idea is to replace or delete elements inbetween the elements of LCS and add or remove elements from right and left part of LCS .

I am not able to prove it . Can someone provide counterexample or proof ?

Read more »

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

By Jastin, history, 12 months ago, In English

Problem link : https://codeforces.com/contest/1338/problem/C .

When you saw the problem , what came to your mind ? what was thought process ? How much time did you took to solve it ? I am a beginner and whenever i see such kind of problem , i get stuck and can't think of different approaches

Read more »

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

By Jastin, history, 13 months ago, In English

This post is on serious issue. Currently my level is DIV2-C,D (during contest i am mostly able to solve C and sometimes D) . Whenever i fail to solve any problem (say D) and i see editorial i am able to understand the solution very quickly most of the times .

But when i see solution(editorial) for problem E or F , sometimes i find difficult to understand the editorial itself ! Why ? Because most authors write solution in a way which can be only understood by person who is able to solve problems of that difficulty level most of the time .

But the problem is it becomes difficult for people to improve fast.They either do not upsolve or take days to figure out what editorial want's to say . Now some RED people might say that editorial don't explain fully or give proper details because they want YOU TO THINK . But editorial can be written by adding spoilers such that a person first tries on his own to understand and then if not able to he can read the spoiler .Please see following editorial written by T.M William Link .In difficult problems authors can explain the solution using an concrete example.I want such type of editorial on coding platforms.That is education ! First try on your own and if not able to succeed seek the help ! you can't keep figuring out whole life.

May be time is issue for writing good editorials .But quality > time .Take 1/2 day for releasing the tutorial but write them properly .

You can see past contests and observe that number of people who upsolve a problem (D/E/F) is proportional to the quality of editorial .Else people keep commenting to explain them properly in simple words etc .

I will also accept suggestions from people on how to read editorial properly .

Read more »

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

By Jastin, 13 months ago, In English

I read problem D many times i could not figure out what it want's to say . Can someone explain the problem with second example case. Problem D is the only problem in my life time that i did not understood by myself so please help me.

LINK

Read more »

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

By Jastin, history, 15 months ago, In English

Is there any performance difference between emplace and push ? Also according to stack overflow Link push stores copy of existing instance . Does that mean suppose i make a instance variable 'd' of class say Demo .If i push into stack then another variable pointing to same instance is pushed back or new copy of instance of 'd' is made and pushed back ?

Read more »

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

By Jastin, history, 16 months ago, In English

In goodbye 2019 problem G , it is mentioned that suppose an array with n elements is given such that each element a_i is from (i-n) to (i-1) then there exist subset of the array whose sum is zero . How to prove it ?

Read more »

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

By Jastin, history, 16 months ago, In English

I did not got the part of editorial where solution is optimized from O(n^2) to O(n^(1/2)) . I want to understand that part only .

Editorial

Please do not downvote this post :If some one helps me then this post might help some one else.Why you want to downvote ? Will this post harm some one ? No .Is it rude or offensive ? No . Do i want to increase my contribution ? No (You can choose not to upvote and just help me and it will be great help for me) . Please understand that everyone is once a beginner .

Read more »

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

By Jastin, history, 16 months ago, In English

I read the Editorial of this problem . I got some idea but did not understood it completely .Can someone help me explaining it (will be good if explained using example) .

Read more »

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

By Jastin, history, 16 months ago, In English

Happy New Year .Hope all of you had nice 2019. Is reading other people code a good way to improve in CP .May be they know how to implement the same solution better and it is good to see their code. But it becomes very difficult for me to understand the code of other people for difficult problems like DIV2 E .(Note : I am able to understand editorial and solution provided in comments and i am able to implement by my own) What should i do in this case ?

Read more »

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

By Jastin, history, 16 months ago, In English

In the problem tag it is mentioned that it can be solved using binary search.How to solve it using binary search ? https://codeforces.com/contest/1283/problem/D

Read more »

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

By Jastin, 16 months ago, In English

https://codeforces.com/contest/1269/problem/D

In editorial it is given that answer is min(black colors , white colors) .But why it cannot be less than that ? Also what is the problem with algorithm when histogram is not given in sorted order (i.e decreasing height) ?

Also one request to editorial writers . You guys are doing great job,thanks, but if you write more simple explanation it will help beginners and people in general a lot ! (I am not saying that editorial of this contest is not good).

Read more »

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

By Jastin, history, 16 months ago, In English

https://codeforces.com/contest/1266/problem/D

Editorial of the problem does not explains how to implement the solution .It only tells what conditions will hold after every operation and at the end (when optimal answer has been reached).

I read few submissions and they used set to solve the problem , for example : https://codeforces.com/contest/1266/submission/67106641

I will be very thankful if someone helps me to understand the solution .

Read more »

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