2022年11月9日

每日一题-区间分组

摘要: 区间分组 sort(a.begin(), a.end()); priority_queue<int, vector<int>, greater<int>> q; for (int i = 0; i < n; ++i) { if (q.empty() or q.top() >= a[i].first) 阅读全文

posted @ 2022-11-09 21:52 Whosedream-0019 阅读(42) 评论(0) 推荐(0)

每日一题-叠罗汉的牛

摘要: 叠罗汉的牛 sort(a.begin(), a.end(), [](const auto &A, const auto &B) { return A.first + A.second < B.first + B.second; }); int sum = 0, ans = -2e9; for (in 阅读全文

posted @ 2022-11-09 21:49 Whosedream-0019 阅读(44) 评论(0) 推荐(0)

2022年1月23日

高精度四则运算

摘要: 大整数四则运算 高精度加法 #include <iostream> #include <vector> #include <string> using namespace std; const int N = 1e6 + 6; string a, b; vector<int> A, B; vecto 阅读全文

posted @ 2022-01-23 16:48 Whosedream-0019 阅读(62) 评论(0) 推荐(0)

导航