We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
New Year Present
New Year Present
Sort by
recency
|
12 Discussions
|
Please Login in order to post a comment
Anyone else think the constraints are too tight? Test case 5 TLEs without pruning .
My solution is careful counting, no DP needed: Link
Here is my solution in java, Python, C, C++ HackerRank New Year Present Problem Solution
Here is New year present problem solution - https://programs.programmingoneonone.com/2021/07/hackerrank-new-year-present-problem-solution.html
"Nina received an odd New Year's present from a student: a set of unbreakable sticks. Each stick has a length, l, and the length of the ith stick is l[i-1]."
So... every stick is as long as the previous stick... which makes them all the same length. The answer to this problem is literally a constant 0, because 6 equal lines do not a square make.