SPOJ Maximum Sum
//I am struggling //Just Not Good at it // Accepted //I am struggling //Just Not Good at it #include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false) #define bfast cin.tie(0) #define outs(x) cout << x << " " #define outn(x) cout << x << "\n" #define sf scanf #define pf printf #define nl puts("") #define psb push_back typedef long long LL; typedef vector<int>vii; typedef vector<LL>vll; const int mod = 1000007; const int high = 100010; const int inf = 1 << 30; int ar[high]; struct info { LL pos, maxi; }tree[high * 4] , base; void update(int node, int b , int e , int i , LL x) { if(i>e or i<b) return; if(b == e) { tree[node].maxi = x; tree[node].pos = i; return; } int ...