Codeforces Round 875
https://codeforces.com/contest/1830
B - The BOSS Can Count Pairs
长度n数组 a,b
计算多少对 i < j 满足 ai * aj = bi + bj
t 1e4
sum n 2e5
ai,bi [1,n]
4s
512mb
我的思路
加的范围保证了 <= 2n
所以 对于同样的a 直接整合
然后 2n (1+1/2+1/3+…), 所以真的枚举的 乘法对是满足范围的
然后对于具体的 v0=ai,v1=aj
那么对应 bi/bj 是两个集合, 或者map[b]=count
每次选小的 去大的里面搜, 这复杂度不知道多少, 过了pretest,被hack tle了