모든 좌표 쌍의 맨해튼 거리의 합을 효율적으로 구하는 방법

1. 문제 21203번: Distance (acmicpc.net) 21203번: Distance The City of Manhattan is organized as a grid of streets and avenues, with streets running in the North-South direction and avenues running in the East-West direction. Streets are numbered from East to West starting from 1, and avenues are numbered from N www.acmicpc.net 2. 풀이 n 제한이 20만이라 모든 좌표쌍 일일이 정해서 거리를 구해보는 방법으로는 어림도 없다 https://www.geeksf..