My issue
Show me failed test cases
Solution Failed on following Input
1
10 20 9 20
Your Output
1
Expected Output
29
My code
#include <stdio.h>
#include <stdlib.h>
int main() {
int t;
scanf("%d", &t);
for (int i = 0; i < t; i++) {
int X1, Y1, X2, Y2;
scanf("%d %d %d %d", &X1, &Y1, &X2, &Y2);
int distance = abs(X1 - X2) + abs(Y1 - Y2);
printf("%d\n", distance);
}
return 0;
}
Learning course: Algorithmic Problem Solving
Problem Link: https://www.codechef.com/learn/course/klh-problem-solving/KLHPS2414/problems/CSCP04A