What does this question mean (manhattan distance)? [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
-6
down vote
favorite
Given N points in K dimensional space, determine the point such that sum of Manhattan distances from this point to the N points is minimized?
Output:
For each testcase, output in a single line containing K space separated integers denoting the required point in K dimensional space. If there are multiple possible answers, print the lexicographically smallest point.
Constraints
$1≤T≤5$
$2≤N≤10^5$
$1≤K≤5$
All co-ordinates are in the range $[−10^9,10^9]$
Subtasks
30 points : $1≤N≤100$
70 points : original contraints
Sample Input
1
3 3
1 1 1
2 2 2
3 3 3
Sample Output:
2 2 2
EXPLANATION:
The total cost at (2,2,2) is 6 and this is optimal.
How to minimize manhattan distance in k dimentions ?
geometry
closed as unclear what you're asking by Taroccoesbrocco, John B, Jyrki Lahtonen, John Ma, Holo Jul 28 at 20:07
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
locked by Jack D'Aurizio♦ Jul 29 at 20:16
This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.
comments disabled on deleted / locked posts / reviews |Â
up vote
-6
down vote
favorite
Given N points in K dimensional space, determine the point such that sum of Manhattan distances from this point to the N points is minimized?
Output:
For each testcase, output in a single line containing K space separated integers denoting the required point in K dimensional space. If there are multiple possible answers, print the lexicographically smallest point.
Constraints
$1≤T≤5$
$2≤N≤10^5$
$1≤K≤5$
All co-ordinates are in the range $[−10^9,10^9]$
Subtasks
30 points : $1≤N≤100$
70 points : original contraints
Sample Input
1
3 3
1 1 1
2 2 2
3 3 3
Sample Output:
2 2 2
EXPLANATION:
The total cost at (2,2,2) is 6 and this is optimal.
How to minimize manhattan distance in k dimentions ?
geometry
closed as unclear what you're asking by Taroccoesbrocco, John B, Jyrki Lahtonen, John Ma, Holo Jul 28 at 20:07
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
locked by Jack D'Aurizio♦ Jul 29 at 20:16
This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.
1
Dear Dank, welcome to MSE! Two things: first of all this is not a place where to ask for solving exercises. You are supposed to ask questions if something is not clear or at least provide your attempts if you need hints. Secondly, your problem doesn't seem to fit the MSE content. Please have a look here
– Ender Wiggins
Jul 28 at 8:28
This question has been put on-hold as a cheating attempt - codechef.com/LOCJUL18/problems/CLPOINT
– Jack D'Aurizio♦
Jul 29 at 20:16
comments disabled on deleted / locked posts / reviews |Â
up vote
-6
down vote
favorite
up vote
-6
down vote
favorite
Given N points in K dimensional space, determine the point such that sum of Manhattan distances from this point to the N points is minimized?
Output:
For each testcase, output in a single line containing K space separated integers denoting the required point in K dimensional space. If there are multiple possible answers, print the lexicographically smallest point.
Constraints
$1≤T≤5$
$2≤N≤10^5$
$1≤K≤5$
All co-ordinates are in the range $[−10^9,10^9]$
Subtasks
30 points : $1≤N≤100$
70 points : original contraints
Sample Input
1
3 3
1 1 1
2 2 2
3 3 3
Sample Output:
2 2 2
EXPLANATION:
The total cost at (2,2,2) is 6 and this is optimal.
How to minimize manhattan distance in k dimentions ?
geometry
Given N points in K dimensional space, determine the point such that sum of Manhattan distances from this point to the N points is minimized?
Output:
For each testcase, output in a single line containing K space separated integers denoting the required point in K dimensional space. If there are multiple possible answers, print the lexicographically smallest point.
Constraints
$1≤T≤5$
$2≤N≤10^5$
$1≤K≤5$
All co-ordinates are in the range $[−10^9,10^9]$
Subtasks
30 points : $1≤N≤100$
70 points : original contraints
Sample Input
1
3 3
1 1 1
2 2 2
3 3 3
Sample Output:
2 2 2
EXPLANATION:
The total cost at (2,2,2) is 6 and this is optimal.
How to minimize manhattan distance in k dimentions ?
geometry
asked Jul 28 at 7:49


dank uploader
13
13
closed as unclear what you're asking by Taroccoesbrocco, John B, Jyrki Lahtonen, John Ma, Holo Jul 28 at 20:07
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
locked by Jack D'Aurizio♦ Jul 29 at 20:16
This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.
closed as unclear what you're asking by Taroccoesbrocco, John B, Jyrki Lahtonen, John Ma, Holo Jul 28 at 20:07
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
locked by Jack D'Aurizio♦ Jul 29 at 20:16
This question is locked in view of our policy about contest questions. Questions originating from active contests are locked for the duration of the contest, with answers hidden from view by soft-deletion. Please see the comments below for references to the originating contest.
1
Dear Dank, welcome to MSE! Two things: first of all this is not a place where to ask for solving exercises. You are supposed to ask questions if something is not clear or at least provide your attempts if you need hints. Secondly, your problem doesn't seem to fit the MSE content. Please have a look here
– Ender Wiggins
Jul 28 at 8:28
This question has been put on-hold as a cheating attempt - codechef.com/LOCJUL18/problems/CLPOINT
– Jack D'Aurizio♦
Jul 29 at 20:16
comments disabled on deleted / locked posts / reviews |Â
1
Dear Dank, welcome to MSE! Two things: first of all this is not a place where to ask for solving exercises. You are supposed to ask questions if something is not clear or at least provide your attempts if you need hints. Secondly, your problem doesn't seem to fit the MSE content. Please have a look here
– Ender Wiggins
Jul 28 at 8:28
This question has been put on-hold as a cheating attempt - codechef.com/LOCJUL18/problems/CLPOINT
– Jack D'Aurizio♦
Jul 29 at 20:16
1
1
Dear Dank, welcome to MSE! Two things: first of all this is not a place where to ask for solving exercises. You are supposed to ask questions if something is not clear or at least provide your attempts if you need hints. Secondly, your problem doesn't seem to fit the MSE content. Please have a look here
– Ender Wiggins
Jul 28 at 8:28
Dear Dank, welcome to MSE! Two things: first of all this is not a place where to ask for solving exercises. You are supposed to ask questions if something is not clear or at least provide your attempts if you need hints. Secondly, your problem doesn't seem to fit the MSE content. Please have a look here
– Ender Wiggins
Jul 28 at 8:28
This question has been put on-hold as a cheating attempt - codechef.com/LOCJUL18/problems/CLPOINT
– Jack D'Aurizio♦
Jul 29 at 20:16
This question has been put on-hold as a cheating attempt - codechef.com/LOCJUL18/problems/CLPOINT
– Jack D'Aurizio♦
Jul 29 at 20:16
comments disabled on deleted / locked posts / reviews |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
1
Dear Dank, welcome to MSE! Two things: first of all this is not a place where to ask for solving exercises. You are supposed to ask questions if something is not clear or at least provide your attempts if you need hints. Secondly, your problem doesn't seem to fit the MSE content. Please have a look here
– Ender Wiggins
Jul 28 at 8:28
This question has been put on-hold as a cheating attempt - codechef.com/LOCJUL18/problems/CLPOINT
– Jack D'Aurizio♦
Jul 29 at 20:16