# Can I use machine learning to find similar and longer continuous time-series?

I have data which contains access duration of some items.

Example:
t0~t5 is the access time duration, 1 means the items was accessed in the time duration, 0 means it wasn't.

ID,t0,t1,t2,t3,t4
0,0,0,1,1,1
1,0,1,1,1,1
2,0,1,1,0,0
3,1,1,0,0,1
4,1,1,0,0,1


Objective: Find sets which are all 1 for a continuous duration as longer as possible.

I can set the minimum continuous length len=2.

If len==2, what I want is groups ID=0,1

ID=3,4 aren't because their len is 2 but ID=0,1 are more continuous than them.

For clustering:

I tried KMeans and DBSCAN, they all cluster ID=3,4` as one group and it makes sense. But it doesn't do what I want.

For regression:

Although I can predict which ID will be access, I still find the longer continuous time-series.

For classification:

I don't have label it to identify which ID will be what I want.

I try above algorithm but didn't figure out, I thought possible way is pre-processing before clustering and find out after clustering.

Is there any possible pre-processing of data to reach what I want ? Or any ways to help me?