bully....maguire's blog

By bully....maguire, 3 years ago, In English

I've observed that sometimes submissions using set pass where map give TLE (for one submission I observed that set solution was executing in 200ms whereas map solution giving TLE (2000ms))). Both are implemented using red black tree. So why such big difference in execution ?

Full text and comments »

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

By bully....maguire, 3 years ago, In English

Note that this is serious message from my side.

Hello,

I apologies for abusing/cursing/trolling people many times.

I have understood my mistake. I apologies and I will never ever troll/abuse anyone again in my life. I am young and I made mistake. But I promise I never would repeat my mistake in future.

Special apology to -is-this-fft-, Radewoosh, Errichto, Um_nik. You guys didn't do anything to me. No loss to me. still I cursed you. sorry. won't repeat.

Internet has given us freedom to learn not to troll.

Full text and comments »

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

By bully....maguire, history, 4 years ago, In English

problem

The most important observation here is that similar characters must be together. I want to ask people who solved it by themselves reached to that observation ? It was asked by codebuster_10 here but no one replied. Editorial gives the mathematical proof but I want to know the lane of thought (because first we make guess and then justify).

Also it will be good if someone provides easier way of justifying it.

Full text and comments »

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

By bully....maguire, history, 4 years ago, In English

When i look solution of editorial i make sure that i understand them correctly. But may times i fail to solve problems using similar idea or even sometimes the same problem. How should i improve my way of practicing to not forget them ?

Also is it good idea to give lot of contests and upsolve them or i should limit the number of contests i give and practice problems from problemset above my rating ?

Full text and comments »

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

By bully....maguire, 4 years 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.

Full text and comments »

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

By bully....maguire, history, 4 years 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 .

Full text and comments »

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

By bully....maguire, 4 years 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.

Full text and comments »

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

By bully....maguire, 4 years 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 ?

Full text and comments »

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

By bully....maguire, 4 years 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 .

Full text and comments »

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

By bully....maguire, 5 years 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

Full text and comments »

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

By bully....maguire, 5 years 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 ?

Full text and comments »

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

By bully....maguire, history, 5 years ago, In English

Problem link : https://codeforces.net/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

Full text and comments »

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

By bully....maguire, history, 5 years 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 .

Full text and comments »

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

By bully....maguire, 5 years 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

Full text and comments »

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

By bully....maguire, history, 5 years 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 ?

Full text and comments »

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

By bully....maguire, history, 5 years 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 ?

Full text and comments »

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

By bully....maguire, history, 5 years 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 .

Full text and comments »

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

By bully....maguire, history, 5 years 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) .

Full text and comments »

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

By bully....maguire, history, 5 years 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 ?

Full text and comments »

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

By bully....maguire, history, 5 years 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.net/contest/1283/problem/D

Full text and comments »

By bully....maguire, 5 years ago, In English

https://codeforces.net/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).

Full text and comments »

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

By bully....maguire, history, 5 years ago, In English

https://codeforces.net/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.net/contest/1266/submission/67106641

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

Full text and comments »

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