Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- pair <int, pair <int, int> > combine(int v){
- pair <int, pair <int, int> > val;
- val.first = t[v << 1].first + t[(v << 1) | 1].first;
- int cnt = min(t[v << 1].second.first, t[(v << 1) | 1].second.second);
- val.first += cnt * 2;
- val.second.first = t[v << 1].second.first +
- t[(v << 1) | 1].second.first - cnt;
- val.second.second = t[v << 1].second.second +
- t[(v << 1) | 1].second.second - cnt;
- return val;
- }
- int main() {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment