GauravPawarR's blog

By GauravPawarR, history, 10 months ago, In English

Hey! I was solving 2117C - Cool Partition and I find this peculiar thing in the testcase. It expects us to partition an array into segments such that every segment has same elements as first segment sort of. 4 ========== 1 2 1 1 ==========****

for this tc. I believe answer should be three as:

[1], [2, 1], [1] but answer is 2. Why?

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

»
10 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by GauravPawarR (previous revision, new revision, compare).

»
10 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

you don't have 2 in the next segment, so you can't divide like that