摘要:
题目传送门 div4。。基本上都是构造题,水一波题解 A. Sum of Round Numbers 就把每一位拆出来 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a, b) f 阅读全文
摘要:
题目传送门 A. Puzzle Pieces 能否将题目所给拼图拼成n*m大小。 能拼的规格只有1*x,x*1,2*2。 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a, b) 阅读全文
摘要:
题目传送门 A. Phoenix and Balance 将21,22,...,2n分成数量相等的两堆,使两堆和的差值最小 数据也不大,挺简单的 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define r 阅读全文
摘要:
题目传送门 A. Road To Zero 两个数,将其中一个增加或减少1的代价为a,同时增加或减少1的代价为b,求将两个数同时变为0的最小代价。 当一个数为0或者两个数异号时,最优为只执行代价为a的操作,当两个数同号时,要考虑b与a*2的大小。 #include <bits/stdc++.h> u 阅读全文
摘要:
题目传送门 A. Nastya and Rice 判断一下[n*(a-b),n*(a+b)]和[c-d,c+d]两个区间有没有相交 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a 阅读全文