Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • \$\begingroup\$ Question about when its a contiguous subarray. length ≥ 5 a phase if at least 85% of the bits are the same Lets say we have a length 5 like 1 1 0 1 1 85% of 5 is 4.25 which is So length 5 would be impossible or should we round that down to 4? \$\endgroup\$ Commented Jan 8, 2015 at 11:43
  • \$\begingroup\$ @TeunPronk It means that length 5 is impossible unless all the bits are the same \$\endgroup\$ Commented Jan 8, 2015 at 11:46
  • \$\begingroup\$ I was about to edit my comment to add that to it, so no rounding down it is :) \$\endgroup\$ Commented Jan 8, 2015 at 11:47
  • \$\begingroup\$ So are you meant to find as many subarrays as possible or find arrays as big as possible? because I find more than 1 in testcase 5 (not by code but by looking) \$\endgroup\$ Commented Jan 8, 2015 at 11:58
  • \$\begingroup\$ @TeunPronk you are to find as many as possible which are not entirely contained in bigger ones. There's only one such array for the 5th test case, starting at the first 0 and ending at the last one. \$\endgroup\$ Commented Jan 8, 2015 at 12:02