hac.cpp: In function 'int main()':
hac.cpp:2:162: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
2 | using namespace std; signed main() {ios_base::sync_with_stdio(false); cin.tie(nullptr);int n; cin >> n;int half=((n+1)/2);vector<int> v(n*2,0);for (int i = 0; i < v.size(); i++) {if(i<n) {cin >> v[i];v[i+n]=v[i];}v[i]+=v[i-1];}deque<int> queue;for (int i = 0; i < half; i++){while(!queue.empty()&&v[queue.back()+half-1]-v[queue.back()-1]>(v[i+half-1]-v[i-1])) queue.pop_back();queue.push_back(i);}int outp=v[queue.front()+half-1]-v[queue.front()-1];for (int i = half; i < (n*2)-half; i++){if(!queue.empty()&&queue.front()==i-half) queue.pop_front();while(!queue.empty()&&v[queue.back()+half-1]-v[queue.back()-1]>(v[i+half-1]-v[i-1])) queue.pop_back();queue.push_back(i);outp=max(v[queue.front()+half-1]-v[queue.front()-1], outp);}cout << outp;return 0;}
| ~~^~~~~~~~~~