360 2019校招笔试 编程题-2018.08.27

思路: 题目要求城市是平行于坐标轴的正方形,咱们只须要求出最大的横坐标差和最大的纵坐标轴之差,取较大值做为正方形城市边长便可ios 代码:web #include <iostream> #include <cmath> using namespace std; int main() { int n; cin >> n; int xmax=0, xmin=1e9, ymax
相关文章
相关标签/搜索