Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <bits/stdc++.h>using namespace std;#define INF 2139062143#define LINF 9187201950435737471#define mem(a,v) memset(a,v,sizeof(a))#define maxn 2010#define rep(i, a, b) for (int i = (a); i <= (b); ++i)#define red(i, a, b) for (int i = (a); i >= (b); --i)#define pb push_back#define eps 1e-7#define ll long long#define max(a,b) (a>b?a:b)#define min(a,b) (a<b?a:b)typedef pair<int, int> pp;ll c[maxn][maxn];vector<pp> s[maxn];int main() {// ios::sync_with_stdio(false);cout.setf(ios::fixed);cout.precision(20);#ifdef LOCALfreopen("/Users/huangqingwei/Documents/C++ workspace/codeforces/input.txt", "r", stdin);// freopen("input.txt", "r",stdin);// freopen("output.txt", "w",stdout);#endifint n,p,q;mem(c,0);scanf("%d%d%d",&n,&p,&q);rep(i,1,p){