// Faulty solution to the Amsterdam Distance problem // By Boas Kluiving // // This solution uses a single for loop to iterate over all possible // Manhattan paths, but forgets to check for the largest halfcircle // // EXPECTED RESULT: WRONG ANSWER #include #include #include #include using namespace std; int main() { int m, n, ax, ay, bx, by; double r; cin >> m >> n >> r; cin >> ax >> ay >> bx >> by; double ySegSize = r / n; int xDifference = abs(ax - bx); double min_distance = 99999999; // i should range from 0 to n+1, instead of n for(int i=0; i