Kattis - Mega Inversions

Author: Benjamin Qi

Table of Contents


Edit on Github

For each , compute number of and independently.

1#include <bits/stdc++.h>
2#include <ext/pb_ds/tree_policy.hpp>
3#include <ext/pb_ds/assoc_container.hpp>
4
5using namespace std;
6using namespace __gnu_pbds;
7
8typedef long long ll;
9typedef vector<int> vi;
10typedef pair<int, int> pii;

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!

Give Us Feedback on Kattis - Mega Inversions!