#include<bits/stdc++.h> using namespace std; struct pe { int l,r; }a[1005]; int n,pai[10005],ans[10005],tmp[10005]; bool cmp(pe c,pe d) { return c.l*c.r<d.l*d.r; } void mul(int x) { ...