criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main()
{
  vector<int> a(3);
  for(int i = 0; i <= 2; ++i) cin >> a[i];
  sort(a);
  int count = 0;
  for(int i = 0;i <= 1; ++i){
    int div = a[i+1] -a[i];
    count += div;
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: no matching function for call to 'sort(std::vector<int>&)'
    9 |   sort(a);
      |   ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

int main(){
  int A1,A2,A3;
  cin >>A1>>A2>>A3;
  
 int ans=max[(A1,A2,A3)]-min[(A1,A2,A3)];
  
  cout<<ans<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    9 |  int ans=max[(A1,A2,A3)]-min[(A1,A2,A3)];
      |             ^
a.cc:9:29: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    9 |  int ans=max[(A1,A2,A3)]-min[(A1,A2,A3)];
      |                             ^
Language: C++

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

int main(){
  int A1,A2,A3;
  cin >>A1>>A2>>A3;
  
  maxA=max(A1,A2,A3);
  minA=min(A1,A2,A3);
  
  cout<<maxA-minA<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'maxA' was not declared in this scope
    9 |   maxA=max(A1,A2,A3);
      |   ^~~~
a.cc:10:3: error: 'minA' was not declared in this scope
   10 |   minA=min(A1,A2,A3);
      |   ^~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:11:   required from here
    9 |   maxA=max(A1,A2,A3);
      |        ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:10:11:   required from here
   10 |   minA=min(A1,A2,A3);
      |        ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++h>
using namespace std;
int main(){
 
  vector <int> a(3);
  for(int e:a) cin>>e;
  
  sort(a.begin(),a.end());
  
  cout<<a[2]-a[0]<<endl;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc++h: No such file or directory
    1 | #include <bits/stdc++h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<list>
using namespace std;
int main()
{
  int a1, a2, a3; cin >> a1 >> a2 >> a3;
  cout << max(a1, a2, a3) - min(a1, a2, a3) << endl;
  
}


Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:14:   required from here
    7 |   cout << max(a1, a2, a3) - min(a1, a2, a3) << endl;
      |           ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:32:   required from here
    7 |   cout << max(a1, a2, a3) - min(a1, a2, a3) << endl;
      |                             ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
    	int A1 = scanner.nextInt();
    	int A2 = scanner.nextInt();
    	int A3 = scanner.nextInt();
		int[] list = {A1, A2, A3};
		int cost = 0;
		
		//System.out.println(A1);
		//System.out.println(A2);
		//System.out.println(A3);
		
		int cost1 = list[0]*0 + Math.abs(list[2]-list[0]) + Math.abs(list[1]-list[2]);
		int cost2 = list[1]*0 + Math.abs(list[0]-list[1]) + Math.abs(list[2]-list[0]);
		int cost3 = list[2]*0 + Math.abs(list[0]-list[2]) + Math.abs(list[1]-list[0]);
		
		int[] min = {cost1, cost2, cost3};
		Arrays.sort(min);
		for (int i : min) {
			//System.out.println(i);
			cost = min[0];
		}
		
		/*
		for (int i : list) {
			//System.out.println("min = " + min);
			System.out.println(i);
		}
		*/
		System.out.println(cost);
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner scanner = new Scanner(System.in);
		                      ^
  symbol:   class Scanner
  location: class Main
Main.java:20: error: cannot find symbol
		Arrays.sort(min);
		^
  symbol:   variable Arrays
  location: class Main
3 errors
Language: C++

#include <iostream>
#include<algorithm>
using namespace syd;
int main() {
	int A[3];
	cin >> A[0] >> A[1] >> A[2];
	sort(A, A + 3, greater<int>());
	int ANS;
	ANS = ((A[1] - A[0]) + (A[2] - A[1]));
	cout << ANS << endl;
}


Compiler output:
a.cc:3:17: error: 'syd' is not a namespace-name
    3 | using namespace syd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> A[0] >> A[1] >> A[2];
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:24: error: 'greater' was not declared in this scope; did you mean 'std::greater'?
    7 |         sort(A, A + 3, greater<int>());
      |                        ^~~~~~~
      |                        std::greater
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_function.h:353:12: note: 'std::greater' declared here
  353 |     struct greater;
      |            ^~~~~~~
a.cc:7:32: error: expected primary-expression before 'int'
    7 |         sort(A, A + 3, greater<int>());
      |                                ^~~
a.cc:7:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    7 |         sort(A, A + 3, greater<int>());
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << ANS << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout << ANS << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
	int A[3];
	cin >> A[0] >> A[1] >> A[2];
	sort(A, A + 3, greater<int>());
	int ANS;
	ANS = ((A[1] - A[0]) + (A[2] - A[1]));
	cout << ANS << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    6 |         sort(A, A + 3, greater<int>());
      |         ^~~~
      |         short
Language: C++

#include <iostream>
using namespace syd;
int main() {
	int A[3];
	cin >> A[0] >> A[1] >> A[2];
	sort(A, A + 3, greater<int>());
	int ANS;
	ANS = ((A[1] - A[0]) + (A[2] - A[1]));
	cout << ANS << endl;
}

Compiler output:
a.cc:2:17: error: 'syd' is not a namespace-name
    2 | using namespace syd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> A[0] >> A[1] >> A[2];
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:24: error: 'greater' was not declared in this scope; did you mean 'std::greater'?
    6 |         sort(A, A + 3, greater<int>());
      |                        ^~~~~~~
      |                        std::greater
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_function.h:353:12: note: 'std::greater' declared here
  353 |     struct greater;
      |            ^~~~~~~
a.cc:6:32: error: expected primary-expression before 'int'
    6 |         sort(A, A + 3, greater<int>());
      |                                ^~~
a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    6 |         sort(A, A + 3, greater<int>());
      |         ^~~~
      |         short
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout << ANS << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |         cout << ANS << endl;
      |                        ^~~~
      |                        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>
int main()
{
int A1, A2, A3, chan;
scanf("%d %d %d", &A1, &A2, &A3);

if (A2 == A3)
{
  if (A1 > A2)
  {
    chan = A1;
    A1 = A3;
    A3 = chan;
  }
}
else if (A1 == A3)
{
  if (A1 > A2)
  {
    chan = A1;
    A1 = A2;
    A2 = chan;
  }
}

  else if (A1 > A2 && A1 > A3)
  {
    chan = A1;
    A1 = A2;
    A2 = chan;

    if(A2 > A3)
    {
      chan = A2;
      A2 = A3;
      A3 = chan;
    }
    if(A1 > A2)
    {
      chan = A1;
      A1 = A2;
      A2 = chan;
    }
  }
}

  
  else
  {
    if(A2 > A3)
    {
      chan = A2;
      A2 = A3;
      A3 = chan;
    }
    if(A1 > A2)
    {
      chan = A1;
      A1 = A2;
      A2 = chan;
    }
  }
  
  
printf("%d", A3-A1);

return 0;
}


Compiler output:
main.c:48:3: error: expected identifier or '(' before 'else'
   48 |   else
      |   ^~~~
main.c:65:8: error: expected declaration specifiers or '...' before string constant
   65 | printf("%d", A3-A1);
      |        ^~~~
main.c:65:14: error: unknown type name 'A3'
   65 | printf("%d", A3-A1);
      |              ^~
main.c:67:1: error: expected identifier or '(' before 'return'
   67 | return 0;
      | ^~~~~~
main.c:68:1: error: expected identifier or '(' before '}' token
   68 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
int A1, A2, A3, chan;
scanf("%d %d %d", &A1, &A2, &A3);

if (A2 == A3)
{
  if (A1 > A2)
  {
    chan = A1;
    A1 = A3;
    A3 = chan;
  }
}
else if (A1 == A3)
{
  if (A1 > A2)
  {
    chan = A1;
    A1 = A2;
    A2 = chan;
  }
  
  else
  {
    if(A2 > A3)
    {
      chan = A2;
      A2 = A3;
      A3 = chan;
    }
    if(A1 > A2)
    {
      chan = A1;
      A1 = A2;
      A2 = chan;
    }
  }
  
  
printf("%d", A3-A1);

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^
Language: C

#include <stdio.h>

void swap(int a, int b)
{
	int t=a;
	a=b;
	b=t;
}

int main()
 {
	 int a[3], i, c;
	 for(i=0; i<3; i++){
		 cin >> a[i];
	 }
	 if(a[2]<a[1])
	 swap(a[2], a[1]);
	 if(a[1]<a[0])
	 swap(a[1],a[0]);
	 if(a[2]<a[1])
	 swap(a[1],a[2]);
	 c=a[2]-a[0];
	 printf("%d\n",c);
 }


Compiler output:
main.c: In function 'main':
main.c:14:18: error: 'cin' undeclared (first use in this function)
   14 |                  cin >> a[i];
      |                  ^~~
main.c:14:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
	  
	  int a[10];
	  scanf("%d %d %d",&a[0],&a[1],&a[2]);
	  sort(a,a+3);
	  int cost;
	  cost=abs(a[1]-a[0]);
	  cost=cost+abs(a[2]-a[1]);
	  printf("%d\n",cost);
	 return 0;
} 


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

#include<iostream>
#include<cstdlib>
#include<cstdlib>
#include<vector>
#include<string>
using namespace std;


int main(){
	int ans=0;
	vector<int> a(3);
	for(int i=0;i<3;i++){
		cin >> a[i];
	}
	sort(a.begin(), a.end());
	ans = abs(a[0]-a[1]) + abs(a[1]-a[2]);
	cout << ans << endl; 
	
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |         sort(a.begin(), a.end());
      |         ^~~~
      |         short
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main()
{
  vector <int> A(3);
  cin >> A[0] >> A[1] >> A[2];

  sort(A.begin(), A.end());

  cout << abs(A[2]-A[1])+abs(A[1]-A[0]) << endl;

  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |   sort(A.begin(), A.end());
      |   ^~~~
      |   short
Language: C++

#include <bits/stdc++.h>

#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl

typedef long long ll;

using namespace std;

const int INF = 1e9,MOD = 1e9 + 7,ohara = 1e6;
const ll LINF = 1e18;
long long int n,cnt=0,ans=0,a,b,c,d,cmp[10],cmpp,m,h,w,x,y,sum=0,pos;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

int main(void){
       cin.tie(0);
    ios::sync_with_stdio(false);
      
      cin>>cmp[0]>>cmp[1]>>cmp[2];
      sort(cmp,cmp+3)
      Cout(cmp[2]-cmp[0]);
    
       
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:22: error: expected ';' before 'cout'
   31 |       sort(cmp,cmp+3)
      |                      ^
      |                      ;
Language: C++

using System;
using System.Linq;

namespace Myatcoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            int[] A = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            Array.Sort(A);
            Array.Reverse(A);
            int ans = 0;
            for (int i = 0; i < A.Length - 1; i++) {
                ans += Math.Abs(A[i] - A[i + 1]);
            }
            Console.WriteLine(ans);
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:6:5: error: expected unqualified-id before 'public'
    6 |     public class Program
      |     ^~~~~~
Language: C++

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

int main() {
	int abs(int x) {
				return max(x,-x);
			}
	int max3(int x, int y, int z){
		if (x >= y) {
			if (x >= z) {
						return x;
			}
			else {
				return z;
			}
		}
		else{
			if (y >= z) {
					return y;
			}
				else {
					return z;
				}
			}
		}
			
	int a, b, c;
	cin >> a >> b >> c;
	cout << abs(a-b)+abs(b-c)+abs(c-a)-max3(abs(a-b),abs(b-c),abs(c-a)) << endl;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: a function-definition is not allowed here before '{' token
    6 |         int abs(int x) {
      |                        ^
a.cc:9:38: error: a function-definition is not allowed here before '{' token
    9 |         int max3(int x, int y, int z){
      |                                      ^
a.cc:30:44: error: 'max3' was not declared in this scope
   30 |         cout << abs(a-b)+abs(b-c)+abs(c-a)-max3(abs(a-b),abs(b-c),abs(c-a)) << endl;
      |                                            ^~~~
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>  // abs() for integer
using namespace std;

int main() {
	int a, b, c;
  	cin >> a >> b >> c;
  	int e, d, f;
    e = abs(a-b);
    d = abs(b-c);
    f = abs(c-a);
    cout << e+d+f-max(e,d,f) << endl;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:12:22:   required from here
   12 |     cout << e+d+f-max(e,d,f) << endl;
      |                   ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
	int a, b, c;
  	cin >> a >> b >> c;
  	int e, d, f;
    e = abs(a-b);
    d = abs(b-c);
    f = abs(c-a);
    cout << e+d+f-max(e,d,f) << endl;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:11:22:   required from here
   11 |     cout << e+d+f-max(e,d,f) << endl;
      |                   ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c;
  cin >> a >> b >> c;
  int ans=max(a,b,c)-min(a,b,c);
  cout << ans << endl;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:14:   required from here
    7 |   int ans=max(a,b,c)-min(a,b,c);
      |           ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:25:   required from here
    7 |   int ans=max(a,b,c)-min(a,b,c);
      |                      ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>
#include <cassert>
using namespace std;
int main() {
	int a = 0, b=0,c=0,d=0,e=0,count=0;
	cin >> a >> b >> c;
	d = std::max(a, b, c);
	e = std::min(a, b, c);
	cout << d - e;
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:9:14:   required from here
    9 |         d = std::max(a, b, c);
      |             ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:10:14:   required from here
   10 |         e = std::min(a, b, c);
      |             ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C

#include<stdio.h>
int main()
{
	int A[3];
	int a,b,c;
	scanf("%d %d %d",&A[0],&A[1],&A[2]);
	a=A[0]-A[1];
	b=A[0]-A[2];
	c=A[2]-A[1];
	if(a<0){
		a=-a
	}
	if(b<0){
		b=-b
	}
	if(a<0){
		c=-c
	}
	if(a<b){
		if(a<c){
			printf("%d",a);
		}else{
			printf("%d",c);
		}
	}else{
		if(b<c){
			printf("%d",b);
		}else{
			printf("%d",c);
		}
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:21: error: expected ';' before '}' token
   11 |                 a=-a
      |                     ^
      |                     ;
   12 |         }
      |         ~            
main.c:14:21: error: expected ';' before '}' token
   14 |                 b=-b
      |                     ^
      |                     ;
   15 |         }
      |         ~            
main.c:17:21: error: expected ';' before '}' token
   17 |                 c=-c
      |                     ^
      |                     ;
   18 |         }
      |         ~
Language: C++

#include "pch.h"
#include <iostream>

using namespace std;

int main()
{
	int A1, A2, A3;
	cin >> A1 >> A2 >> A3;
	int min =A1 ,max = A2;
	if (A1 >= A2) {//2<1
		if (A1 <= A3) {//2<1<3
			min = A2;
			max = A3;
		}
		else if (A2 >= A3) {//3<2<1
			max = A1;
			min = A3;
		}
		else {//2<3<1
			max = A1;
			min = A2;
		}
	}
	else {//1<2
		if (A2 <= A3) {//1<2<3
			min = A1;
			max = A3;
		}
		else if (A1 <= A3) {//1<3<2
			min = A1;
			max = A2;
		}
		else {
			min = A3;
			max = A2;
		}
	}
	cout << max- min << endl;
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std ;

long long a [ 200001 ] , c , d , e , f , g , h , k , l , m , n ;

int mn = 1e9 ;

int mx = -1e9 ;

int main ()
{
    for ( int i = 1 ; i <= 3 ; ++ i ){
        cin >> x ;
        mn = min ( x , mn ) ;
        mx = max ( x , mx ) ;
    }
    cout << mx - mn ;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'x' was not declared in this scope
   14 |         cin >> x ;
      |                ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b,c;
  cin >> a >> b >> c;

  if(b>=c){
    int d=abs(a-c);
  }else{
    int d=abs(a-b);
  }
    int e=abs(b-c);
    cout << d+e << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'd' was not declared in this scope
   14 |     cout << d+e << endl;
      |             ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
int main(){
vector <ll> a;
ll x;
for(int i=0;i<3;i++){
cin>>x;
a.pb(x);
}
sort(a.begin(),a.end());
ll sum=a[1]-a[0]+a[2]-a[1];
cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'vector' was not declared in this scope
    5 | vector <ll> a;
      | ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:2:12: error: expected primary-expression before 'long'
    2 | #define ll long long
      |            ^~~~
a.cc:5:9: note: in expansion of macro 'll'
    5 | vector <ll> a;
      |         ^~
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 | cin>>x;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:1: error: 'a' was not declared in this scope
    9 | a.pb(x);
      | ^
a.cc:11:6: error: 'a' was not declared in this scope
   11 | sort(a.begin(),a.end());
      |      ^
a.cc:11:1: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   11 | sort(a.begin(),a.end());
      | ^~~~
      | std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout<<sum;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

a = int(input())
b = int(input())
c = int(input())

lst = []
lst.append(a)
lst.append(b)
lst.append(c)
lst.sort()

print(lst[2] - lst[1]  + (lst[1] -lst[0]))

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = int(input())
      | ^
Language: C++

import math
a = int(input())
b = int(input())
c = int(input())

lst = []
lst.append(a)
lst.append(b)
lst.append(c)
lst.sort()

print(lst[2] - lst[1]  + (lst[1] -lst[0]))

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define f first
#define s second
#define mp make_pair
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) x.begin(),x.end()
#define mst(a,v) memset(a,v,sizeof(a))

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef vector<pi> vpi;

const int N=100010;
const int mod=1e9+7;
const ld PI=acos(-1.0);
const int inf=0x3f3f3f3f;



int main()
{
#ifdef local
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    vi a(3);
    for(int i=0; i<3; i++)
        cin>>a[i];
    sort(all(a));
    int ans=0;
    for(int i=1; i<sz(a); i++
        ans+=a[i]-a[i-1];
        cout<<ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:30: error: expected ')' before 'ans'
   39 |     for(int i=1; i<sz(a); i++
      |        ~                     ^
      |                              )
   40 |         ans+=a[i]-a[i-1];
      |         ~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B, C;
  cin >> A >> B >> C;
  int ans = max({A, B, C}) - min({A, B, C})
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'cout'
    8 |     cout << ans << endl;
      |     ^~~~
Language: C++

#include <iostream>
#include <stack>
#include <math.h>
#include <string.h>

using namespace std;

int A1, A2, A3;
int main(int argc, char** argv) {
    cin >> A1 >> A2 >> A3;
    int C[3];
    C[0] = abs(A1 - A2);
    C[1] = abs(A2 - A3);
    C[2] = abs(A3 - A1);
    sort(C, C + 3);
    cout << C[0] + C[1] << endl;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   15 |     sort(C, C + 3);
      |     ^~~~
      |     sqrt
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
  vector<int> A(3);
  
  cin >> A[0] >> A[1] >> A[2];
  
  sort(A.begin(), B.end());
  
  cout << abs(A[0] - A[1]) + abs(A[1] - A[2]) << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'B' was not declared in this scope
   13 |   sort(A.begin(), B.end());
      |                   ^
Language: C++

#include<cstdlib>
using namespace std;
 
int main(){
         
            int a,b,c;
           scanf("%d%d%d",&a,&b,&c);
           printf("%d",(abs(b-c)+abs(c-a));
           return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'scanf' was not declared in this scope
    7 |            scanf("%d%d%d",&a,&b,&c);
      |            ^~~~~
a.cc:8:43: error: expected ')' before ';' token
    8 |            printf("%d",(abs(b-c)+abs(c-a));
      |                  ~                        ^
      |                                           )
Language: C++

#include<cmath>
using namespace std;
 
int main(){
         
            int a,b,c;
           scanf("%d%d%d",&a,&b,&c);
           printf("%d",(abs(b-c)+abs(c-a));
           return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'scanf' was not declared in this scope
    7 |            scanf("%d%d%d",&a,&b,&c);
      |            ^~~~~
a.cc:8:43: error: expected ')' before ';' token
    8 |            printf("%d",(abs(b-c)+abs(c-a));
      |                  ~                        ^
      |                                           )
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
         
            int a,b,c;
           scanf("%d%d%d",&a,&b,&c);
           printf("%d",(abs(b-c)+abs(c-a));
           return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:43: error: expected ')' before ';' token
    8 |            printf("%d",(abs(b-c)+abs(c-a));
      |                  ~                        ^
      |                                           )
Language: C++

#include <cstdio>
#include <vector>
#include <algorithm>

int main(){
  vector<int> a(3);
  for(int i=0;i<3;i++)scanf("%d",&a[i]);
  sort(a.begin(),a.end());
  printf("%d",a[2]-a[0]);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> a(3);
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> a(3);
      |          ^~~
a.cc:7:35: error: 'a' was not declared in this scope
    7 |   for(int i=0;i<3;i++)scanf("%d",&a[i]);
      |                                   ^
a.cc:8:8: error: 'a' was not declared in this scope
    8 |   sort(a.begin(),a.end());
      |        ^
a.cc:8:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    8 |   sort(a.begin(),a.end());
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:3:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
Language: C++

// https://beta.atcoder.jp/contests/abc103/tasks/abc103_a

#include<iostream>
#include<vector>
using namespace std;
int main()
{
	vector<int> A(3);
	cin >> A[0] >> A[1] >> A[2];

	sort(A.begin(), A.end());

	int ans = 0;
	for(int i=0;i<3;i++){
		if (i!=0){
			ans += abs(A[i] - A[i-1]);
		}
	}

	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(A.begin(), A.end());
      |         ^~~~
      |         short
Language: C++

#include<iostream>
using namespace std;

int main() {
  int A1, A2, A3;
  cin >> A1 >> A2 >> A3;

  if (A1 >= A2 && A2 >= A3) {
    minimum_1 = A1 - A3;
    cout << minimum_1 << endl;
  }

  if (A1 >= A3 && A3 >= A2) {
    minimum_2 = A1 - A2;
    cout << minimum_2 << endl;
  }

  if (A2 >= A1 && A1 >= A3) {
    minimum_3 = A2 - A3;
    cout << minimum_3 << endl;
  }

  if (A2 >= A3 && A3 >> A1) {
    minimum_4 = A2 - A1;
    cout << minimum_4 << endl;
  }

  if (A3 >= A1 && A1 >= A2) {
    minimum_5 = A3 - A2;
    cout << minimum_5 << endl;
  }
  else {
    cout << A3 - A2 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'minimum_1' was not declared in this scope
    9 |     minimum_1 = A1 - A3;
      |     ^~~~~~~~~
a.cc:14:5: error: 'minimum_2' was not declared in this scope
   14 |     minimum_2 = A1 - A2;
      |     ^~~~~~~~~
a.cc:19:5: error: 'minimum_3' was not declared in this scope
   19 |     minimum_3 = A2 - A3;
      |     ^~~~~~~~~
a.cc:24:5: error: 'minimum_4' was not declared in this scope
   24 |     minimum_4 = A2 - A1;
      |     ^~~~~~~~~
a.cc:29:5: error: 'minimum_5' was not declared in this scope
   29 |     minimum_5 = A3 - A2;
      |     ^~~~~~~~~
Language: C

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

int main(void){
	long double a=0.0,b=0.0,c=0.0,ans=0.0;
  	scanf("%u%u%u",&a,&b,&c);
	ans = fmaxl({A1, A2, A3}) - fminl({A1, A2, A3});
	printf("%d\n",ans);
}

Compiler output:
main.c: In function 'main':
main.c:7:21: error: expected expression before '{' token
    7 |         ans = fmaxl({A1, A2, A3}) - fminl({A1, A2, A3});
      |                     ^
main.c:7:15: error: too few arguments to function 'fmaxl'
    7 |         ans = fmaxl({A1, A2, A3}) - fminl({A1, A2, A3});
      |               ^~~~~
In file included from main.c:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:366:1: note: declared here
  366 | __MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
      | ^~~~~~~~~~~
main.c:7:43: error: expected expression before '{' token
    7 |         ans = fmaxl({A1, A2, A3}) - fminl({A1, A2, A3});
      |                                           ^
main.c:7:37: error: too few arguments to function 'fminl'
    7 |         ans = fmaxl({A1, A2, A3}) - fminl({A1, A2, A3});
      |                                     ^~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:369:1: note: declared here
  369 | __MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
      | ^~~~~~~~~~~
Language: C

#include <stdio.h>
#include <algorithm.h>

int main(void){
	unsigned int a=0,b=0,c=0,ans=0;
  	scanf("%u%u%u",&a,&b,&c);
	ans = max({A1, A2, A3}) - min({A1, A2, A3});
	printf("%d\n",ans);
}

Compiler output:
main.c:2:10: fatal error: algorithm.h: No such file or directory
    2 | #include <algorithm.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main()
{
	int max,min,a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	max = a;
	min = a;
	if(b>max)max=b
	if(c>max)max=c;
	if(b<min)min=b;
	if(c<min)min=c;
	if(1<=min && max<=100)printf(max-min);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:23: error: expected ';' before 'if'
    8 |         if(b>max)max=b
      |                       ^
      |                       ;
    9 |         if(c>max)max=c;
      |         ~~             
main.c:12:41: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   12 |         if(1<=min && max<=100)printf(max-min);
      |                                      ~~~^~~~
      |                                         |
      |                                         int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C

#include<stdio.h>
int main()
{
	int max,min,a,b,c;
	scanf("%d %d %d",&a,&b,&c);
	max = a
	min = a
	if(b>max)b=max;
	if(c>max)c=max;
	if(b<min)b=min;
	if(c<min)c=min;
	if(1<=min && max<=100)printf(max-min);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: expected ';' before 'min'
    6 |         max = a
      |                ^
      |                ;
    7 |         min = a
      |         ~~~     
main.c:12:41: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   12 |         if(1<=min && max<=100)printf(max-min);
      |                                      ~~~^~~~
      |                                         |
      |                                         int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C

#include<stdio.h>
int main()
{
	int M,m,i[2];
	scanf("%d %d %d",&i[0],&i[1],&i[2]);
	M = max(i[0],i[1],i[2]);
	m = min(i[0],i[1],i[2]);
	if(1<=m && M<=100)printf(M-m);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    6 |         M = max(i[0],i[1],i[2]);
      |             ^~~
main.c:7:13: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
    7 |         m = min(i[0],i[1],i[2]);
      |             ^~~
      |             main
main.c:8:35: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    8 |         if(1<=m && M<=100)printf(M-m);
      |                                  ~^~
      |                                   |
      |                                   int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C

#include<stdio.h>
int main()
{
	int M,m,i[2];
	scanf("%d", &i);
	M = max(i);
	m = min(i);
	if(1<=i && i<=100)printf(M-m);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    6 |         M = max(i);
      |             ^~~
main.c:7:13: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
    7 |         m = min(i);
      |             ^~~
      |             main
main.c:8:13: warning: comparison between pointer and integer
    8 |         if(1<=i && i<=100)printf(M-m);
      |             ^~
main.c:8:21: warning: comparison between pointer and integer
    8 |         if(1<=i && i<=100)printf(M-m);
      |                     ^~
main.c:8:35: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    8 |         if(1<=i && i<=100)printf(M-m);
      |                                  ~^~
      |                                   |
      |                                   int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a[3];
  cin>>a[0]>>a[1]>>a[2];
  sort(a.begin(),a.end());
  cout<<a[2]-a[0]<<endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: request for member 'begin' in 'a', which is of non-class type 'int [3]'
    6 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:6:20: error: request for member 'end' in 'a', which is of non-class type 'int [3]'
    6 |   sort(a.begin(),a.end());
      |                    ^~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
       int n, sum = 0;
       cin >> n;

       for(Int i = 1; i <= n; i++)
       {
              int curr;
              cin >> curr;

              sum += curr - 1;
       }

       cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'Int' was not declared in this scope; did you mean 'int'?
    9 |        for(Int i = 1; i <= n; i++)
      |            ^~~
      |            int
a.cc:9:23: error: 'i' was not declared in this scope
    9 |        for(Int i = 1; i <= n; i++)
      |                       ^
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void) {
	int MAX = 0, MIN = 100;
	int A[3];
	scanf("%d %d %d", &A[0], &A[1], &A[2]);
	int i;
	for (i = 0; i <= 2; i++) {
		if (MAX < A[i])MAX = A[i];
		if (MIN > A[i])MIN = A[i];
	}
	printf("%d\n",MAX-MIN);
	return 0;
}
　

Compiler output:
main.c:16:1: error: stray '\343' in program
   16 | <U+3000>
      | ^~~~~~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void) {
	int MAX = 0, MIN = 100;
	int A[3];
	scanf("%d %d %d", &A[0], &A[1], &A[2]);
	int i;
	for (i = 0; i <= 2; i++) {
		if (MAX < A[i])MAX = A[i];
		if (MIN > A[i])MIN = A[i];
	}
	printf("%d\n",MAX-MIN);
	return 0;
}
　

Compiler output:
a.cc:16:1: error: extended character 　 is not valid in an identifier
   16 | 　
      | ^
a.cc:16:1: error: '\U00003000' does not name a type
   16 | 　
      | ^~
Language: C++

a=list(map(int,input().split()))
a=sorted(a)
s=0
for i in range(len(a)-1):
    res=a[i+1]-a[i]
    s+=res
print(s)    

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a=list(map(int,input().split()))
      | ^
Language: C

#include<stdio.h>
int main()
{

    int a1,a2,a3;
    scanf("%d %d %d",&a1,&a2,&a3);
    if(a1>a2){
        prinf("%d",(a1-a2));


    }
    else if(a1<a2){
        printf("%d",(a2-a1));

    }
    else{
        printf("%d",(a1-a2));


    }
    return 0;




}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |         prinf("%d",(a1-a2));
      |         ^~~~~
      |         printf
Language: C++

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

int main()
{
    int a[100];
    for(int i=0;;i++)
    {
        while(scanf("%d",&[i])==EOF)
            break;
    }
    sort(a);
    printf("%d\n",a[n-1]-a[0]);
    return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:10:30: error: expected '{' before ')' token
   10 |         while(scanf("%d",&[i])==EOF)
      |                              ^
a.cc: In function 'int main()':
a.cc:10:27: error: taking address of rvalue [-fpermissive]
   10 |         while(scanf("%d",&[i])==EOF)
      |                           ^~~
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(a);
      |     ^~~~
      |     short
a.cc:14:21: error: 'n' was not declared in this scope
   14 |     printf("%d\n",a[n-1]-a[0]);
      |                     ^