摘要: 水题,找一下规律可以发现,两堆石子差小于等于 1 时就是 Brown 胜利,不然就是 Alice。 #include <iostream> #include <cmath> using namespace std; int main() { long long n, m; cin >> n >> m 阅读全文
posted @ 2021-09-05 13:23 HappyBobb 阅读(8) 评论(0) 推荐(0)
摘要: 本题可以很明显看出应该是二分题目,如果需要二分答案,需要满足: 答案具有单调性,也就是说确定一个中央,中央左边不符合答案,右边符合,或者反过来。 假设二分答案验证阶段的复杂度是 O(m),总共的答案有 n 种选择,则二分答案的复杂度为 O(logn m)\large \text{O}(log_n \ 阅读全文
posted @ 2021-09-05 13:17 HappyBobb 阅读(14) 评论(0) 推荐(0)