摘要:
A. Find K Distinct Points with Fixed Center 简单构造 B. Minimize Equal Sum Subarrays 开始想正序倒序 看出来错一位就每个区间都严格比上面大 C. Perform Operations to Maximize Score 相当 阅读全文
摘要:
D. I Love 1543 积累网格方法 一圈,L,R,D,U 要把n-1个加上,substr #include<iostream> using namespace std; const int N=1010; int n,m; int a[N][N]; int main(){ int T;cin 阅读全文
摘要:
C. Superultra's Favorite Permutation 打表出构造 #include<iostream> using namespace std; int n; /** * #include<iostream> using namespace std; int n; int a[1 阅读全文
摘要:
A 数据结构 B 鸽巢原理,特殊情况一个小时才看出来 D https://ac.nowcoder.com/acm/problem/272306 公约数为z,那就a=cz,b=dz,(c,d)=1 如果让d=1,就不用考虑互质 z(c-1)>=x z(c+1)>=y 取大即可 #include<ios 阅读全文