Description Byteasar the Cryptographer works on breaking the code of BSA (Byteotian Security Agency). He has alreadyfound out that whilst deciphering a message he will have to answer multiple queries of the form"for givenintegers $a$, $b$ and $d$, fi…
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=1109 [算法] DP [代码] #include<bits/stdc++.h> using namespace std; #define MAXN 100010 struct info { int x,y; } b[MAXN]; int i,n,m,cnt,pos; int a[MAXN],q[MAXN]; inline bool cmp(info a,info b) { ret…