What is wrong with this approach?

Revision en1, by strange14, 2021-11-15 15:32:43

The problem is 1557B - Moamen и k-подотрезки. Here is my submission : 135732613

I am using two pointers to greedily count the already sorted sub-arrays of maximum length, and checking if it's less than k, in which case it should return YES otherwise NO.

Also, just wanted to express my gratitude for this platform where you people never hesitate to help noobs like me!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English strange14 2021-11-15 15:32:43 407 Initial revision (published)