思路:
维护一个单减的序列 序号是单增的 每回二分查找第一个比询问的大的值 我手懒 用得lower_bound//By SiriusRen#include#include using namespace std;#define int long longint m,mod,top,jy,ans,tot;char ch[3];struct Node{ int pos,weight;}node[200050],t;bool operator < (Node a,Node b){ return a.pos weight; printf("%lld\n",ans); } }}