Masala #CWSV9JA1Y1
LST
Sizga \(n\) uzunlikdagi \(LST\) massivi beriladi.Siz shunday k sonini topishingiz kerakki, bunda LST[0] | LST[1] | LST[2] ....|LST[k] va LST[k+1]^LST[k+2]^.....^LST[n-1] larning yig'indisi maksimal bo'lsin.
Kiruvchi ma'lumotlar:
Sizga birinchi qatorda \(n (2≤n≤2*10^5) \)
Ikkinchi qatorda \(a[i] (0≤i≤n-1) \)kiritiladi va \((0≤a[i]≤10^9.)\)
Chiquvchi ma'lumotlar:
Masala javobini chop eting.
Misollar
# | input.txt | output.txt |
---|---|---|
1 |
6 1 5 2 4 1 8 |
2 |
2 |
1 10 |
-1 |
Izoh:
Muallif : Abdulxay Orifov