백준 15686 치킨배달 c++
//15686 #include #include #include #include #include using namespace std; int N, M; int arr[51][51]; int ans; vector v; vector house; void calclulate(vector &chicken){ int total = 0; for (int i = 0;i < house.size();i++) { int val = 987654321; for (int j = 0;j < chicken.size();j++) { val = min(val, abs(chicken[j].first - house[i].first) + abs(chicken[j].second - house[i].second)); } total += val;..
2023.07.27