criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int n = scan.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		for(int i = 0; i < n; i++){
			x[i] = scan.nextInt();
		}
		for(int i = 0; i < n; i++){
			y[i] = scan.nextInt();
		}

		double d1 = 0;
		double sum2 = 0;
		double sum3 = 0;
		double dd = 0;
		for(int i = 0; i < n; i++){
			d1 += Math.abs(x[i] - y[i]);
			sum2 += Math.pow(Math.abs(x[i] - y[i], 2);
			sum3 += Math.pow(Math.abs(x[i] - y[i], 3);
			dd = Math.max(dd, Math.abs(x[i] - y[i]));
		}
		double d2 = Math.sqrt(sum2);
		double d3 = Math.cbrt(sum3);
		System.out.printf("%f\n", d1);
		System.out.printf("%f\n", d2);
		System.out.printf("%f\n", d3);
		System.out.printf("%f\n", dd);
	}
}

Compiler output:
Main.java:23: error: ')' or ',' expected
			sum2 += Math.pow(Math.abs(x[i] - y[i], 2);
			                                         ^
Main.java:24: error: ')' or ',' expected
			sum3 += Math.pow(Math.abs(x[i] - y[i], 3);
			                                         ^
2 errors
Language: Java

import java.io.*;

public class Main1{
	public static void main(String[] arsg) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		int count = Integer.parseInt(br.readLine());
		double[] x = new double[count];
		double[] y = new double[count];
		String[] strx = (br.readLine()).split(" ");
		String[] stry = (br.readLine()).split(" ");
		
		
		for(int i = 0;i<count;i++){
			x[i] = Integer.parseInt(strx[i]);
		}
		for(int i = 0;i<count;i++){
			y[i] = Integer.parseInt(stry[i]);
		}
		double sum = 0;
		for(int i = 0;i<count;i++){
			sum +=  Math.abs(x[i] - y[i]);
		}
		System.out.printf("%.6f\n",sum);
		sum = 0;
		for(int i = 0;i<count;i++){
			sum += Math.pow(x[i]-y[i],2);
		}
		System.out.printf("%.6f\n",Math.sqrt(sum));
		sum = 0;
		for(int i = 0;i<count;i++){
			sum += Math.pow(Math.abs(x[i]-y[i]),3);
		}
		double d = Math.cbrt(sum);
		System.out.printf("%.6f\n",d);
		sum = Math.abs(x[0]-y[0]);
		for(int i = 0;i<count;i++){
			sum = Math.max(sum,Math.abs(x[i]-y[i]));
		}
		System.out.printf("%.6f\n",sum);
		
	}
}

Compiler output:
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1{
       ^
1 error
Language: Java

public class Main{
	 private enum pType{
	    	p1(1),
	    	p2(2),
	    	p3(3),
	    	pInfinity(0);

		 	private int p;
		 	private pType(int p){
		 		this.p = p;
		 	}
		 	private int getPType(){
		 		return p;
		 	}
	    }

	public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        int[] x = convertStringToInt(br.readLine().split(" "));
        int[] y = convertStringToInt(br.readLine().split(" "));

        System.out.println(calcMD(x,y,pType.p1));
        System.out.println(calcMD(x,y,pType.p2));
        System.out.println(calcMD(x,y,pType.p3));
        System.out.println(calcMD(x,y,pType.pInfinity));
    }

	private static int[] convertStringToInt(String[] str){
		int[] list = new int[str.length];
		for(int i=0; i<str.length;i++){
			list[i] = Integer.parseInt(str[i]);
		}
		return list;
	}


    private static double calcMD(int[] x, int[] y,pType type){
    	double D=0;
    	if(type.equals(pType.pInfinity)){
    		for(int i=0;i<x.length;i++){
    			double d = Math.abs(x[i]-y[i]);
    			if(D<=d){
    				D=d;
    			}
    		}
    	}else{
    		double d=0;
    		for(int i=0;i<x.length;i++){
    			d += Math.pow(Math.abs(x[i] - y[i]), type.getPType());
    		}
    		//d = Math.sqrt(d);
			D  =Math.pow(d, (double)1/type.getPType());
    	}
    	return D;
    }
}

Compiler output:
Main.java:17: error: cannot find symbol
	public static void main(String[] args) throws IOException{
	                                              ^
  symbol:   class IOException
  location: class Main
Main.java:18: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:18: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:18: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Distance_tu_40 {

	public static void main(String[] args) throws IOException {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

		String first_line = input.readLine();

		// ??´??°n
		int num_n = Integer.parseInt(first_line);

		String secound_line = input.readLine();

		// 2???????????\???
		String[] vector_x_array = secound_line.split(" ");

		String third_line = input.readLine();

		// 3???????????\???
		String[] vector_y_array = third_line.split(" ");

		double p_first = 0;

		double p_secound_square = 0;

		double p_third_squar = 0;

		double p_secound = 0;
		
		double max=0;

		for (int array_spot = 0; array_spot < num_n; array_spot++) {

			double vector_x = Double.parseDouble(vector_x_array[array_spot]);

			double vector_y = Double.parseDouble(vector_y_array[array_spot]);

			
			
			double chebi=0;
			
			if (vector_x < vector_y) {

				double tum = vector_x;

				vector_x = vector_y;

				vector_y = tum;
			}

			chebi=vector_x - vector_y;
			
			p_first += vector_x - vector_y;
			
			if(max<chebi){
				
				max=chebi;
			}

			p_secound_square += Math.pow(vector_x - vector_y, 2);

			p_third_squar+=Math.pow(vector_x - vector_y, 3);
		}

		System.out.println(p_first);

		p_secound=Math.sqrt(p_secound_square);


		double p_third=Math.cbrt(p_third_squar);

		System.out.println(p_secound);

		System.out.println(p_third);
		
		System.out.println(max);

		
	}

}

Compiler output:
Main.java:5: error: class Distance_tu_40 is public, should be declared in a file named Distance_tu_40.java
public class Distance_tu_40 {
       ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		double[] x = new double[n];
		double[] y = new double[n];
		String[] line = new String[n];
		double dxyP1=0;
		double dxyP2=0;
		double dxyP3=0;
		double dxyP=0;
	//input x
		line=sc.nextLine().split(" ");
		for(int i=0;i<n;i++)){
			x[i]=Double.parseDouble(line[i]);
		}
	//input y	
		line=sc.nextLine().split(" ");
		for(int i=;i<n;i++){
			x[i]=Double.parseDouble(line[i]);
		}
	//dxy		
		for(int i=0;i<n;i++){
			dxyP1+=Math.abs(x[i]-y[i]);
			dxyP2+=dxyP1*dxyP1;
			dxyP3+=dxyP1*dxyP1*dxyP1;
			if(dxyP<dxyP1){
				dxyP=dxyP1;
			}
		}
		dxyP2=Math.sqrt(dxyP2);
		dxyP3=Math.cbrt(dxyP3);
	//output	
		System.out.printf("%.6f",dxyP1);
		System.out.println();
		System.out.printf("%.6f",dxyP2);
		System.out.println();
		System.out.printf("%.6f",dxyP3);
		System.out.println();
		System.out.printf("%.6f",dxyP);
		System.out.println();
	}
}

Compiler output:
Main.java:16: error: illegal start of expression
		for(int i=0;i<n;i++)){
		                    ^
Main.java:21: error: illegal start of expression
		for(int i=;i<n;i++){
		          ^
2 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());
		double[] x = new double[n];
		double[] y = new double[n];
		String[] line = new String[n];
		double dxyP1=0;
		double dxyP2=0;
		double dxyP3=0;
		double dxyP=0;
	//input x
		line=sc.nextLine().split(" ");
		for(int i=0;i<n;i++)){
			x[i]=Double.parseDouble(line[i]);
		}
	//input y	
		line=sc.nextLine().split(" ");
		for(int i=0;i<n;i++){
			x[i]=Double.parseDouble(line[i]);
		}
	//dxy		
		for(int i=0;i<n;i++){
			dxyP1+=Math.abs(x[i]-y[i]);
			dxyP2+=dxyP1*dxyP1;
			dxyP3+=dxyP1*dxyP1*dxyP1;
			if(dxyP<dxyP1){
				dxyP=dxyP1;
			}
		}
		dxyP2=Math.sqrt(dxyP2);
		dxyP3=Math.cbrt(dxyP3);
	//output	
		System.out.printf("%.6f",dxyP1);
		System.out.println();
		System.out.printf("%.6f",dxyP2);
		System.out.println();
		System.out.printf("%.6f",dxyP3);
		System.out.println();
		System.out.printf("%.6f",dxyP);
		System.out.println();
	}
}

Compiler output:
Main.java:16: error: illegal start of expression
		for(int i=0;i<n;i++)){
		                    ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.nextLine());//line-1
		double[] x = new double[n];
		double[] y = new double[n];
		String[] line = new String[n];
		double dxyP1=0;
		double dxyP2=0;
		double dxyP3=0;
		double dxyP=0;
	//input x
		line=sc.nextLine().split(" ");//line-2
		for(int i=0;i<n;i++){
			x[i]=Double.parseDouble(line[i]);
		}
	//input y	
		line=sc.nextLine().split(" ");//line-3
		for(int i=0;i<n;i++){
			y[i]=Double.parseDouble(line[i]);
		}
	//dxy		
		for(int i=0;i<n;i++){
			dxyP1+=Math.abs(x[i]-y[i]);
			dxyP2+=Math.abs(x[i]-y[i])*Math.abs(x[i]-y[i]);
			dxyP3+=Math.abs(x[i]-y[i])*Math.abs(x[i]-y[i])*Math.abs(x[i]-y[i])1;
			if(dxyP<Math.abs(x[i]-y[i])){
				dxyP=Math.abs(x[i]-y[i]);
			}
		}
		dxyP2=Math.sqrt(dxyP2);
		dxyP3=Math.cbrt(dxyP3);
	//output	
		System.out.printf("%.6f",dxyP1);
		System.out.println();
		System.out.printf("%.6f",dxyP2);
		System.out.println();
		System.out.printf("%.6f",dxyP3);
		System.out.println();
		System.out.printf("%.6f",dxyP);
		System.out.println();
	}
}

Compiler output:
Main.java:28: error: ';' expected
			dxyP3+=Math.abs(x[i]-y[i])*Math.abs(x[i]-y[i])*Math.abs(x[i]-y[i])1;
			                                                                  ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int[] xArray = new int[num];
        for(int i = 0; i < num; i++){
            xArray[i] = sc.nextInt();
        }
        int[] yArray = new int[num];
        for(int i = 0; i < num; i++){
            yArray[i] = sc.nextInt();
        }
        
        double[] p = new double[4];
        
        for(int i = 0; i < num; i++){
            double dif = Math.abs(xArray[i] - yArray[i]);
            p[0] += dif;
            p[1] += Math.pow(dif, 2);
            p[2] += Math.pow(dif, 3);
            p[3] = Math.max(p[3], dif);
            
        }
        p[1] = Math.sqrt(p2);
        p[2] = Math.cbrt(p3);
        
        for(double result: p){
            System.out.println(result);
        }
    }
}


Compiler output:
Main.java:26: error: cannot find symbol
        p[1] = Math.sqrt(p2);
                         ^
  symbol:   variable p2
  location: class Main
Main.java:27: error: cannot find symbol
        p[2] = Math.cbrt(p3);
                         ^
  symbol:   variable p3
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main1{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        double [] x = new double[n];
        double [] y = new double[n];
        for(int a = 0; a < n; a++){
            x[a] = scan.nextDouble();
        }
        for(int a = 0; a < n; a++){
            y[a] = scan.nextDouble();
        }
        System.out.printf("%.6f\n", distance(x,y,1,n));
        System.out.printf("%.6f\n", distance(x,y,2,n));
        System.out.printf("%.6f\n", distance(x,y,3,n));
        System.out.printf("%.6f\n", distance(x,y,4,n));
    }
    public static double distance(double x[], double y[], int p, int n){
        double answer = 0;
        if(p == 4){
            double max = 0;
            for (int a = 0; a < n; a++){
                if(Math.abs(x[a] - y[a]) > max){
                    max = Math.abs(x[a] - y[a]);
                }
            }
            answer = max;

        }
        else if(p == 3){
            for (int a = 0; a < n; a++){
                answer = answer + Math.pow(Math.abs(x[a] - y[a]), p);
            }
            answer = Math.cbrt(answer);
        }
        else if(p == 2){
            for (int a = 0; a < n; a++){
                answer = answer + Math.pow(Math.abs(x[a] - y[a]), p);
            }
            answer = Math.sqrt(answer);

        }
        else{
            for (int a = 0; a < n; a++){
                answer = answer + Math.pow(Math.abs(x[a] - y[a]), p);
            }
            answer = Math.pow(answer, (1/p));
        }
        return answer;
    }
}


Compiler output:
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1{
       ^
1 error
Language: Java

package icpc;

import java.util.Scanner;

public class icpc {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	
    	double x[] = new double[101];
    	double y[] = new double[101];
    	double p1=0,p2=0,p3=0,pm=0;
    	
    	double n = sc.nextDouble();
    	for(int i=0;i<n;i++) {
    		x[i]=sc.nextDouble();
    	}
    	for(int i=0;i<n;i++) {
    		y[i]=sc.nextDouble();
    	}
	    
    	for(int i=0;i<n;i++) {
    		p1 += Math.abs(x[i]-y[i]);
    		p2 += (x[i]-y[i])*(x[i]-y[i]);
    		p3 += Math.abs(x[i]-y[i])*(x[i]-y[i])*(x[i]-y[i]);
    		pm = Math.max(pm, Math.abs(x[i]-y[i]));
    	}
    	
    	System.out.printf("%.10f\n",p1);
    	System.out.printf("%.10f\n",Math.sqrt(p2));
    	System.out.printf("%.10f\n",Math.cbrt(p3));
    	System.out.printf("%.10f\n",pm);
    	
    }
}


Compiler output:
Main.java:5: error: class icpc is public, should be declared in a file named icpc.java
public class icpc {
       ^
1 error
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i,x[1000],y[1000],p;
 double d;
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%f",x[i]);
                  scanf("%f",y[i]);
                  }
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=(x[i]-y[i]);
                  pirnt("%f",d);
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(x[i]-y[i],2);
                  pirnt("%f",pow(d,0.5));
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(x[i]-y[i],3);
                  pirnt("%f",pow(d,1/3));
                  }
 //p=∞
 d=x[n]-y[n];
 pirnt("%f",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:17:19: error: implicit declaration of function 'pirnt' [-Wimplicit-function-declaration]
   17 |                   pirnt("%f",d);
      |                   ^~~~~
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i,x[1000],y[1000],p;
 double d;
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%f",x[i]);
                  scanf("%f",y[i]);
                  }
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=(x[i]-y[i]);
                  pirntf("%f",d);
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(x[i]-y[i],2);
                  pirntf("%f",pow(d,0.5));
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(x[i]-y[i],3);
                  pirntf("%f",pow(d,1/3));
                  }
 //p=∞
 d=x[n]-y[n];
 pirntf("%f",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:17:19: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |                   pirntf("%f",d);
      |                   ^~~~~~
      |                   printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i,x[1000],y[1000],p;
 double d;
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%f",x[i]);
                  scanf("%f",y[i]);
                  }
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=(x[i]-y[i]);
                  pirntf("%f\n",d);
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(x[i]-y[i],2);
                  pirntf("%f\n",pow(d,0.5));
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(x[i]-y[i],3);
                  pirntf("%f\n",pow(d,1/3));
                  }
 //p=∞
 d=x[n]-y[n];
 pirntf("%f\n",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:17:19: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |                   pirntf("%f\n",d);
      |                   ^~~~~~
      |                   printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i,x[1000],y[1000],p,s[1000];
 double d,max;
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%f",x[i]);
                  scanf("%f",y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=s[i];
                  pirntf("%f\n",d);
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],2);
                  pirntf("%f\n",pow(d,0.5));
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],3);
                  pirntf("%f\n",pow(d,1/3));
                  }
 //p=∞
 if(s[i]>max) max=s[i];
 pirntf("%f\n",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:19: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |                   pirntf("%f\n",d);
      |                   ^~~~~~
      |                   printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%f",x[i]);
                  scanf("%f",y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=s[i];
                  pirntf("%f\n",d);
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],2);
                  pirntf("%f\n",pow(d,0.5));
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],3);
                  pirntf("%f\n",pow(d,1/3));
                  }
 //p=∞
 if(s[i]>max) max=s[i];
 pirntf("%f\n",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:19: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |                   pirntf("%f\n",d);
      |                   ^~~~~~
      |                   printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",x[i]);
                  scanf("%lf",y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=s[i];
                  pirntf("%lf\n",d);
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],2);
                  pirntf("%lf\n",pow(d,0.5));
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],3);
                  pirntf("%lf\n",pow(d,1/3));
                  }
 //p=∞
 if(s[i]>max) max=s[i];
 pirntf("%lf\n",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:19: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |                   pirntf("%lf\n",d);
      |                   ^~~~~~
      |                   printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=s[i];
                  pirntf("%lf\n",d);
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],2);
                  pirntf("%lf\n",pow(d,0.5));
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],3);
                  pirntf("%lf\n",pow(d,1/3));
                  }
 //p=∞
 if(s[i]>max) max=s[i];
 pirntf("%lf\n",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:19: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |                   pirntf("%lf\n",d);
      |                   ^~~~~~
      |                   printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d=0;
                  d+=s[i];
                  
                  }
 //p=2
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],2);
                  
                  }
 //p=3
 for(i=0;i<n;i++){
                  d=0;
                  d+=pow(s[i],3);
                                    }
 //p=∞
 if(s[i]>max) max=s[i];

 pirntf("%lf\n",d);
 pirntf("%lf\n",pow(d,0.5));
 pirntf("%lf\n",pow(d,1/3));
 pirntf("%lf\n",d);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:34:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 |  pirntf("%lf\n",d);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1,d2,d3,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d1=0;
                  d+=s[i];
                  
                  }
 //p=2
 for(i=0;i<n;i++){
                  d2=0;
                  d+=pow(s[i],2);
                  
                  }
 //p=3
 for(i=0;i<n;i++){
                  d3=0;
                  d+=pow(s[i],3);
                                    }
 //p=∞
 if(s[i]>max) max=s[i];

 pirntf("%lf\n",d1);
 pirntf("%lf\n",pow(d2,0.5));
 pirntf("%lf\n",pow(d3,1/3));
 pirntf("%lf\n",max);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:17:19: error: 'd' undeclared (first use in this function)
   17 |                   d+=s[i];
      |                   ^
main.c:17:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 |  pirntf("%lf\n",d1);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1,d2,d3,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d1=0;
                  d1+=s[i];
                  
                  }
 //p=2
 for(i=0;i<n;i++){
                  d2=0;
                  d2+=pow(s[i],2);
                  
                  }
 //p=3
 for(i=0;i<n;i++){
                  d3=0;
                  d3+=pow(s[i],3);
                                    }
 //p=∞
 if(s[i]>max) max=s[i];

 pirntf("%lf\n",d1);
 pirntf("%lf\n",pow(d2,0.5));
 pirntf("%lf\n",pow(d3,1/3));
 pirntf("%lf\n",max);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:34:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   34 |  pirntf("%lf\n",d1);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1,d2,d22,d33,d3,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
 //p=1
 for(i=0;i<n;i++){
                  d1=0;
                  d1+=s[i];
                  
                  }
 //p=2
 for(i=0;i<n;i++){
                  d2=0;
                  d2+=pow(s[i],2);
                  
                  }
 //p=3
 for(i=0;i<n;i++){
                  d3=0;
                  d3+=pow(s[i],3);
                                    }
 //p=∞
 if(s[i]>max) max=s[i];

d22=pow(d2,0.5);
d33=pow(d3,1/3);
 pirntf("%lf\n",d1);
 pirntf("%lf\n",d22);
 pirntf("%lf\n",d33);
 pirntf("%lf\n",max);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:36:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   36 |  pirntf("%lf\n",d1);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1,d2,d22,d33,d3,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
                  d1=0;
                  d1+=s[i];
                  d2=0;
                  d2+=pow(s[i],2);
                  d3=0;
                  d3+=pow(s[i],3);
                  if(s[i]>max) max=s[i];

d22=pow(d2,0.5);
d33=pow(d3,1/3);

 pirntf("%lf\n",d1);
 pirntf("%lf\n",d22);
 pirntf("%lf\n",d33);
 pirntf("%lf\n",max);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:25:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   25 |  pirntf("%lf\n",d1);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1,d2,d22,d33,d3,max,x[1000],y[1000],s[1000];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                   }
 for(i=0;i<n;i++){
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
                  d1+=s[i];
                  
                  d2+=pow(s[i],2);
                  
                  d3+=pow(s[i],3);
                  if(s[i]>max) max=s[i];

d22=pow(d2,0.5);
d33=pow(d3,1/3);

 pirntf("%lf\n",d1);
 pirntf("%lf\n",d22);
 pirntf("%lf\n",d33);
 pirntf("%lf\n",max);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:26:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   26 |  pirntf("%lf\n",d1);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1,d2,d22,d33,d3,max,x[101],y[101],s[101];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                   }
 for(i=0;i<n;i++){
                  scanf("%lf",&y[i]);
                  }
 s[i]=fabs(x[i]-y[i]);
                  d1+=s[i];
                  
                  d2+=pow(s[i],2);
                  
                  d3+=pow(s[i],3);
                  
                  if(s[i]>max) max=s[i];

 d22=pow(d2,0.5);
 d33=pow(d3,1/3);

 pirntf("%lf\n",d1);
 pirntf("%lf\n",d22);
 pirntf("%lf\n",d33);
 pirntf("%lf\n",max);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:27:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   27 |  pirntf("%lf\n",d1);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1,d2,d22,d33,d3,max,x[101],y[101],s[101];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                   }
 for(i=0;i<n;i++){
                  scanf("%lf",&y[i]);
                  }
 max=0;
 for(i=0;i<n;i++){
                  s[i]=fabs(x[i]-y[i]);
                  d1+=s[i];
                  
                  d2+=pow(s[i],2);
                  
                  d3+=pow(s[i],3);
                  
                  if(s[i]>max) max=s[i];
                  } 
 d22=pow(d2,0.5);
 d33=pow(d3,1/3);

 pirntf("%lf\n",d1);
 pirntf("%lf\n",d22);
 pirntf("%lf\n",d33);
 pirntf("%lf\n",max);

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:29:2: error: implicit declaration of function 'pirntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   29 |  pirntf("%lf\n",d1);
      |  ^~~~~~
      |  printf
Language: C

#include<stdio.h>
#include<math.h>

int main()
{
 int n,i;
 double d1=0,d2=0,d22,d33,d3=0,max,x[101],y[101],s[101];
 scanf("%d",&n);
 for(i=0;i<n;i++){
                  scanf("%lf",&x[i]);
                   }
 for(i=0;i<n;i++){
                  scanf("%lf",&y[i]);
                  }
 max=0;
 for(i=0;i<n;i++){
                  s[i]=fabs(x[i]-y[i]);
                  d1+=s[i];
                  
                  d2+=pow(s[i],2);
                  
                  d3+=pow(s[i],3);
                  
                  if(s[i]>max) max=s[i];
                  } 
 d22=pow(d2,0.5);
 d33=pow(d3,1/3);

    printf("%lf\n%lf\n%lf\n%lf\n",d1,d22,d33,d8);
     

 return 0;
}



Compiler output:
main.c: In function 'main':
main.c:29:46: error: 'd8' undeclared (first use in this function); did you mean 'd3'?
   29 |     printf("%lf\n%lf\n%lf\n%lf\n",d1,d22,d33,d8);
      |                                              ^~
      |                                              d3
main.c:29:46: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<math.h>
 
 
int main(){
 
  int n, i;
  double x[100], y[100],s[100], max=0, d1=0, d2=0, d3=0;
  scanf("%d", &n);
  for(i=0;i<n;i++) scanf("%lf", &x[i]);
  for(i=0;i<n;i++) scanf("%lf", &y[i]);
 
  for(i=0;i<n;i++){
    s[i]=fabs(x[i]-y[i]);

    d1+=s[i];
    d2+=pow(s[i], 2);
    d3+=pow(s[i], 3);
    if(max<s[i]) max=s[i];
  }
  d22=(d2,0.5);
 d33=pow(d3,1/3);

  printf("%f\n%f\n%f\n%f\n", d1, d22, d33, max);
 
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:3: error: 'd22' undeclared (first use in this function); did you mean 'd2'?
   21 |   d22=(d2,0.5);
      |   ^~~
      |   d2
main.c:21:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:2: error: 'd33' undeclared (first use in this function); did you mean 'd3'?
   22 |  d33=pow(d3,1/3);
      |  ^~~
      |  d3
Language: C

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main(void){
   int i,n,a,m,z;
   double total=0,tota=0,tot=0,b,c,max;
       scanf("%d",&n);
  int x[n],y[n];
  for(a=0;a<n;a++){
      scanf("%d",&x[a]);
  }
     for(a=0;a<n;a++){
      scanf("%d",&y[a]);
  }
          for(i=0; i<n; i++){
              m=x[i]-y[i];
              z=abs(m);
       total += z;
   }
      for(i=0;i<n;i++){
          m=x[i]-y[i];
              z=abs(m);
          tota+=(z*z);
          b=sqrt(tota);
  }
         for(i=0;i<n;i++){
             m=x[i]-y[i];
              z=abs(m);
          tot+=(z*z*z);
          c=pow(tot,1.0/3.0);
          
  }
  max=x[0]-y[0];
         for(i=0;i<n;i++){
          if((x[i]-y[i])>=max)max=(x[i]-y[i]);
  }
  printf("%f\n%f\n%f\n%f\n",total,b,c,max);
   


Compiler output:
main.c: In function 'main':
main.c:37:3: error: expected declaration or statement at end of input
   37 |   printf("%f\n%f\n%f\n%f\n",total,b,c,max);
      |   ^~~~~~
Language: C

#include <stdio.h>
#include <math.h>

int main(void)
{
　　　　long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
	double p1 = 0, pi = 0;

	scanf("%d", &n);

	for ( i = 0; i < n; i++)
	{
		scanf("%d", &x[i]);
	}
	
	for (i = 0; i < n; i++)
	{
		scanf("%d", &y[i]);
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i] < 0)
		{
			p1 = p1 + y[i] - x[i];
		}
		else
		{
			p1 = p1 + x[i] - y[i];
		}
	}

	for (i = 0; i < n; i++)
	{
		p2 = p2 + (x[i] - y[i])*(x[i] - y[i]);
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i] < 0)
		{
			p3 = p3 - (x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]);
		}
		else
		{
			p3 = p3 + (x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]);
		}
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i]>0)
		{
			if (pi < x[i] - y[i])
			{
				pi= x[i] - y[i];
			}
		}
		else
		{
			if (pi < y[i] - x[i])
			{
				pi = y[i] - x[i];
			}
		}
	}

	printf("%f\n%f\n%f\n%f\n", p1, sqrt(p2), pow(p3,1.0/3.0), pi);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:1: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      | ^~~~~~~~
main.c:6:3: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |         ^~~~~~~~
main.c:6:5: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |                 ^~~~~~~~
main.c:6:7: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |                         ^~~~~~~~
Language: C

#include <stdio.h>
#include <math.h>

int main(void)
{
　　　　long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
	double p1 = 0, pi = 0;

	scanf("%d", &n);

	for ( i = 0; i < n; i++)
	{
		scanf("%d", &x[i]);
	}
	
	for (i = 0; i < n; i++)
	{
		scanf("%d", &y[i]);
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i] < 0)
		{
			p1 = p1 + y[i] - x[i];
		}
		else
		{
			p1 = p1 + x[i] - y[i];
		}
	}

	for (i = 0; i < n; i++)
	{
		p2 = p2 + (x[i] - y[i])*(x[i] - y[i]);
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i] < 0)
		{
			p3 = p3 - (x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]);
		}
		else
		{
			p3 = p3 + (x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]);
		}
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i]>0)
		{
			if (pi < x[i] - y[i])
			{
				pi= x[i] - y[i];
			}
		}
		else
		{
			if (pi < y[i] - x[i])
			{
				pi = y[i] - x[i];
			}
		}
	}

	printf("%f\n%lf\n%lf\n%f\n", p1, sqrt(p2), pow(p3,1.0/3.0), pi);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:1: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      | ^~~~~~~~
main.c:6:3: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |         ^~~~~~~~
main.c:6:5: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |                 ^~~~~~~~
main.c:6:7: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>long int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |                         ^~~~~~~~
Language: C

#include <stdio.h>
#include <math.h>

int main(void)
{
　　　　int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
	double p1 = 0, pi = 0;

	scanf("%d", &n);

	for ( i = 0; i < n; i++)
	{
		scanf("%d", &x[i]);
	}
	
	for (i = 0; i < n; i++)
	{
		scanf("%d", &y[i]);
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i] < 0)
		{
			p1 = p1 + y[i] - x[i];
		}
		else
		{
			p1 = p1 + x[i] - y[i];
		}
	}

	for (i = 0; i < n; i++)
	{
		p2 = p2 + (x[i] - y[i])*(x[i] - y[i]);
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i] < 0)
		{
			p3 = p3 - (x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]);
		}
		else
		{
			p3 = p3 + (x[i] - y[i])*(x[i] - y[i])*(x[i] - y[i]);
		}
	}

	for (i = 0; i < n; i++)
	{
		if (x[i] - y[i]>0)
		{
			if (pi < x[i] - y[i])
			{
				pi= x[i] - y[i];
			}
		}
		else
		{
			if (pi < y[i] - x[i])
			{
				pi = y[i] - x[i];
			}
		}
	}

	printf("%f\n%f\n%f\n%f\n", p1, sqrt(p2), pow(p3,1.0/3.0), pi);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:1: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      | ^~~~~~~~
main.c:6:3: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |         ^~~~~~~~
main.c:6:5: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |                 ^~~~~~~~
main.c:6:7: error: stray '\343' in program
    6 | <U+3000><U+3000><U+3000><U+3000>int i, n, x[1000] = { 0 }, y[1000] = { 0 }, p2 = 0, p3 = 0;
      |                         ^~~~~~~~
Language: C

include <stdio.h>
#include <math.h>
#include <stdlib.h>
int main() {
	double a[1010];
	double b[1010];
	int n;
	double m = 0;
	double ans = 0;
	int i, j;
	scanf("%d", &n);

	for (i = 0; i < n; i++) {
		scanf("%lf", &a[i]);
	}
	for (i = 0; i < n; i++) {
		scanf("%lf", &b[i]);
	}
	for (i = 1; i < 4; i++) {
		m = 0;
		for (j = 0; j < n; j++) {
			m += pow(abs(a[j] - b[j]), i);
		}
		printf("%lf\n", pow(m, 1.0 / (double)i));
	}
	m = 0;
	for (i = 0; i < n; i++) {
		m = fmax(m, abs(a[i] - b[i]));
	}
	printf("%lf\n", m);

	return 0;
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
In file included from /usr/include/stdlib.h:514,
                 from main.c:3:
/usr/include/x86_64-linux-gnu/sys/types.h:33:9: error: unknown type name '__u_char'; did you mean '__u_short'?
   33 | typedef __u_char u_char;
      |         ^~~~~~~~
      |         __u_short
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |         scanf("%d", &n);
      |         ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    3 | #include <stdlib.h>
  +++ |+#include <stdio.h>
    4 | int main() {
main.c:11:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |         scanf("%d", &n);
      |         ^~~~~
main.c:11:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:24:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   24 |                 printf("%lf\n", pow(m, 1.0 / (double)i));
      |                 ^~~~~~
main.c:24:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:24:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:30:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   30 |         printf("%lf\n", m);
      |         ^~~~~~
main.c:30:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(void)
{
    int i,j,n;
    double x[1010]={0},y[1010]={0},max=0,p1,p2,p3;
    
    scanf("%d",&n);
    for(j=0;j<n*2;j++){
        if(j<n) scanf("%lf",&x[j]);
        else scanf("%lf",&y[j]);
    }
    
    for(j=0;j<n;j++){
        p1=p2=p3+=x[j]-y[j];
        if(p1>max)max=p1;
    }
    sqrt(p3)=p2=sqrt(p3);
    printf("%f\n%f\n%f\n%f\n",p1,p2,p3,max)
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:5: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   18 |     sqrt(p3)=p2=sqrt(p3);
      |     ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:18:5: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   18 |     sqrt(p3)=p2=sqrt(p3);
      |     ^~~~
main.c:18:5: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:18:13: error: lvalue required as left operand of assignment
   18 |     sqrt(p3)=p2=sqrt(p3);
      |             ^
main.c:19:44: error: expected ';' before 'return'
   19 |     printf("%f\n%f\n%f\n%f\n",p1,p2,p3,max)
      |                                            ^
      |                                            ;
   20 | 
   21 |     return 0;
      |     ~~~~~~
Language: C

#include <stdio.h>

int main(void)
{
    int i,j,n;
    double x[1010]={0},y[1010]={0},max=0,p1,p2,p3;
    
    scanf("%d",&n);
    for(j=0;j<n*2;j++){
        if(j<n) scanf("%lf",&x[j]);
        else scanf("%lf",&y[j]);
    }
    
    for(j=0;j<n;j++){
        p1=p2=p3+=x[j]-y[j];
        if(p1>max)max=p1;
    }
    p2=sqrt(p3);
    sqrt(p3);
    printf("%f\n%f\n%f\n%f\n",p1,p2,p3,max)
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:8: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   18 |     p2=sqrt(p3);
      |        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:18:8: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   18 |     p2=sqrt(p3);
      |        ^~~~
main.c:18:8: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:20:44: error: expected ';' before 'return'
   20 |     printf("%f\n%f\n%f\n%f\n",p1,p2,p3,max)
      |                                            ^
      |                                            ;
   21 | 
   22 |     return 0;
      |     ~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
#include <stdlib.h>

#define xy abs(x[j]-y[j])

int main(void)
{
    int i,j,n;
    double x[1010]={0},y[1010]={0},max=0,p1,p2,p3;
    
    scanf("%d",&n);
    for(j=0;j<n*2;j++){
        if(j<n) scanf("%lf",&x[j]);
        else scanf("%lf",&y[j]);
    }
    
    for(j=0;j<n;j++){
        p1+=xy;
        p2+=pow(xy,2);
        p3+=pow(xy,3));
        if(xy>max)max=xy;
    }
    p2=sqrt(p2);
    p3=sqrt(p3);
    printf("%f\n%f\n%f\n%f\n",p1,p2,p3,max);
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:22: error: expected ';' before ')' token
   21 |         p3+=pow(xy,3));
      |                      ^
      |                      ;
main.c:21:22: error: expected statement before ')' token
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main(){
	
	int x[1000],y[100];
	int n,i,max=0;
	double D[5],sum1=0,sum2=0;

	for(i=0;i<5;i++){
	  D[i]=0;
	}
	
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&x[i]);
	}
	for(i=0;i<n;i++){
		scanf("%d",&y[i]);
	}
	
	for(i=0;i<n;i++){
		D[0]+=abs(x[i]-y[i]);
	}
	
	for(i=0;i<n;i++){
		sum1+=(x[i]-y[i])*(x[i]-y[i]);
	}
	D[1]=sqrt(sum1);
	
	for(i=0;i<n;i++){
		sum2+=pow(abs(x[i]-y[i]),3);
	}
	D[2]=pow(sum2,0.33333333333);
	
	for(i=0;i<n;i++){
		if(max<=abs(x[i])-y[i]){
		max=abs(x[i]-y[i]);
		}
	}	
	D[3]=max;
		for(i=0;i<4;i++){
		printf("%.8f\n",cell(D[i]));
	}
	return 0;
}

	
	
	

Compiler output:
main.c: In function 'main':
main.c:44:33: error: implicit declaration of function 'cell'; did you mean 'ceill'? [-Wimplicit-function-declaration]
   44 |                 printf("%.8f\n",cell(D[i]));
      |                                 ^~~~
      |                                 ceill
Language: C

#include<stdio.h>
#include<math.h>
#include<float.h>
#define  DB_MAX 30


int main (void){
	
	int n,dis[1001]={},manD=0,eucD=0,p3D=0,cheD=0,d,i,t,k;
	int disx[1001]={},x;
	int disy[1001]={},y;
	int max=0;
	double che,l2,l,cheDD,cheDDD;
	x=0;
	y=0;
	
	scanf("%d",&n);
	//x??§?¨?
	for(i=0;i<n;i++){
		scanf("%d",&disx[i]);
	}
	//y??§?¨?
	for(i=0;i<n;i++){
		scanf("%d",&disy[i]);
	}
	
	for(i=0;i<n;i++){
	
	x=disx[i];
	y=disy[i];
	d=x-y;
	
	if(d<0){
		d = -1*d;
	}
	if(max<d){
		max=d;
	}
	//p=1
	manD +=d;
	
	//p=2
	eucD += d*d;
	
	//p=3
	
	p3D += d*d*d;
	}
	printf("%lf\n",(double)manD);
	printf("%lf\n",sprt(eucD));
	printf("%lf\n",pow(p3D,1.0/3.0));
	printf("%lf\n",(double)max);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:50:24: error: implicit declaration of function 'sprt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   50 |         printf("%lf\n",sprt(eucD));
      |                        ^~~~
      |                        sqrt
Language: C

#include<iostream>
#include<cmath>
using namespace std;

double min(double p, int n, int *x, int *y) {
    double d = 0.0;
    for (int i = 0; i < n; i++) {
        d += pow(abs(x[i] - y[i]), p);
    }
    return pow(d, 1 / p);
    return d;
}

int main() {
    int n, x[100], y[100];
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> x[i];
    }
    for (int i = 0; i < n; i++) {
        cin >> y[i];
    }
    for (int i = 1; i <= 3; i++) {
        printf("%lf\n", min(i, n, x, y));
    }
    double max = 0;
    for (int i = 0; i < n; i++) {
        int diff = abs(x[i] - y[i]);
        max = diff > max ? diff : max;
    }
    printf("%lf\n", max);
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

double min(double p, int n, int *x, int *y) {
    double d = 0.0;
    for (int i = 0; i < n; i++) {
        d += pow(abs(x[i] - y[i]), p);
    }
    return pow(d, 1 / p);
    return d;
}

int main() {
    int n, x[100], y[100];
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &x[i]);
    }
    for (int i = 0; i < n; i++) {
        scanf("%d", &y[i]);
    }
    for (int i = 1; i <= 3; i++) {
        printf("%lf\n", min(i, n, x, y));
    }
    double max = 0;
    for (int i = 0; i < n; i++) {
        int diff = abs(x[i] - y[i]);
        max = diff > max ? diff : max;
    }
    printf("%lf\n", max);
    
    
    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccX7Xo40.o: in function `min':
main.c:(.text+0x7c): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0xb5): undefined reference to `pow'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
#include <math.h>

double man_dist(int abvalue[],int n){
  int i;
  double dis=0;

  for(i=0;i<n;i++)  dis+=abvalue[i];
 
  return dis;
}

double euc_dis(int abvalue[],int n){
  int i,sq=0;
  double dis;
  
  for(i=0;i<n;i++)  sq+=pow(abvalue[i],2);
  dis=sqrt(sq);

  return dis;
}

double cube_dis(int abvalue[],int n){
  int i,cube=0;
  double dis;

  for(i=0;i<n;i++)  cube+=pow(abvalue[i],3);
  dis=pow(cube,0.333333);

  return dis;
}

double cheby_dis(int abvalue[],int n){
  int i;
  double dis=0;

  for(i=0;i<n;i++){
    if(abvalue[i]>dis)  dis=abvalue[i];
  }
  
  return dis;
}

void calc_dis(int avec[],int bvec[],int n){
  int i,abvalue[100];
  double ans;

  for(i=0;i<n;i++){
    abvalue[i]=avec[i]-bvec[i];
    if(abvalue[i]<0)  abvalue[i]*=-1;
  }

  printf("%f\n",man_dis(abvalue,n));
  printf("%f\n",euc_dis(abvalue,n));
  printf("%f\n",cube_dis(abvalue,n));
  printf("%f\n",cheby_dis(abvalue,n));
}  

int main(void){
  int n,avec[100],bvec[100],i;

  scanf("%d",&n);
  for(i=0;i<n;i++)  scanf("%d",&avec[i]);
  for(i=0;i<n;i++)  scanf("%d",&bvec[i]);

  calc_dis(avec,bvec,n);

  return 0;
}
  

  

Compiler output:
main.c: In function 'calc_dis':
main.c:53:17: error: implicit declaration of function 'man_dis'; did you mean 'man_dist'? [-Wimplicit-function-declaration]
   53 |   printf("%f\n",man_dis(abvalue,n));
      |                 ^~~~~~~
      |                 man_dist