\(6.14\ YZBOI\)模拟赛\(solution\) 本来不想写题解来着...毕竟是自己找的题还是写一写吧 上午为了整活,就把赛制改成\(IOI\)赛制了,于是乎拯救了大家的\(70pts\)代码. 三道巨水的题...\(bz\)迅速就\(AK\)了... \(T1\ Delta\) 比较直观的想,肯定是找一个少的的完全图划分了,又发现平方具有传递性,就变成维护联通块了 #include<bits/stdc++.h> #define int long long #define MAXN…
Alice, a student of grade 6, is thinking about an Olympian Math problem, but she feels so despair that she cries. And her classmate, Bob, has no idea about the problem. Thus he wants you to help him. The problem is: We denote k!: k! = 1 × 2 × ⋯ × (k…
小Y喜欢研究数论,并且喜欢提一些奇怪的问题.这天他找了三个两两互质的数a, b, c,以及另一个数m, 现在他希望找到三个(0, m)范围内的整数x, y, z,使得 (xa+yb) Mod m=(zc) Mod m Input 第一行一个数代表数据组数T 接下来T行每行四个整数m, a, b, c 满足a, b, c两两互质 1 <= T <= 100000 1 <= a, b, c <= 10^9 3 <= m <= 10^9 Output 对于每组数据,如果不存在…