Can [this problem](http://mirror.codeforces.com/contest/220/problem/B) problem be solved using segment tree. If yes can anyone can tell how to build Seg tree.↵
↵
During combining two segments how do i check for mid and (mid+1)th element in merged segement.↵
↵
↵
During combining two segments how do i check for mid and (mid+1)th element in merged segement.↵
↵