notking's blog

By notking, history, 6 years ago, In English

Hello guys

I was trying to solve problem E from last CF round and I got the idea that we can make a bridge tree(compress unbridged-connected nodes into a single node) and then find the diameter of the tree.

I saw some solutions that first find the nodes and compress them and then new dfs to find diameter as usual but I saw the shortest codes submitted and was amazed to see that it just contained a single dfs and was very neat.

I have two questions. Firstly how does this code work without actually finding diameter and how do people come up with such implementation? Do they first think about the whole implementation which is shortest and then code?

Full text and comments »

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

By notking, 6 years ago, In English

There is a feature to see all Div1/2 X problem on A2OJ altogether. Also, we can find all dp problems on codeforces using tags but how can I see all Div2 C problems which include dynamic programming? Is there some way? If it's not, I would request this feature and I think it will help many people.

Full text and comments »

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

By notking, history, 6 years ago, In English

I had read a blog about solving matrix exponentiation without using matrices but just by using some iterative code(it was matrix expo in the background). It was written by some chinese purple(at that time) coder but I forgot to bookmark it so I lost it. Can somebody help me find it?

Full text and comments »

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

By notking, history, 6 years ago, In English

Can someone share the solution of both problem on the techgig code gladiator contest? Also do they really give out Rs 500 Amazon voucher?

Full text and comments »

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

By notking, history, 6 years ago, In English

Given a graph with n nodes and at most n^2 edges.

Each vertex contains some people residing in it initially.

Each vertex has a capacity to withstand total number of people who have visited it the whole time. When people go from a vertex A to B (they need not travel in groups) you can suppose that they have visited A and not B (the capacity of B doesn't decrease).
This means if there are 8 people on vertex x and it has capacity of 4 then no more than 4 people can go from vertex x to anywhere else. How many vertices are such that all people can visit it without breaking the constraints above?

I am looking for something better or around O(N^4).

Full text and comments »

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

By notking, history, 6 years ago, In English

How can I solve the maximum flow problem when the capacity is not on the edge but only on the vertices? There are no multiple edges. Can I remove capacity from vertices and for each edge put its capacity equal to the minimum of capacities of 2 vertices it connects and then apply the maximum flow algorithm? Will this work?

Full text and comments »

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

By notking, history, 6 years ago, In English

Did anyone from India ordered/recieved t-shirt from Codefights? Please tell in comments.

Full text and comments »

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

By notking, history, 6 years ago, In English

Did anyone from India ordered/recieved t-shirt from Codefights? Please tell in comments.

Full text and comments »

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

By notking, history, 6 years ago, In English

There were several posts of Topcoder SRM stating rewards for all the participants. There was also a 5$ prize. Did anyone even recieve it? How and where can I redeem it ? SRM 723 is one example where rewards were given.

Full text and comments »

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

By notking, history, 6 years ago, In English

How many hours do top coders like high reds sleep? I think amount of my hard work is limited to my sleep as I have to sleep 8 hrs atleast.

Full text and comments »

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

By notking, history, 6 years ago, In English

Like I want to practice Div2C today where can I go? There is no provision for it on codeforces but yes we got a2oj so there i can practice the Div2C. What if i want to practice problems with tag "dfs and similar" of codeforces? I got the tag feature in the problem set.

What If I want to practice Div2C problems containing the tag "constructive algorithm" of codeforces? Does anybody know how to have a list of those problems?

Full text and comments »

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

By notking, history, 6 years ago, In English

Can you all please share DP problems on different judges which have difficulty similar to these DP Problems.

If you don't have time to see them above here are some: P1 P2 P3 P4 P5 P6

Thank you very much

Full text and comments »

Tags dp, help
  • Vote: I like it
  • 0
  • Vote: I do not like it

By notking, history, 7 years ago, In English
  • Vote: I like it
  • -8
  • Vote: I do not like it

By notking, history, 7 years ago, In English

I am thinking of "reading" codes rather than solving problem for some time. Like I read Div2 D,E problem and then see the solution,understand it and then code it myself and solve it. Like this I can do for 2-3 months doing around 10 problems per day so I will learn most of the skills,optimization,hints,etc. After that I solve problems and participate in contest then I can use my previous memories and try to relate to certain things.

Will that work and what level can I reach with this type of training ?

Full text and comments »

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

By notking, history, 7 years ago, In English

Which laptop is best for programmer under 60-70k rupees(india) and no gaming? 1TB HDD is good or 256GB SSD? I atleast want 8gb ram, 7-10hrs battery life,15inch or greater screen

Full text and comments »

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