Draw 题目背景 SOURCE:NOIP2016-RZZ-4 T3 题目描述 给定笛卡尔坐标系上 n 个不重复的点. 定义一个 L 形为: 一个形如 (x,y),(x+1,y)-(x+a,y),(x,y+1)-(x,y+b) 的点集. 并且满足 a,b≥1 且 gcd(a,b)=1. 求有多少个集合的二元组 (A,B) 满足 A 和 B 都是 L 形,且 A 和 B 没有交,即A∩B=φ.其中 A 和 B 是两个集合,A 和 B可以相等., 当 A≠B 时,我们将 (A,B) 和 (B,A)
T1 打表出奇迹,发现结论为\(E(a_n)=n+1\)即可. #include <iostream> #include <cstdio> #include <cctype> #include <cstring> using namespace std; int n,Q; long long rd() { long long x=0,f=1;char ch=getchar(); while(!isdigit(ch)) {if(ch=='-') f=-1;ch