围棋机器人最短路径问题 - C++ 实现
#include
int main() { int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2;
int dx = abs(x2 - x1);
int dy = abs(y2 - y1);
int ans = dx + dy;
cout << ans << endl;
return 0;
}
原文地址: https://www.cveoy.top/t/topic/bPCB 著作权归作者所有。请勿转载和采集!