摘要: 这道题的数据范围比较突出: 1<=N<=1e9 先写一个O(N)算法: #include <iostream> #include <stdio.h> #include <algorithm> #include <cstring> #define int long long using namespa 阅读全文
posted @ 2023-12-06 22:14 Gold_stein 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 算出两个数字的坐标,然后返回曼哈顿距离。 #include <iostream> #include <stdio.h> #include <algorithm> #include <cstring> #include <cmath> using namespace std; int w, m, n, 阅读全文
posted @ 2023-12-06 11:02 Gold_stein 阅读(11) 评论(0) 推荐(0) 编辑