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.
This is such a needlessly confusing problem. Here are some corrections/clarifications for those that might be confused:
any two consecutive stones' numbers differ by one of two values
This part is very misleading. "Differ" makes it sound like the values can either increase or decrease from one stone to the next, but they only increase.
int n: the number of non-zero stones
This is just completely wrong. Actually, n is the total number of stones, including the zero stone.
The first line contains an integer T, the number of test cases.
Take special note of this. The input format is very confusing because each test case can actually be multiple test cases.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Manasa and Stones
You are viewing a single comment's thread. Return to all comments →
This is such a needlessly confusing problem. Here are some corrections/clarifications for those that might be confused:
This part is very misleading. "Differ" makes it sound like the values can either increase or decrease from one stone to the next, but they only increase.
This is just completely wrong. Actually, n is the total number of stones, including the zero stone.
Take special note of this. The input format is very confusing because each test case can actually be multiple test cases.