2k2 分钟

114514 首先固定的起始坐标,然后找的个数,存到中,两遍前缀和。 接着就是找和了,不妨设的起始坐标为,则的长度为,注意。 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi =
1.8k2 分钟

模拟,:) #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln =
1.6k1 分钟

和式变换,数学—–:) 先筛欧拉函数,然后枚举因子 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; con
2.7k2 分钟

搞半天是NTT写挂了,变量写错了。。 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const doub
2.3k2 分钟

只想到了二分图的做法 #include <bits/stdc++.h> /* #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/hash_policy.hpp> */ using namespace std; const double eps = 1e-10; const double pi = 3.1415926535897932384626433832795; const double eln &