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
相關文章
相關標籤/搜索