you give 0indexed array n integer difference describe difference pair consecutive integer hide sequence length n 1 more formally hide sequence hide differencesi hiddeni 1 hiddeniyou give integer low upper describe inclusive range value lower upper hide sequence containfor example give difference 1 3 4 low 1 upper 6 hide sequence sequence length 4 element 1 6 inclusive3 4 1 5 4 5 2 6 possible hide sequences5 6 3 7 possible contain element great 61 2 3 4 possible difference correctreturn number possible hide sequence if possible sequence return 0 example 1input difference 134 low 1 upper 6output 2explanation the possible hide sequence 3 4 1 5 4 5 2 6thus return 2example 2input difference 34512 low 4 upper 5output 4explanation the possible hide sequence 3 0 4 1 2 0 2 1 3 2 3 1 1 2 2 3 4 2 0 3 1 4 5 3thus return 4example 3input difference 472 low 3 upper 6output 0explanation there possible hide sequence thus return 0 Constraintsn differenceslength1 n 105105 differencesi 105105 lower upper 105