摘要:
Problem A - Determinant 按题意来进行直接计算 时间复杂度:\(\mathcal{O}(1)\) int main() { ios_base::sync_with_stdio(false), cin.tie(0); int a, b, c, d; cin >> a >> b > 阅读全文
摘要:
A - ABC Preparation 排序找出最小值 int main() { ios_base::sync_with_stdio(false), cin.tie(0); vector<int> a(4); for (auto &i : a) cin >> i; sort(a.begin(), a 阅读全文
摘要:
A - Large Digits 按要求求出两个数的每位之和,进行比较即可。 时间复杂度 \(\mathcal{O}(\log(AB))\)。 B - Gentle Pairs 枚举所有点对求斜率。 时间复杂度 \(\mathcal{O}(N^2)\)。 int main() { ios_base: 阅读全文
摘要:
AtCoder Beginner Contest 188 A,B很简单就不多说 C - ABC Tournament 找出前一半的最大值和后一半的最大值,二者中较小的那一个对应的序号就是最后的答案。 时间复杂度:\(\mathcal{O}(2^N)\) using ll = long long; i 阅读全文
摘要:
A - Difference Max 区间左端减去区间右端 int main() { ios_base::sync_with_stdio(false), cin.tie(0); int a, b, c, d; cin >> a >> b >> c >> d; cout << b - c << end 阅读全文