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

import java.util.*;
import java.io.*;

public class Main{

	public static void main(String[] args) throws IOException {
		int a = readInt(), b = readInt(), c = readInt(); println(Math.max(a, Math.max(b, c)) - Math.min(a, Math.min(b, c)));
		exit();
	}

	final private static int BUFFER_SIZE = 1 << 16;
	private static DataInputStream din = new DataInputStream(System.in);
	private static byte[] buffer = new byte[BUFFER_SIZE];
	private static int bufferPointer = 0, bytesRead = 0;
	static PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

	public static String readLine() throws IOException {
		byte[] buf = new byte[64]; // line length
		int cnt = 0, c;
		while ((c = Read()) != -1) {
			if (c == '\n')
				break;
			buf[cnt++] = (byte) c;
		}
		return new String(buf, 0, cnt);
	}

	public static String read() throws IOException {
		byte[] ret = new byte[1024];
		int idx = 0;
		byte c = Read();
		while (c <= ' ') {
			c = Read();
		}
		do {
			ret[idx++] = c;
			c = Read();
		} while (c != -1 && c != ' ' && c != '\n' && c != '\r');
		return new String(ret, 0, idx);
	}

	public static int readInt() throws IOException {
		int ret = 0;
		byte c = Read();
		while (c <= ' ')
			c = Read();
		boolean neg = (c == '-');
		if (neg)
			c = Read();
		do {
			ret = ret * 10 + c - '0';
		} while ((c = Read()) >= '0' && c <= '9');

		if (neg)
			return -ret;
		return ret;
	}

	public static long readLong() throws IOException {
		long ret = 0;
		byte c = Read();
		while (c <= ' ')
			c = Read();
		boolean neg = (c == '-');
		if (neg)
			c = Read();
		do {
			ret = ret * 10 + c - '0';
		} while ((c = Read()) >= '0' && c <= '9');
		if (neg)
			return -ret;
		return ret;
	}

	public static double readDouble() throws IOException {
		double ret = 0, div = 1;
		byte c = Read();
		while (c <= ' ')
			c = Read();
		boolean neg = (c == '-');
		if (neg)
			c = Read();

		do {
			ret = ret * 10 + c - '0';
		} while ((c = Read()) >= '0' && c <= '9');

		if (c == '.') {
			while ((c = Read()) >= '0' && c <= '9') {
				ret += (c - '0') / (div *= 10);
			}
		}

		if (neg)
			return -ret;
		return ret;
	}

	private static void fillBuffer() throws IOException {
		bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
		if (bytesRead == -1)
			buffer[0] = -1;
	}

	private static byte Read() throws IOException {
		if (bufferPointer == bytesRead)
			fillBuffer();
		return buffer[bufferPointer++];
	}

	static void print(Object o) {
		pr.print(o);
	}

	static void println(Object o) {
		pr.println(o);
	}

	static void flush() {
		pr.flush();
	}

	static void println() {
		pr.println();
	}

	static void exit() throws IOException {
		din.close();
		pr.close();
		System.exit(0);
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main{
      | ^~~~~~
Language: C++

#include <iostream>
# include < algorithm >
using namespace std;
int main()
{
	cin.tie(0);
   	ios::sync_with_stdio(false);

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

}

Compiler output:
a.cc:2:11: fatal error:  algorithm : No such file or directory
    2 | # include < algorithm >
      |           ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;
int main()
{
	cin.tie(0);
   	ios::sync_with_stdio(false);

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   10 |         int ans = max({a,b,c}) - min({a,b,c});
      |                   ~~~^~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:10:37: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   10 |         int ans = max({a,b,c}) - min({a,b,c});
      |                                  ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
a.cc:11:24: error: expected primary-expression before '/' token
   11 |         cout << ans << /n;
      |                        ^
a.cc:11:25: error: 'n' was not declared in this scope
   11 |         cout << ans << /n;
      |                         ^
Language: C++

#include <iostream>
using namaespace std;
int main()
{
	cin.tie(0);
   	ios::sync_with_stdio(false);

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

}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaespace'
    2 | using namaespace std;
      |       ^~~~~~~~~~
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.tie(0);
      |         ^~~
      |         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:9: error: 'ios' has not been declared
    6 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:10:19: error: 'max' was not declared in this scope; did you mean 'std::max'?
   10 |         int ans = max({a,b,c}) - min({a,b,c});
      |                   ^~~
      |                   std::max
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:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:10:34: error: 'min' was not declared in this scope; did you mean 'std::min'?
   10 |         int ans = max({a,b,c}) - min({a,b,c});
      |                                  ^~~
      |                                  std::min
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:11:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         cout << ans << /n;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:24: error: expected primary-expression before '/' token
   11 |         cout << ans << /n;
      |                        ^
a.cc:11:25: error: 'n' was not declared in this scope
   11 |         cout << ans << /n;
      |                         ^
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class AtCoder1
{

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
                
                int[] a = new int[3];
                int[] b = new int[100];
                int i=0,sum=0;
                float sum1=0;
                for(i=0;i<3;i++){
                   a[i] = s.nextInt();
                }
                Arrays.sort(a);
                System.out.println(a[0]-a[2]);
                
	}
}

Compiler output:
Main.java:4: error: class AtCoder1 is public, should be declared in a file named AtCoder1.java
public class AtCoder1
       ^
1 error
Language: C++

#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char const* argv[])
{
	int buf[3];
  	int sum1,sum2;
  	int i;
  	for(i=0;i<3;i++)
    {
    	cin>>buf[i]
    }
  	sort(buf,buf+3);
  	sum1=buf[3]-buf[2]+buf[2]-buf[1];
    sum2=buf[3]-buf[1]+buf[2]-buf[1];
    cout<<min(sum1,sum2)<<endl;
  
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:12:20: error: expected ';' before '}' token
   12 |         cin>>buf[i]
      |                    ^
      |                    ;
   13 |     }
      |     ~
Language: C++


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

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

Compiler output:
a.cc:8:5: error: typedef may not be a function definition
    8 | int main(void) {
      |     ^~~~
Language: C++

#include <bits/stbc++.h>
using namespace std;
int main(){
	int n,ans=0;
	cin>>n;
	for(int i=0;i<n;i++) {
		int a;
		cin>>a;
		ans+=a;
	}
	cout<<ans-n<<endl;
    return 0;
}



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

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

int main() {
  int a[3];
  cin>>a[0]>>a[1]>>a[2];
  sort(a,a+3)
  cout<<a[2]-a[0]<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'cout'
    7 |   sort(a,a+3)
      |              ^
      |              ;
    8 |   cout<<a[2]-a[0]<<endl;
      |   ~~~~
Language: C++

#include<stdio.h>
int main(void)
{
	int a[3];
	int i,j;
	int temp;
	for(i=0;i<3;i++){
		for(j=0;j<3-i;j++){
			if(a[j]>a[j+1]{
				temp=a[j];
				a[j]=a[j+1];
				a[j+1]=temp;
			}
		}
	}
	printf("%d\n",a[1]-a[0]+a[2]-a[1]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:39: error: expected ')' before '{' token
    9 |                         if(a[j]>a[j+1]{
      |                           ~           ^
      |                                       )
a.cc:14:17: error: expected primary-expression before '}' token
   14 |                 }
      |                 ^
Language: C++

#include <iostream >
using namespace std;
int main() {
string S, T; cin >> S >> T;
bool ans = false;
for (int i = 0; i < S.size(); ++i) {
if (S == T) {
ans = true;
break;
}
S = S.back() + S.substr(0, S.size()-1);
}
if (ans) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}


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

#include <stdio.h>
#include <algorithm>
int main(){
  int a[3],ans=0,i;
  for (i=0;i<3;i++) scanf("%d",&a[i]);
  std::sort(a,a+3);
  ans=a[2]-a[0];
  printf("%d\n",ans);
  return 0;
}]

Compiler output:
a.cc:10:2: error: expected unqualified-id before ']' token
   10 | }]
      |  ^
Language: C++

#include <stdio.h>
#include <algorithm>
int main(){
  int a[3],ans=0;
  for (i=0;i<n;i++) scanf("%d",&a[i]);
  std::sort(a,a+3);
  ans=a[2]-a[0];
  printf("%d\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'i' was not declared in this scope
    5 |   for (i=0;i<n;i++) scanf("%d",&a[i]);
      |        ^
a.cc:5:14: error: 'n' was not declared in this scope
    5 |   for (i=0;i<n;i++) scanf("%d",&a[i]);
      |              ^
Language: C++

#include <iostream>
#include <vector>
#define vi vector<int>
#define Sort v sort(v.begin(),v.end())
using namespace std;

int main(){
    vi a;
    cin>>a[0]>>a[1]>>a[2];
    
    Sort a;
    
    int ans = a[2]-a[0]
    
    cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: 'v' was not declared in this scope
    4 | #define Sort v sort(v.begin(),v.end())
      |              ^
a.cc:11:5: note: in expansion of macro 'Sort'
   11 |     Sort a;
      |     ^~~~
a.cc:15:5: error: expected ',' or ';' before 'cout'
   15 |     cout << ans << endl;
      |     ^~~~
Language: C++

#include<iostream>
#include<math>
#include<cstdlib>
using namespace std;
int main()
{
  int i,j, a[3];
  for(i=0;i<3;i++)
  {
    cin>>a[i];
  }
  for(i=0;i<3;i++)
  {
    for(j=0;j<3;j++)
    {
      if(a[i]>a[i+1])
      {
        int temp= a[i];
        a[i]=a[i+1];
        a[i+1]= temp;
      }
    }}
  int r;
  r= abs(a[1]-a[2])+abs(a[2]-a[1]);
  cout<<r;
}

Compiler output:
a.cc:2:9: fatal error: math: No such file or directory
    2 | #include<math>
      |         ^~~~~~
compilation terminated.
Language: C++

#include <cstdio>
#include <cmath>

int A[3];

int main(void) {

	scanf_s("%d%d%d", &A[0], &A[1], &A[2]);

	printf("%d\n", abs(A[0] - A[1]) + abs(A[1] - A[2]));

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d%d%d", &A[0], &A[1], &A[2]);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<iostream>
#include<stdio.h>
#include<vector>
#include<cmath>
#include<queue>
#include<string.h>
#include<map>
#include<algorithm>
#define ll long long
#define rep(i,a,b) for(int i = a;i < b;i++)
#define N 100004
#define INF 1e9+7

using namespace std;

ll n,k,ar[N];

int main()
{
    ios_base::sync_with_stdio(false);

    cin >> a >> b >> c;

   if(a >= b && a <= c)


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: 'a' was not declared in this scope
   22 |     cin >> a >> b >> c;
      |            ^
a.cc:22:17: error: 'b' was not declared in this scope
   22 |     cin >> a >> b >> c;
      |                 ^
a.cc:22:22: error: 'c' was not declared in this scope
   22 |     cin >> a >> b >> c;
      |                      ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
  vector<int> s;
  for (int i = 0; i < 3; ++i) {
    int a;
    cin >> a;
    s.push_back(a);
  }
  sort(a.begin(), a.end());
  cout << a[2] - a[0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'a' was not declared in this scope
   12 |   sort(a.begin(), a.end());
      |        ^
Language: Java

import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class at1 
 {

    public static void main(String[] args) 
    {
        Scanner sc=new Scanner(System.in);
        
        int a[]=new int[3];
        for(int i=0;i<3;i++)
        {
           a[i]=sc.nextInt();
        }
        
        Arrays.sort(a);
        int sum=0;
        for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        }
        System.out.println(sum);
    }
}

Compiler output:
Main.java:9: error: class at1 is public, should be declared in a file named at1.java
public class at1 
       ^
1 error
Language: C++

import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

 class at1 
 {

    public static void main(String[] args) 
    {
        Scanner sc=new Scanner(System.in);
        
        int a[]=new int[3];
        for(int i=0;i<3;i++)
        {
           a[i]=sc.nextInt();
        }
        
        Arrays.sort(a);
        int sum=0;
        for(int i=1;i<=2;i++)
        {
            int diff=a[i]-a[i-1];
            sum=sum+diff;
        }
        System.out.println(sum);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.math.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.security.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.text.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.concurrent.*;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.util.regex.*;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:11: error: expected ':' before 'static'
   12 |     public static void main(String[] args)
      |           ^~~~~~~
      |           :
a.cc:12:29: error: 'String' has not been declared
   12 |     public static void main(String[] args)
      |                             ^~~~~~
a.cc:12:38: error: expected ',' or '...' before 'args'
   12 |     public static void main(String[] args)
      |                                      ^~~~
a.cc:31:2: error: expected ';' after class definition
   31 | }
      |  ^
      |  ;
a.cc: In static member function 'static void at1::main(int*)':
a.cc:14:9: error: 'Scanner' was not declared in this scope
   14 |         Scanner sc=new Scanner(System.in);
      |         ^~~~~~~
a.cc:16:17: error: initializer fails to determine size of 'a'
   16 |         int a[]=new int[3];
      |                 ^~~~~~~~~~
a.cc:16:17: error: array must be initialized with a brace-enclosed initializer
a.cc:19:17: error: 'sc' was not declared in this scope
   19 |            a[i]=sc.nextInt();
      |                 ^~
a.cc:22:9: error: 'Arrays' was not declared in this scope
   22 |         Arrays.sort(a);
      |         ^~~~~~
a.cc:29:9: error: 'System' was not declared in this scope
   29 |         System.out.println(sum);
      |         ^~~~~~
Language: C

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#define MP(x, y) make_pair(x, y)
#define Pair pair<int, int> 
//#define int long long 
using namespace std;
const int MAXN = 1e6 + 10, INF = 1e9;
inline int read() {
    char c = getchar(); int x = 0, f = 1;
    while(c < '0' || c > '9') {if(c == '-') f = -1; c = getchar();}
    while(c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
    return x * f;
}
int N, M;
Pair P[MAXN];
main() {
	N = read(); M = read();
	for(int i = 0; i < M; i++) {
		int x = read(), y = read();
		P[i] = MP(y, x);
	}
	int ans = 0, last = -1;
	sort(P , P + M);
	for(int i = 0; i < M; i++) {
		int j = i + 1;
		while(j < M && P[i].first == P[j].first) j++;
		if(P[j - 1].second >= last) 
			ans++, last = P[j - 1].first;
		i = j;
	}
	printf("%d\n", ans);
	return 0;
}

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

#include<iostream>
#include<vector>
#include<algorithm>
int main(void) {
  std::vector<int> A(3);
  
  for(int i = 0; i < 2; i++){
    std::cin >> A[i];
  }
  std::sort(A.begin(). A.end());
  
  std::cout << (A[0]-A[1])+(A[1]-A[0]) << std::endl;
  
  return 0;
}
  
  
  
  
  
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'std::vector<int>::iterator' has no member named 'A'
   10 |   std::sort(A.begin(). A.end());
      |                        ^
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
int main(void) {
  std::vevtor<int> A(3);
  
  for(int i = 0; i < 2; i++){
    std::cin >> A[i];
  }
  std::sort(A.begin(). A.end());
  
  std::cout << (A[0]-A[1])+(A[1]-A[0]) << std::endl;
  
  return 0;
}
  
  
  
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'vevtor' is not a member of 'std'; did you mean 'vector'?
    5 |   std::vevtor<int> A(3);
      |        ^~~~~~
      |        vector
a.cc:5:15: error: expected primary-expression before 'int'
    5 |   std::vevtor<int> A(3);
      |               ^~~
a.cc:8:17: error: 'A' was not declared in this scope
    8 |     std::cin >> A[i];
      |                 ^
a.cc:10:13: error: 'A' was not declared in this scope
   10 |   std::sort(A.begin(). A.end());
      |             ^
Language: C++

# include < iostream >
using namespace std ;
int main () {
string S , T ; cin >> S >> T ;
bool ans = false ;
for ( int i = 0; i < S . size (); ++ i ) {
if ( S == T ) {
ans = true ;
break ;
}
S = S . back () + S . substr (0 , S . size () -1);
}
if ( ans ) {
cout << " Yes " << endl ;
}
else {
cout << "No" << endl ;
}
}

Compiler output:
a.cc:1:11: fatal error:  iostream : No such file or directory
    1 | # include < iostream >
      |           ^~~~~~~~~~~~
compilation terminated.
Language: C++

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


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

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


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

include <stdio.h>
int main(){
     int a_st,a_nd,a_rd;
     scanf('%d %d %d',a_st,a_nd,a_rd);
     if(a_st>a_nd){
          if(a_st>a_rd){
                 if(a_nd>a_rd){
                      //A1>A2>A3
                 }else if(a_nd<a_rd){
                      //A1>A3>A2
                 }
          }else if(a_st<a_rd){
                //A3>A1>A2
          }else if(a_st==a_rd){
               //A1=A3>A2
          }else{}
     }else if(a_st<a_nd){
          if(a_st>a_rd){
               //A2>A1>A3
          }else if(a_st<a_rd){
               if(a_nd>a_rd){
                    //A2>A3>A1
               }else if(a_nd<a_rd){
                    //A3>A2>A1
               }else if(a_nd==ard){
                   // A2=A3>A1
               }else{}
          }else if(a_st==a_rd){
               //A2>A1=A3
          }else{}
     }else if(a_st==a_nd){
          if(a_st>a_rd){
               //A1=A2>A3
          }else if(a_st<a_rd){
               //A3>A1=A2
          }else if(a_st==a_rd){
               //A1=A2=A3
          }else{}
     }else{}
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c:4:12: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    4 |      scanf('%d %d %d',a_st,a_nd,a_rd);
      |            ^~~~~~~~~~
Language: C++

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

int main() {
  int a,b,c;
  cin>>a>>b>>c;
int ans=0;
  for(int i=0;i<100;i++){
  if(i=a||i=b||i=c)ans=i;
}
if(ans==a)cout<<a-b+|b-c|<<endl;
else if(ans==b)cout<<b-a+|a-c|<<endl;
else cout<<c-a+|a-b|<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: lvalue required as left operand of assignment
    9 |   if(i=a||i=b||i=c)ans=i;
      |             ~^~~
a.cc:11:21: error: expected primary-expression before '|' token
   11 | if(ans==a)cout<<a-b+|b-c|<<endl;
      |                     ^
a.cc:11:26: error: expected primary-expression before '<<' token
   11 | if(ans==a)cout<<a-b+|b-c|<<endl;
      |                          ^~
a.cc:12:26: error: expected primary-expression before '|' token
   12 | else if(ans==b)cout<<b-a+|a-c|<<endl;
      |                          ^
a.cc:12:31: error: expected primary-expression before '<<' token
   12 | else if(ans==b)cout<<b-a+|a-c|<<endl;
      |                               ^~
a.cc:13:16: error: expected primary-expression before '|' token
   13 | else cout<<c-a+|a-b|<<endl;
      |                ^
a.cc:13:21: error: expected primary-expression before '<<' token
   13 | else cout<<c-a+|a-b|<<endl;
      |                     ^~
Language: C++

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

int main() {
  int a,b,c;
  cin>>a>>b>>c;
  int ans=0;
 for(int i=0;i<100;i++){
if(i==a||i==b||i==c)ans=i;
}
if(ans==a)cout<<a-b+|b-c|<<endl;
else if(ans==b)cout<<b-a+|a-c|<<endl;
else cout<<c-a+|a-b|<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected primary-expression before '|' token
   11 | if(ans==a)cout<<a-b+|b-c|<<endl;
      |                     ^
a.cc:11:26: error: expected primary-expression before '<<' token
   11 | if(ans==a)cout<<a-b+|b-c|<<endl;
      |                          ^~
a.cc:12:26: error: expected primary-expression before '|' token
   12 | else if(ans==b)cout<<b-a+|a-c|<<endl;
      |                          ^
a.cc:12:31: error: expected primary-expression before '<<' token
   12 | else if(ans==b)cout<<b-a+|a-c|<<endl;
      |                               ^~
a.cc:13:16: error: expected primary-expression before '|' token
   13 | else cout<<c-a+|a-b|<<endl;
      |                ^
a.cc:13:21: error: expected primary-expression before '<<' token
   13 | else cout<<c-a+|a-b|<<endl;
      |                     ^~
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String Nb1 = scan.next();
		int N = Integer.valueOf(Nb1);
		String Nb1 = scan.next();
		int M = Integer.valueOf(Nb2);
		int[] nb1 = new int[M];
		int[] nb2 = new int[M];

		for (int i = 0; i < M; i++) {
			nb1[i] = scan.nextInt();
			nb2[i] = scan.nextInt();
		}
		int count=0;
		for (int j = 0; j < N; j++) {
			int v1=nb1[j];
			int	v2=nb2[j];
			for (int i = j; i < N; i++) {
				if(nb2[i]<v1||v2<nb[i]) {
				count++;
				}
			}
		}

		System.out.println(count);

	}
}

Compiler output:
Main.java:9: error: variable Nb1 is already defined in method main(String[])
		String Nb1 = scan.next();
		       ^
Main.java:10: error: cannot find symbol
		int M = Integer.valueOf(Nb2);
		                        ^
  symbol:   variable Nb2
  location: class Main
Main.java:23: error: cannot find symbol
				if(nb2[i]<v1||v2<nb[i]) {
				                 ^
  symbol:   variable nb
  location: class Main
3 errors
Language: C++

#include<iostream.h>
#include<conio.h>
using namespace std;
struct task
{
int deadl;
int cost;
}task[20],temp;
void main()
{
int i,j,n,p[20],count=0,c=0,ans[20],ex[10],penalty=0,temp1=1,x=0;
clrscr();
cout<<"enter the number of tasks";
cin>>n;
for(i=0;i<n;i++)
{
cin>>task[i].deadl>>task[i].cost;
p[i]=-1;
}
for(i=0;i<n;i++)
{
for(j=i+1;j<n;j++)
{
if(task[i].cost<task[j].cost)
{
temp=task[i];
task[i]=task[j];
task[j]=temp;
}
}
}
for(i=0;i<n;i++)
{
if(p[task[i].deadl]==-1)
{
p[task[i].deadl]=0;
ans[count++]=i;
}
else
{
c=task[i].deadl;
temp1=1;
while(c>0)
{
if(p[c]==-1)
{
temp1=0;
p[c]=0;
ans[count++]=i;
break;
}
c--;
}
if(temp1==1)
{
ex[x++]=i;
penalty=penalty+task[i].cost;
}
}
}
for(i=0;i<count;i++)
{
for(j=i+1;j<count;j++)
{
if(task[ans[i]].deadl>=task[ans[j]].deadl)
{
temp1=ans[i];
ans[i]=ans[j];
ans[j]=temp1;
}
}
}


cout<<penalty;
getch();
}


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

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

int main(void){
 int a[3],tmp,i,j;
  scanf(''%d %d %d\n'',&a[0],&a[1],&a[2]);
  for(i=0;i<2;i++){
    for(j=i+1;j<3;j++){
      if(a[i]<a[j]){// 3 5 6 -> 5 3 6
        tmp=a[i];
        a[i]=a[j];
        a[j]=tmp;
      }
    }
  }
  printf(''%d\n'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: empty character constant
    6 |   scanf(''%d %d %d\n'',&a[0],&a[1],&a[2]);
      |         ^~
main.c:6:12: error: 'd' undeclared (first use in this function)
    6 |   scanf(''%d %d %d\n'',&a[0],&a[1],&a[2]);
      |            ^
main.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:19: error: stray '\' in program
    6 |   scanf(''%d %d %d\n'',&a[0],&a[1],&a[2]);
      |                   ^
main.c:6:19: error: expected ')' before 'n'
    6 |   scanf(''%d %d %d\n'',&a[0],&a[1],&a[2]);
      |        ~          ^~
      |                   )
main.c:6:21: error: empty character constant
    6 |   scanf(''%d %d %d\n'',&a[0],&a[1],&a[2]);
      |                     ^~
main.c:16:10: error: empty character constant
   16 |   printf(''%d\n'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
      |          ^~
main.c:16:14: error: stray '\' in program
   16 |   printf(''%d\n'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
      |              ^
main.c:16:14: error: expected ')' before 'n'
   16 |   printf(''%d\n'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
      |         ~    ^~
      |              )
main.c:16:16: error: empty character constant
   16 |   printf(''%d\n'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
      |                ^~
Language: C

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

int main(void){
	
	int A;
	int B;
	int C;
	int D;

	scanf("%d %d %d",&A,&B,&C);
	
	D = abs(A - B) + abs(C - A);
	if (D > abs(B - A) + abs(C - B)
		D = abs(B - A) + abs(C - B);
	if (D > abs(A - C) + abs(B - A))
		D = abs(A - C) + abs(B - A);
	if (D > abs(B - C) + abs(A - B)
		D = abs(B - C) + abs(A - B);
	if (D > abs(C - A) + abs(B - C)
		D = abs(C - A) + abs(B - C);
	if (D > abs(C - B) + abs(A - C)
	D = abs(C - B) + abs(A - C);
	
	printf("%d", D);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:40: error: expected ')' before 'D'
   14 |         if (D > abs(B - A) + abs(C - B)
      |            ~                           ^
      |                                        )
   15 |                 D = abs(B - A) + abs(C - B);
      |                 ~                       
main.c:28:1: error: expected declaration or statement at end of input
   28 | }
      | ^
Language: C

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

int main(void){
	
	int A;
	int B;
	int C;
	int D;

	scanf("%d %d %d",&A,&B,&C);
	
	D = abs(A - B) + abs(C - A);
	if (D > abs(B - A) + abs(C - B)
		D = abs(B - A) + abs(C - B);
	if (D > abs(A - C) + abs(B - A))
		D = abs(A - C) + abs(B - A);
	if (D > abs(B - C) + abs(A - B)
		D = abs(B - C) + abs(A - B);
	if (D > abs(C - A) + abs(B - C)
		D = abs(C - A) + abs(B - C);
	if (D > abs(C - B) + abs(A - C);
	D = abs(C - B) + abs(A - C);
	
	printf("%d", D);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:40: error: expected ')' before 'D'
   14 |         if (D > abs(B - A) + abs(C - B)
      |            ~                           ^
      |                                        )
   15 |                 D = abs(B - A) + abs(C - B);
      |                 ~                       
main.c:28:1: error: expected declaration or statement at end of input
   28 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
 int a[3],tmp,i,j;
  scanf(''%d %d %d'',&a[0],&a[1],&a[2]);
  for(i=0;i<2;i++){
    for(j=i+1;j<3;j++){
      if(a[i]<a[j]){// 3 5 6 -> 5 3 6
        tmp=a[i];
        a[i]=a[j];
        a[j]=tmp;
      }
    }
  }
  printf(''%d'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: empty character constant
    5 |   scanf(''%d %d %d'',&a[0],&a[1],&a[2]);
      |         ^~
main.c:5:12: error: 'd' undeclared (first use in this function)
    5 |   scanf(''%d %d %d'',&a[0],&a[1],&a[2]);
      |            ^
main.c:5:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:19: error: empty character constant
    5 |   scanf(''%d %d %d'',&a[0],&a[1],&a[2]);
      |                   ^~
main.c:5:19: error: expected ')' before '\x0'
    5 |   scanf(''%d %d %d'',&a[0],&a[1],&a[2]);
      |        ~          ^~
      |                   )
main.c:15:10: error: empty character constant
   15 |   printf(''%d'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
      |          ^~
main.c:15:14: error: empty character constant
   15 |   printf(''%d'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
      |              ^~
main.c:15:14: error: expected ')' before '\x0'
   15 |   printf(''%d'',(abs(a[0]-a[1])+abs(a[1]-a[2])));
      |         ~    ^~
      |              )
Language: C

    #include<stdio.h>
    int main(void){
      
      int task[3] = {};
      int sumtask = 0,tmp = 0;
      
      
      for(int i = 0; i < 3; i++){
        scanf("%d", &task[i]);
      }
      
      for(int i = 0; i < 2; i++){
        if(task[i] > task[i+1]){
          tmp = task[i];
          task[i] = task[1+i];
          task[i+1] = tmp;
        }
      
      sumtask = (task[1] - task[0])+(task[2] - task[1]);
      
     
      printf("%d\n", sumtask);
      
      return 0;
    }

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

#include <stdio.h>
#include<math.h>
int main()
{
	int A, B, C;
	while (scanf_s("%d %d %d",&A,&B,&C)!=EOF)
	{
		int a, b, c;
		a = abs(A - B) + abs(B - C);
		b = abs(A - C) + abs(B - C);
		c = abs(A - B) + abs(A - C);
		if (a < b)
		{
			if (a < c)
				printf("%d\n", a);
			else
				printf("%d\n", c);
		}
		else
		{
			if (b < c)
				printf("%d\n", b);
			else
				printf("%d\n", c);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         while (scanf_s("%d %d %d",&A,&B,&C)!=EOF)
      |                ^~~~~~~
      |                scanf
main.c:9:21: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    9 |                 a = abs(A - B) + abs(B - C);
      |                     ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | int main()
Language: C

int A;
	int B;
	int C;
	int D;

	scanf("%d %d %d", &A, &B, &C);
	
	D = abs(A - B);
	if (D > abs(B - A))
		D = abs(B - A);
	if (D > abs(A - C))
		D = abs(A - C);
	if (D > abs(B - C))
		D = abs(B - C);
	if (D > abs(C - A))
		D = abs(C - A);
	if (D > abs(C - B))
		D = abs(C - B);
	if (D > abs(A - B))
		D = abs(A - B);
	printf("%d", D);

	return 0;
}

Compiler output:
main.c:6:15: error: expected declaration specifiers or '...' before string constant
    6 |         scanf("%d %d %d", &A, &B, &C);
      |               ^~~~~~~~~~
main.c:6:27: error: expected declaration specifiers or '...' before '&' token
    6 |         scanf("%d %d %d", &A, &B, &C);
      |                           ^
main.c:6:31: error: expected declaration specifiers or '...' before '&' token
    6 |         scanf("%d %d %d", &A, &B, &C);
      |                               ^
main.c:6:35: error: expected declaration specifiers or '...' before '&' token
    6 |         scanf("%d %d %d", &A, &B, &C);
      |                                   ^
main.c:8:9: warning: data definition has no type or storage class
    8 |         D = abs(A - B);
      |         ^
main.c:8:9: error: type defaults to 'int' in declaration of 'D' [-Wimplicit-int]
main.c:8:13: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
    8 |         D = abs(A - B);
      |             ^~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
  +++ |+#include <stdlib.h>
    1 | int A;
main.c:8:13: error: initializer element is not constant
    8 |         D = abs(A - B);
      |             ^~~
main.c:9:9: error: expected identifier or '(' before 'if'
    9 |         if (D > abs(B - A))
      |         ^~
main.c:11:9: error: expected identifier or '(' before 'if'
   11 |         if (D > abs(A - C))
      |         ^~
main.c:13:9: error: expected identifier or '(' before 'if'
   13 |         if (D > abs(B - C))
      |         ^~
main.c:15:9: error: expected identifier or '(' before 'if'
   15 |         if (D > abs(C - A))
      |         ^~
main.c:17:9: error: expected identifier or '(' before 'if'
   17 |         if (D > abs(C - B))
      |         ^~
main.c:19:9: error: expected identifier or '(' before 'if'
   19 |         if (D > abs(A - B))
      |         ^~
main.c:21:16: error: expected declaration specifiers or '...' before string constant
   21 |         printf("%d", D);
      |                ^~~~
main.c:21:22: error: expected declaration specifiers or '...' before 'D'
   21 |         printf("%d", D);
      |                      ^
main.c:23:9: error: expected identifier or '(' before 'return'
   23 |         return 0;
      |         ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#define p pair<long long,long long>
#define f first
#define s second
using namespace std;
const long long M=1e5+5;
const long long N=1e5+5; 
long long n,m;
p a[M];
long long main(){
	cin>>n>>m;
	for(long long i=1;i<=m;i++){
		cin>>a[i].f>>a[i].s;
		if(a[i].f>a[i].s) swap(a[i].f,a[i].s);  
	}
	sort(a,a+m);
	long long pl=0,pr=N;
	long long ans=0;
	for(long long i=1;i<=m;i++){
		long long l=a[i].f,r=a[i].s;
		pl=max(pl,l);
		pr=min(pr,r);
		if(l>=pr){
			pl=l;
			pr=r;
			++ans;	
		}
	}
	cout<<++ans<<endl;
	return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:27: error: expected ';' before '{' token
   21 | else  ( C <= B && B <= A ){
      |                           ^
      |                           ;
Language: C++

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: expected ';' before '{' token
   21 | else ( C <= B && B <= A ){
      |                          ^
      |                          ;
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C


#include<stdio.h>

void swap(int nx, int ny){
    int temp = nx;
    nx = ny;
    ny = temp;
}

void Sort3(int n1, int n2, int n3){
    if (n1 > n2) swap(n1, n2);
    if (n2 > n3) swap(n2, n3);
    if (n1 > n2) swap(n1, n2);
}

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

Compiler output:
main.c: In function 'main':
main.c:19:15: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&a, &b, &c);
      |               ^
main.c:19:19: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&a, &b, &c);
      |                   ^
main.c:19:23: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&a, &b, &c);
      |                       ^
Language: Java

import java.util.Scanner;
import java.util.Arryas;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int[] arr = new int[3];
    arr[0]=sc.nextInt();
    arr[1]=sc.nextInt();
    arr[2]=sc.nextInt();
    Arrays.sort(arr);
    System.out.println(arr[2]-arr[0]);
  }
}

Compiler output:
Main.java:2: error: cannot find symbol
import java.util.Arryas;
                ^
  symbol:   class Arryas
  location: package java.util
Main.java:11: error: cannot find symbol
    Arrays.sort(arr);
    ^
  symbol:   variable Arrays
  location: class Main
2 errors
Language: C

#include<stdio.h>

void swap(int nx, int ny){
    int temp = nx;
    nx = ny;
    ny = temp;
}

void Sort3(int n1, int n2, int n3){
    if (n1 > n2) swap(n1, n2);
    if (n2 > n3) swap(n2, n3);
    if (n1 > n2) swap(n1, n2);
}

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


Compiler output:
main.c: In function 'main':
main.c:18:15: error: expected declaration specifiers or '...' before '&' token
   18 |     int Sort3(&a, &b, &c);
      |               ^
main.c:18:19: error: expected declaration specifiers or '...' before '&' token
   18 |     int Sort3(&a, &b, &c);
      |                   ^
main.c:18:23: error: expected declaration specifiers or '...' before '&' token
   18 |     int Sort3(&a, &b, &c);
      |                       ^
Language: C


#include<stdio.h>

void swap(int nx, int ny){
    int temp = nx;
    nx = ny;
    ny = temp;
}

void Sort3(int n1, int n2, int n3){
    if (n1 > n2) swap(n1, n2);
    if (n2 > n3) swap(n2, n3);
    if (n1 > n2) swap(n1, n2);
}

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


Compiler output:
main.c: In function 'main':
main.c:19:15: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&a, &b, &c);
      |               ^
main.c:19:19: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&a, &b, &c);
      |                   ^
main.c:19:23: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&a, &b, &c);
      |                       ^
main.c:20:5: error: 'na' undeclared (first use in this function); did you mean 'a'?
   20 |     na = 0;
      |     ^~
      |     a
main.c:20:5: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.Scanner;
public class atcoder103_1 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc =new Scanner(System.in);
		int n[]=new int[3];
		int t=0;
		int ans=0;
		for(int i=0;i<3;i++){
			n[i]=sc.nextInt();
		}
		for(int j=0;j<2;j++){
			for(int i=0;i<2-j;i++){
				if(n[i+1]-n[i]<0){
					t=n[i];
					n[i]=n[i+1];
					n[i+1]=t;
				}
			}
		}
		for(int i=0;i<2;i++){
			ans+=n[i+1]-n[i];
		}
		System.out.println(ans);
	}

}



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


#include<stdio.h>

void swap(int nx, int ny){
    int temp = nx;
    nx = ny;
    ny = temp;
}

void Sort3(int n1, int n2, int n3){
    if (n1 > n2) swap(n1, n2);
    if (n2 > n3) swap(n2, n3);
    if (n1 > n2) swap(n1, n2);
}

int main (){
    int na, nb, nc;
    scanf("%d %d %d", &na, &nb, &nc);
    int Sort3(&na, &nb, &nc);
    na = 0;
    int a = nc - nb;
    int b = nb - na;
    printf("%d",na + nb);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:15: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&na, &nb, &nc);
      |               ^
main.c:19:20: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&na, &nb, &nc);
      |                    ^
main.c:19:25: error: expected declaration specifiers or '...' before '&' token
   19 |     int Sort3(&na, &nb, &nc);
      |                         ^
Language: C


#include<stdio.h>

void swap(int nx, int ny){
    int temp = nx;
    nx = ny;
    ny = temp;
}

void Sort3(int n1, int n2, int n3){
    if (n1 > n2) swap(n1, n2);
    if (n2 > n3) swap(n2, n3);
    if (n1 > n2) swap(n1, n2);
}

int main (){
    int na, nb, nc;
    scanf("%d %d %d", &na, &nb, &nc);
    int sort;
    Sort = Sort3;
    int Sort(&na, &nb, &nc);
    na = 0;
    printf(("%d",&nc - &nb) + (&nb - &na));
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:5: error: 'Sort' undeclared (first use in this function); did you mean 'sort'?
   20 |     Sort = Sort3;
      |     ^~~~
      |     sort
main.c:20:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:14: error: expected declaration specifiers or '...' before '&' token
   21 |     int Sort(&na, &nb, &nc);
      |              ^
main.c:21:19: error: expected declaration specifiers or '...' before '&' token
   21 |     int Sort(&na, &nb, &nc);
      |                   ^
main.c:21:24: error: expected declaration specifiers or '...' before '&' token
   21 |     int Sort(&na, &nb, &nc);
      |                        ^
main.c:23:29: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   23 |     printf(("%d",&nc - &nb) + (&nb - &na));
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      |                             |
      |                             long int
In file included from main.c:2:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'long int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{   char s1[101],s2[101];
	int i,j,n,flag,g;
	gets(s1);
	gets(s2);
	n=strlen(s1);
	for(j=0;j<n;j++)
	{
	g=s1[0];flag=0;
	 for(i=0;i<n;i++)
	    s1[i]=s1[i+1];
	 s1[n-1]=g;
	 for(i=0;i<n;i++)
		if(s1[i]==s2[i])
		   flag++;
	 if(flag==n)break;  
	 }
	if(flag==n)
		printf("YES\n");
	else 
		printf("NO\n");
	
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         gets(s1);
      |         ^~~~
      |         getw
Language: C++

#include<cstdio>
#include<iustream>
#include<algorithm>
using namespace std;
int main(void)
{
	int a[1000];
	for(int i=0;i<3;i++){
		cin>>a[i];
	}
	sort(a,a+3);
	int x;
	x=abs(a[1]-a[2]);
	cout<<x<<endl;
	return 0;
}

Compiler output:
a.cc:2:9: fatal error: iustream: No such file or directory
    2 | #include<iustream>
      |         ^~~~~~~~~~
compilation terminated.