摘要:
切排列 和第二场一样,映射 #include<iostream> using namespace std; const int N=200010; int n; int a[N];int mp[N];int b[N]; int main(){ int T;cin>>T; while (T--) { 阅读全文
摘要:
A. chmod 模拟 F. Try a try, AC is OK gi&gj<=gi gi&gj<=gj 可以都交最大的,任意gi&gj<=gi<=gmax M. Window Decoration 观察菱形周围从近到远的点,发现只有以四个点为中心的会相交, 加进来稳定增加2,相交就减少 先要去 阅读全文
摘要:
A. Kamilka and the Sheep 不妨设x<=y,两个数gcd小于这两个数 gcd(x+d,y+d)<=x+d<=y+d是我们常常知道的 也<=y-x x+d=k1(y-x) y+d=k2(y-x) y-x=(k2-k1)(y-x) 只要k2-k1=1,就可以任意d 所以可达y-x 阅读全文
摘要:
A. Treasure Hunt mod(x+y)下,如果是在前一半就是A挖的,否则就是B B. Pushing Balls 某个球可能从某一行或某一列推过来, 给每一行每一列从头哪些位置是能推到的,也就是说从头开始连续的1,置为1 #include<iostream> using namespac 阅读全文
摘要:
A. Dora's Set C. Dora and C++ #include<iostream> using namespace std; #include<vector> #include<algorithm> #define ll long long const int N=100010; ll 阅读全文
摘要:
A. Bus to Pénjamo #include<iostream> using namespace std; #include<algorithm> int a[110]; int n,r; int main(){ int T;cin>>T; while(T--){ cin>>n>>r; fo 阅读全文
摘要:
A. Find K Distinct Points with Fixed Center 简单构造 B. Minimize Equal Sum Subarrays 开始想正序倒序 看出来错一位就每个区间都严格比上面大 C. Perform Operations to Maximize Score 相当 阅读全文