#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long LL;
const int maxn = 100005;
LL gcd(LL a,LL b){
return b==0 ? a : gcd(b,a%b);
}
LL lcm(LL a,LL b){
return a*b/gcd(a,b);
}
struct node{
LL x,y;
node(LL x=0,LL y=0):x(x),y(y){}
bool operator < (const node& rhs) const{
return y < rhs.y;
}
};
const int N = 2050000;
int id[N];
node ans[N];
int main()......
阅读全文