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

#include <stdio.h>

#define NUM (100)

void swap(int x, int y, int z) {
	int box[][2] = { x,y,z};
	
	box[][0] = &box[][1];
	box[][1] = &box[][0];
	
	box[][0] = &box[][2];
	box[][2] = &box[][0];
	
}
	

int main(void) {
	char buf[NUM];
	int i = 0,X,Y,Z;
	
	printf("please enter 3 natural numbers.\n");
	
	while(i>2){
		fgets(buf,NUM-1,stdin);
		if(i==0)
		X = atoi(buf);
		if(i==1)
		Y = atoi(buf);
		else
		Z = atoi(buf);
	};
	
	swap(X,Y,Z);
	
	return 0;
}

Compiler output:
main.c: In function 'swap':
main.c:8:13: error: expected expression before ']' token
    8 |         box[][0] = &box[][1];
      |             ^
main.c:9:13: error: expected expression before ']' token
    9 |         box[][1] = &box[][0];
      |             ^
main.c:11:13: error: expected expression before ']' token
   11 |         box[][0] = &box[][2];
      |             ^
main.c:12:13: error: expected expression before ']' token
   12 |         box[][2] = &box[][0];
      |             ^
main.c: In function 'main':
main.c:26:21: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   26 |                 X = atoi(buf);
      |                     ^~~~
Language: C

#include <stdio.h>

#define NUM (100)

void swap(int x, int y, int z) {
	int box[][2] = { x,y,z};
	
	box[][0] = &box[][1];
	box[][1] = &box[][0];
	
	box[][0] = &box[][2];
	box[][2] = &box[][0];
	
}
	

int main(void) {
	char buf[NUM];
	int i = 0,X,Y,Z;
	
	printf("please enter 3 natural numbers.\n");
	
	while(i>2){
		fgets(buf,NUM-1,stdin);
		if(i==0)
		X = atoi(buf);
		if(i==1)
		Y = atoi(buf);
		else
		Z = atoi(buf);
	}
	
	swap(X,Y,Z);
	
	return 0;
}

Compiler output:
main.c: In function 'swap':
main.c:8:13: error: expected expression before ']' token
    8 |         box[][0] = &box[][1];
      |             ^
main.c:9:13: error: expected expression before ']' token
    9 |         box[][1] = &box[][0];
      |             ^
main.c:11:13: error: expected expression before ']' token
   11 |         box[][0] = &box[][2];
      |             ^
main.c:12:13: error: expected expression before ']' token
   12 |         box[][2] = &box[][0];
      |             ^
main.c: In function 'main':
main.c:26:21: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
   26 |                 X = atoi(buf);
      |                     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(void){
	int X,Y,Z;

	cin >> X >> Y >> Z;
	int buff; 
	
    X = buff;
	X = Y;
	Y = buff;

	X = buff;
	X = Z;
	X = buff

	cout << X << Y << Z << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' before 'cout'
   16 |         X = buff
      |                 ^
      |                 ;
   17 | 
   18 |         cout << X << Y << Z << endl;
      |         ~~~~
Language: Java

import java.util.Scanner;

public class A_ABC_Swap {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));
		
		int A, B, C;
		
		int[] arrInt = new int[3];
		int i = 0;
		for (String str : arrStr) {
			arrInt[i] = Integer.parseInt(str);
			i++;
		}
		
		A = arrInt[0];
		B = arrInt[1];
		C = arrInt[2];
		
		int tmp;
		tmp = A;
		A = B;
		B = tmp;
		tmp = A;
		A = C;
		C = tmp;
		
		System.out.println(A + " " + B + " " + C);
	}
}


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

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));
		
		int A, B, C;
		
		int[] arrInt = new int[3];
		int i = 0;
		for (String str : arrStr) {
			arrInt[i] = Integer.parseInt(str);
			i++;
		}
		
		A = arrInt[0];
		B = arrInt[1];
		C = arrInt[2];
		
		int tmp;
		tmp = A;
		A = B;
		B = tmp;
		tmp = A;
		A = C;
		C = tmp;
		
		System.out.println(A + " " + B + " " + C);
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

package test;

import java.util.Scanner;

public class A_ABC_Swap {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);		
		String input = scanner.nextLine();
		scanner.close();
		
		String[] arrStr = (input.split(" ",0));
		
		int A, B, C;
		
		int[] arrInt = new int[3];
		int i = 0;
		for (String str : arrStr) {
			arrInt[i] = Integer.parseInt(str);
			i++;
		}
		
		A = arrInt[0];
		B = arrInt[1];
		C = arrInt[2];
		
		int tmp;
		tmp = A;
		A = B;
		B = tmp;
		tmp = A;
		A = C;
		C = tmp;
		
		System.out.println(A + " " + B + " " + C);
	}
}


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

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

int main() {
  int X,Y,Z,A,B,C;
  cin >> X >> Y >> Z;
  A=0,B=0,C=0;
  cout << A=Z << endl;
  cout << B=X << endl;
  cout << C=Y << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |   cout << A=Z << endl;
      |             ~~^~~~~~~
a.cc:9:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << B=X << endl;
      |             ~~^~~~~~~
a.cc:10:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |   cout << C=Y << endl;
      |             ~~^~~~~~~
Language: C++

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

int main() {
  int X,Y,Z,A,B,C;
  cin >> X >> Y >> Z;
  cout << A=Z << endl;
  cout << B=X << endl;
  cout << C=Y << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout << A=Z << endl;
      |             ~~^~~~~~~
a.cc:8:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    8 |   cout << B=X << endl;
      |             ~~^~~~~~~
a.cc:9:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << C=Y << endl;
      |             ~~^~~~~~~
Language: C++

#include <iostream>
using namespace std;
 
int main(){
  int x,y,z;
  int a,b,c;
  cin >> x;
  cin >> y;
  cin >> z;
  a = z;
  b = x; 
  c = y;
  cout << a << ' ' << b << ' ' << c << endl;
  return();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected primary-expression before ')' token
   14 |   return();
      |          ^
Language: C++

int main(void){
  int x, y, z;
  std::cin << x << ' ' << y << ' ' <<z;
  int a = z;
  int b = x;
  int c = y;
  std::cout << a << ' ' << b << ' ' << c << std::endl;
  return();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: 'cin' is not a member of 'std'
    3 |   std::cin << x << ' ' << y << ' ' <<z;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(void){
a.cc:7:8: error: 'cout' is not a member of 'std'
    7 |   std::cout << a << ' ' << b << ' ' << c << std::endl;
      |        ^~~~
a.cc:7:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:50: error: 'endl' is not a member of 'std'
    7 |   std::cout << a << ' ' << b << ' ' << c << std::endl;
      |                                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(void){
a.cc:8:10: error: expected primary-expression before ')' token
    8 |   return();
      |          ^
Language: Java

import java.util*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    System.out.print(C +" " + A + " " + B);
  }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util*;
                ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
  
  	int a,b,c;
  	cin >> a >> b >> c;
  	
  	a = a ^ b;
  	b = a ^ b;
  	a = a ^ b;
  	
  	a = a ^ c;
  	c = a ^ c;
  	a = a ^ c;
  
  	cout << a << " " << b " " << " " << c << "\n";
  
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: expected ';' before string constant
   18 |         cout << a << " " << b " " << " " << c << "\n";
      |                              ^~~~
      |                              ;
Language: C++

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

int main{
    int a, b, c;
    cin >> a >> b >> c;
    cout << c << a << b;
}


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
    5 |     int a, b, c;
      |     ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin >> a >> b >> c;
      |     ^~~
a.cc:7:5: error: 'cout' does not name a type
    7 |     cout << c << a << b;
      |     ^~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C++

int main(){
  vector<int> boxes;
  int x,y,z;
  cin>>x>>y>>z;
  cout<<z<<' '<<x<<' '<<y<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'vector' was not declared in this scope
    2 |   vector<int> boxes;
      |   ^~~~~~
a.cc:2:10: error: expected primary-expression before 'int'
    2 |   vector<int> boxes;
      |          ^~~
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>x>>y>>z;
      |   ^~~
a.cc:5:3: error: 'cout' was not declared in this scope
    5 |   cout<<z<<' '<<x<<' '<<y<<endl;
      |   ^~~~
a.cc:5:28: error: 'endl' was not declared in this scope
    5 |   cout<<z<<' '<<x<<' '<<y<<endl;
      |                            ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<c" "<<a<<" "<<b<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected ';' before string constant
    6 |   cout<<c" "<<a<<" "<<b<<endl;
      |          ^~~
      |          ;
Language: C++

#include<bits/stdc++.h>
int main()
{
  int a,b,c;
  cin>>a>>b>>c;
  swap(a,b);
  swap(a,c);
  cout<<a<<" "<<b<<" "<<c<<" ";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>a>>b>>c;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:3: error: 'swap' was not declared in this scope
    6 |   swap(a,b);
      |   ^~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/usr/include/c++/14/bits/regex.h:2230:5: note:   'std::__cxx11::swap'
 2230 |     swap(match_results<_Bi_iter, _Alloc>& __lhs,
      |     ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:61,
                 from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
In file included from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/stdexcept:38,
                 from /usr/include/c++/14/system_error:43,
                 from /usr/include/c++/14/bits/ios_base.h:46,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/bits/exception_ptr.h:229:5: note:   'std::__exception_ptr::swap'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
In file included from /usr/include/c++/14/filesystem:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_path.h:736:15: note:   'std::filesystem::__cxx11::swap'
  736 |   inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
      |               ^~~~
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<a<<" "<<b<<" "<<c<<" ";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iosream>
using namespace std;
int main(){
  int a0, a1, a2;
  cin >> a0 >> a1 >> a2;
  cout << a2 << ' ' << a0 << ' '  << a1 << endl;
  return 0;
}

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

/* Author : bitshar */
// #pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
ll MOD = 1e9+7;
 
#define forn(i,e) for(ll i=0; i<e; i++)
#define forsn(i,s,e) for(ll i=s; i<e; i++)
#define rforn(i,e) for(ll i=e; i>=0; i--)
#define rforsn(i,s,e) for(ll i=e; i>=s; i--)
#define ln "\n"
#define sp " "
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define INF 1e18
#define NEGINF -1e18
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
 
#define dbg(x) cout << #x << " = " << x << ln 
#define all(x) x.begin(), x.end()
 
#define out1(x1) cout << x1 << ln
#define out2(x1,x2) cout << x1 << " " << x2 << ln
#define out3(x1,x2,x3) cout << x1 << " " << x2 << " " << x3 << ln
#define out4(x1,x2,x3,x4) cout << x1 << " " << x2 << " " << x3 << " " << x4 << ln
#define out5(x1,x2,x3,x4,x5) cout << x1 << " " << x2 << " " << x3 << " " << x4 << " " << x5 << ln
#define out6(x1,x2,x3,x4,x5,x6) cout << x1 << " " << x2 << " " << x3 << " " << x4 << " " << x5 << " " << x6 << ln
 
#define in1(x1) cin >> x1
#define in2(x1,x2) cin >> x1 >> x2
#define in3(x1,x2,x3) cin >> x1 >> x2 >> x3
#define in4(x1,x2,x3,x4) cin >> x1 >> x2 >> x3 >> x4
#define in5(x1,x2,x3,x4,x5) cin >> x1 >> x2 >> x3 >> x4 >> x5
#define in6(x1,x2,x3,x4,x5,x6) cin >> x1 >> x2 >> x3 >> x4 >> x5 >> x6
 
#define arrin(a,n) forn(i,n) cin >> a[i];
#define arrout(a,n) forn(i,n) {cout << a[i] << " ";} cout << ln;
 
void solve() {
 
    ll x,y,x;
    cin >> x >> y >> z;
    out3(y,x,z);
}
 
int main() {
    
    #ifdef DEBUG_MODE
    freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    #endif
    fio;
    int t=1;
    //cin >> t;
    while(t--) {
        solve();
    }
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:50:12: error: redeclaration of 'll x'
   50 |     ll x,y,x;
      |            ^
a.cc:50:8: note: 'll x' previously declared here
   50 |     ll x,y,x;
      |        ^
a.cc:51:22: error: 'z' was not declared in this scope
   51 |     cin >> x >> y >> z;
      |                      ^
Language: C++

// ConsoleApplication1.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//

#include "pch.h"
#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
	int a, b, c;
	int tmp;
	cin >> a;
	cin >> b;
	cin >> c;
	tmp = a;
	a = b;
	b = tmp;
	tmp = c;
	c = a;
	a = tmp;
	cout << a;
	cout << b;
	cout << c;

}

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

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll a,b,c;
    cin>>a>>b>>c;
    ll temp1;
    ll temp2;
    temp1=b;
    b=a;
    a=temp1;
    temp2=c;
    c=a;
    a=temp2;
    cout<<a" "<<b" "<<c" "<<"\n";


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: expected ';' before string constant
   18 |     cout<<a" "<<b" "<<c" "<<"\n";
      |            ^~~
      |            ;
Language: C

#include <stdio.h>

int main()
{
	int a, b, c;
	int temp;

	scanf_s("%d %d %d", &a, &b, &c);

	temp = a;
	a = b;
	b = temp;
	temp = a;
	a = c;
	c = temp;

	printf("%d %d %d\n", a, b, c);

	return 0;
}

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

#include<stdio.h>

using namespace std;

int main()
{
	int x,y,z;
  cin>>x>>y>>z;
  cout<<z<<' '<<x<<' '<<y;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   cin>>x>>y>>z;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | 
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout<<z<<' '<<x<<' '<<y;
      |   ^~~~
a.cc:9:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringJoiner;

public class Main{
    public static void main(String[] args){
        InputStreamReader inputStreamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
        String input = bufferedReader.readLine();
        String inputs[] = input.split(" ");
        String result = String.join(" ", inputs[2], inputs[0], inputs[1]);
        System.out.println(result);
    }
}

Compiler output:
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
        String input = bufferedReader.readLine();
                                              ^
1 error
Language: C++

#include <bits/stdc++.h>

//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//#pragma GCC optimize("Ofast")
//1.0 * clock() / CLOCKS_PER_SEC

#define fi first
#define se second
#define ll long long
#define dl double long

using namespace std;

const ll NN = 1e10 + 7;
const int N = 5e5 + 7;
const int M = 11;
const ll mod = 1e9 + 7;
const ll inf = 1e18 + 7;
const dl rf = 1e-14;

void solve1()
{
    int a,b,c;
    cin >> a >> b >> c;
    swap( a , b );
    swap( a , c );
    cout << a << " " << b < " " << c;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0); srand(time(0));
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int cghf = 1;//cin >> cghf;
    while( cghf-- ){
        solve1();
    }
}


Compiler output:
a.cc: In function 'void solve1()':
a.cc:27:33: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator<<'
   27 |     cout << a << " " << b < " " << c;
      |                             ~~~ ^~ ~
      |                             |      |
      |                             |      int
      |                             const char [2]
Language: Java

import java.util.*;

public class Swap {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int y = scanner.nextInt();
        int z = scanner.nextInt();
        System.out.println(z + " " + x + " " + y);
        scanner.close();
    }
}


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

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

int main() {
  int X, Y,Z;
  cin >> x >> Y >> Z;
  
  swap(X,Y);
  swap(X,Z);
  
  cout << X << " " << Y << " " << Z <<endl;
  
}


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

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

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

#define endl '\n'
#define len(x) (int)x.size()
#define rep(a, b, i) for (int i = a; i < b; i++)
#define repi(a, b, i) for (int i = a; i > b; i--)
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define binary_search
#define mem(a, b) memset(a, b, sizeof(a))
#define all(x) (x).begin(), (x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define __                                                                                                             \
    ios_base::sync_with_stdio(false);                                                                                  \
    cin.tie(0);                                                                              
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3fLL;
const ld PI = 3.141592653589793;
const int MAXN = 1e5 + 5;

int32_t main() {
    #ifndef ONLINE_JUDGE
        freopen("in", "r", stdin);
        freopen("out", "w", stdout);
    #endif
    __;

	int a, b, c; 
	cin >> a >> b >> c;
	swap(a, c);
	swap(a, b)
	
	cout << a << " " << b << " " << c;

    return 0;
}


















Compiler output:
a.cc: In function 'int32_t main()':
a.cc:51:19: error: expected ';' before 'cout'
   51 |         swap(a, b)
      |                   ^
      |                   ;
   52 | 
   53 |         cout << a << " " << b << " " << c;
      |         ~~~~
Language: C++

  1 #include<bits/stdc++.h>←
  2 using namespace std;←
  3 ←
  4 int main(){←
  5 ≫‐int x, y, z;←
  6 ≫‐cin >> x >> y >> z;←
  7 ≫‐printf("%d %d %d\n", z, x, y);←
  8 ≫‐return 0;←
  9 }←
~           

Compiler output:
a.cc:1:5: error: stray '#' in program
    1 |   1 #include<bits/stdc++.h>←
      |     ^
a.cc:1:28: error: extended character ← is not valid in an identifier
    1 |   1 #include<bits/stdc++.h>←
      |                            ^
a.cc:2:25: error: extended character ← is not valid in an identifier
    2 |   2 using namespace std;←
      |                         ^
a.cc:3:5: error: extended character ← is not valid in an identifier
    3 |   3 ←
      |     ^
a.cc:4:16: error: extended character ← is not valid in an identifier
    4 |   4 int main(){←
      |                ^
a.cc:5:5: error: extended character ≫ is not valid in an identifier
    5 |   5 ≫‐int x, y, z;←
      |     ^
a.cc:5:5: error: extended character ‐ is not valid in an identifier
a.cc:5:19: error: extended character ← is not valid in an identifier
    5 |   5 ≫‐int x, y, z;←
      |                   ^
a.cc:6:5: error: extended character ≫ is not valid in an identifier
    6 |   6 ≫‐cin >> x >> y >> z;←
      |     ^
a.cc:6:5: error: extended character ‐ is not valid in an identifier
a.cc:6:26: error: extended character ← is not valid in an identifier
    6 |   6 ≫‐cin >> x >> y >> z;←
      |                          ^
a.cc:7:5: error: extended character ≫ is not valid in an identifier
    7 |   7 ≫‐printf("%d %d %d\n", z, x, y);←
      |     ^
a.cc:7:5: error: extended character ‐ is not valid in an identifier
a.cc:7:37: error: extended character ← is not valid in an identifier
    7 |   7 ≫‐printf("%d %d %d\n", z, x, y);←
      |                                     ^
a.cc:8:5: error: extended character ≫ is not valid in an identifier
    8 |   8 ≫‐return 0;←
      |     ^
a.cc:8:5: error: extended character ‐ is not valid in an identifier
a.cc:8:16: error: extended character ← is not valid in an identifier
    8 |   8 ≫‐return 0;←
      |                ^
a.cc:9:6: error: extended character ← is not valid in an identifier
    9 |   9 }←
      |      ^
a.cc:1:3: error: expected unqualified-id before numeric constant
    1 |   1 #include<bits/stdc++.h>←
      |   ^
a.cc:2:25: error: '\U00002190' does not name a type
    2 |   2 using namespace std;←
      |                         ^
a.cc:9:6: error: '\U00002190' does not name a type
    9 |   9 }←
      |      ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int X,Y,Z;
cin>>X>>Y>>Z;
cout << Z <<' ' << X << ' ' << Y;
return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected '}' at end of input
    8 | return 0;
      |          ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int X,Y,Z;
  int>>X>>Y>>z;
  cout<<Z<<X<<Y;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected unqualified-id before '>>' token
    6 |   int>>X>>Y>>z;
      |      ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X,Y,Z;
  cin >> X >> Y >> Z;
  cout << Z << <<  X << << Y << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '<<' token
    7 |   cout << Z << <<  X << << Y << endl;
      |                ^~
a.cc:7:25: error: expected primary-expression before '<<' token
    7 |   cout << Z << <<  X << << Y << endl;
      |                         ^~
Language: Java

// "static void main" must be defined in a public class.
public class Main {
    public static void main(String[] args) {
        int x = sc.nextInt();
        int y = sc.nextInt();
        int z = sc.nextInt();
        
        System.out.println(z+" "+x+" "+y);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        int x = sc.nextInt();
                ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
        int y = sc.nextInt();
                ^
  symbol:   variable sc
  location: class Main
Main.java:6: error: cannot find symbol
        int z = sc.nextInt();
                ^
  symbol:   variable sc
  location: class Main
3 errors
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a = 0, b =0, c= 0;
  cin >> a >> b >> c;
  int tmp1 = a;
  a = b;
  b = tmp;
  
  int tmp2 = a;
  a = c;
  c = tmp2;
  
  cout << a << b << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'tmp' was not declared in this scope; did you mean 'tmp1'?
    9 |   b = tmp;
      |       ^~~
      |       tmp1
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int a,b,c,temp;
  cin>>a>>b>>c;
  temp=a;
  a=c;
  c=b;
  b=temp;
  cout<<a<<" "<<b<<" "<<c;
}
 return 0;

Compiler output:
a.cc:12:2: error: expected unqualified-id before 'return'
   12 |  return 0;
      |  ^~~~~~
Language: Java

public class Main
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int x = key.nextInt();
        int y = key.nextInt();
        int z = key.nextInt();
        int temp = 0;
        
        temp = x;
        x = y;
        y = temp;
        temp = x;
        x = z;
        z = temp;

        System.out.println(x+" " + y + " "+ z);
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
        Scanner key = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
        Scanner key = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Solution
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int x = key.nextInt();
        int y = key.nextInt();
        int z = key.nextInt();
        int temp = 0;
        
        temp = x;
        x = y;
        y = temp;
        temp = x;
        x = z;
        z = temp;

        System.out.println(x+" " + y + " "+ z);
    }
}

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

import java.util.Scanner;

public class Solution
{
    public static void main(String [] args)
    {
        Scanner key = new Scanner(System.in);
        int x = key.nextInt();
        int y = key.nextInt();
        int z = key.nextInt()
        int temp = 0;
        
        temp = x;
        x = y;
        y = temp;
        temp = x;
        x = z;
        z = temp;

        System.out.println(x+" " + y + " "+ z);
    }
}

Compiler output:
Main.java:10: error: ';' expected
        int z = key.nextInt()
                             ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int<a,b,c,<endl;
  cout<c,a,b<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'int' is not a template
    5 |   int<a,b,c,<endl;
      |   ^~~
a.cc:5:7: error: 'a' was not declared in this scope
    5 |   int<a,b,c,<endl;
      |       ^
a.cc:5:9: error: 'b' was not declared in this scope
    5 |   int<a,b,c,<endl;
      |         ^
a.cc:5:11: error: 'c' was not declared in this scope
    5 |   int<a,b,c,<endl;
      |           ^
a.cc:5:14: error: declaration does not declare anything [-fpermissive]
    5 |   int<a,b,c,<endl;
      |              ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int<a,b,c,<endl;
      |   ^~~
Language: C++

#include <iostream>
using namsespace std;

int main(){
  int x,y,z;
  cin >> x >> y >> z;
  cout << z << " " << x << " " << y; 
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namsespace'
    2 | using namsespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> x >> y >> z;
      |   ^~~
      |   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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << z << " " << x << " " << y;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

int a , b, c;

  scanf("%d %d %d",&a,&b,&c);

  int temp = b;
  b = a;
  a = c;
  c = temp;
  

  printf("%d %d %d",a,b,c);

  return 0;
}

Compiler output:
main.c:3:9: error: expected declaration specifiers or '...' before string constant
    3 |   scanf("%d %d %d",&a,&b,&c);
      |         ^~~~~~~~~~
main.c:3:20: error: expected declaration specifiers or '...' before '&' token
    3 |   scanf("%d %d %d",&a,&b,&c);
      |                    ^
main.c:3:23: error: expected declaration specifiers or '...' before '&' token
    3 |   scanf("%d %d %d",&a,&b,&c);
      |                       ^
main.c:3:26: error: expected declaration specifiers or '...' before '&' token
    3 |   scanf("%d %d %d",&a,&b,&c);
      |                          ^
main.c:5:14: error: initializer element is not constant
    5 |   int temp = b;
      |              ^
main.c:6:3: warning: data definition has no type or storage class
    6 |   b = a;
      |   ^
main.c:6:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:6:7: error: initializer element is not constant
    6 |   b = a;
      |       ^
main.c:7:3: warning: data definition has no type or storage class
    7 |   a = c;
      |   ^
main.c:7:3: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:7:7: error: initializer element is not constant
    7 |   a = c;
      |       ^
main.c:8:3: warning: data definition has no type or storage class
    8 |   c = temp;
      |   ^
main.c:8:3: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:8:7: error: initializer element is not constant
    8 |   c = temp;
      |       ^~~~
main.c:11:10: error: expected declaration specifiers or '...' before string constant
   11 |   printf("%d %d %d",a,b,c);
      |          ^~~~~~~~~~
main.c:11:21: error: expected declaration specifiers or '...' before 'a'
   11 |   printf("%d %d %d",a,b,c);
      |                     ^
main.c:11:23: error: expected declaration specifiers or '...' before 'b'
   11 |   printf("%d %d %d",a,b,c);
      |                       ^
main.c:11:25: error: expected declaration specifiers or '...' before 'c'
   11 |   printf("%d %d %d",a,b,c);
      |                         ^
main.c:13:3: error: expected identifier or '(' before 'return'
   13 |   return 0;
      |   ^~~~~~
main.c:14:1: error: expected identifier or '(' before '}' token
   14 | }
      | ^
Language: C++

#include<iostrea>

using namespace std;

int main () {
  int a, b, c;
  cin >> a >> b >> c;
  cout << c << a << b << endl;
  return 0;
}

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

#include<iostream>
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<c<<' '<<a<<' '<<b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>a>>b>>c;
      |   ^~~
      |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<c<<' '<<a<<' '<<b;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

int a,b,c,tmp;
 
int main(){
	cin >> a>>b>>c;
  	tmp = a;
  	a = b;
  	b = tmp;
  	tmp = a;
  	c = a;
  	a = tmp;
  	cout <<a<<b<,c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected primary-expression before ',' token
   14 |         cout <<a<<b<,c<<endl;
      |                     ^
a.cc:14:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   14 |         cout <<a<<b<,c<<endl;
      |                      ~^~~~~~
Language: C++

int a,b,c,tmp;
 
int main(){
	cin >> a>>b>>c;
  	tmp = a;
  	a = b;
  	b = tmp;
  	tmp = a;
  	c = a;
  	a = tmp;
  	cout <<a<<b<,c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> a>>b>>c;
      |         ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout <<a<<b<,c<<endl;
      |         ^~~~
a.cc:11:21: error: expected primary-expression before ',' token
   11 |         cout <<a<<b<,c<<endl;
      |                     ^
a.cc:11:25: error: 'endl' was not declared in this scope
   11 |         cout <<a<<b<,c<<endl;
      |                         ^~~~
Language: C++

int a,b,c,tmp;

void main(){
	cin >> a>>b>>c;
  	tmp = a;
  	a = b;
  	b = tmp;
  	tmp = a;
  	c = a;
  	a = tmp;
  	cout <<a<<b<,c<<endl;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> a>>b>>c;
      |         ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout <<a<<b<,c<<endl;
      |         ^~~~
a.cc:11:21: error: expected primary-expression before ',' token
   11 |         cout <<a<<b<,c<<endl;
      |                     ^
a.cc:11:25: error: 'endl' was not declared in this scope
   11 |         cout <<a<<b<,c<<endl;
      |                         ^~~~
Language: Java

//https://atcoder.jp/contests/abc161/tasks/abc161_a

import java.util.Scanner;

public class ABCSwap {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int tmp;
		//箱に入っている整数の読み込み
		int box_a = sc.nextInt();
		int box_b = sc.nextInt();
		int box_c = sc.nextInt();
		
		tmp = box_a;
		box_a = box_b;
		box_b = tmp;
		
		tmp = box_a;
		box_a = box_c;
		box_c = tmp;
		
		System.out.println(box_a + " " + box_b + " " + box_c);
	}
	
	
// プリミティブ型の入れ替えの方法わからん。。。
// 	private static void _swap(Integer i1, Integer i2) {
// 		int tmp;
// 		
// 		tmp = i1.intValue();
// 		i1 = i2;
// 		i2 = tmp;
// 	}
}


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

#include <bits/c++.h>
using namespace std;
int main(){
  int x,y,z;
  cin >> x >> y >> z;
  cout << z << x << y << endl;
}


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

#include <iostream>
using namespace std;

int main(){
int x,y,z;
  cin >> x,y,z;
  int h;
  h=x;
  x=z;
  z=y;
  y=h;
  cout << x" "y" "z<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before user-defined string literal
   12 |   cout << x" "y" "z<<endl;
      |            ^~~~
      |            ;
Language: C++

#include<bits/stdc++.h>
usingn namespace std;
signed main(){
	int a,b,c;
  cin>>a>>b>>c;
  cout<<c<<" "<<a<<" "<<b<<endl;
}

Compiler output:
a.cc:2:1: error: 'usingn' does not name a type
    2 | usingn namespace std;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>a>>b>>c;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout<<c<<" "<<a<<" "<<b<<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:6:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout<<c<<" "<<a<<" "<<b<<endl;
      |                            ^~~~
      |                            std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.>
usingn namespace std;
signed main(){
	int a,b,c;
  cin>>a>>b>>c;
  cout<<c<<" "<<a<<" "<<b<<endl;
}

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

#include <iostreram>
using namespace std;
int main(){
  int x, y, z;
  cin >> x >> y >> z;
  int t;
  t = x;
  x = y;
  y = t;
  t = x;
  x = z;
  z = t;
  cout << x << " " << y << " " << z;
  return 0;
}

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

public class A_ABCSwap{

    public static void main(String[] args) {
        int X = Integer.parseInt(args[0]);
        int Y = Integer.parseInt(args[1]);
        int Z = Integer.parseInt(args[2]);

        A_ABCSwap abcSwap = new A_ABCSwap();

        int temp[] = abcSwap.swap(X,Y);
        X = temp[0]; Y = temp[1];

        temp = abcSwap.swap(X,Z);
        X = temp[0]; Z = temp[1];

        System.out.print(X + " " + Y + " " + Z);
    }
    
    public int[] swap(int a, int b){
        int newa = b;
        int newb = a;
        int ret[] = new int[2];
        ret[0]=newa; ret[1]=newb;
        return ret;
    }



}

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

#include <iostream>
#include <math.h>
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define inf std::numeric_limits<double>::infinity()
#define DECI(n) fixed<<showpoint<<setprecision(n)
#define MOD 1000000007LL
#define FOR(i,start,end) for (int i=start;i<end;i++)
#define FORR(i,end,start) for(int i=end-1;i>start;i--)
#define INPUT(arr,n) FOR(i,0,n) cin>>arr[i];
#define INPUT2d(arr,n,k) FOR(i,0,n) FOR(j,0,k) cin>>arr[i][j];
#define SIZE 100005
#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX(a,b) ((a)>(b)?(a):(b))









int main(){
int n,m;
cin>>n>>m;
int a[n];
int sum=0;
for(int i=0;i<n;i++) {
    cin>>a[i];   
}

  for(int i=0;i<n;i++) {
    sum+=a[i];
    
}
  int flag=0;
  sort(a,a+n);
  reverse(a,a+n);
int c=(sum)/(4*m);
  
f
    if(a[m-1]<c){
        cout<<"No"<<endl;
      
    }
    else {
        cout<<"Yes"<<endl;
     
    }



return 0;
}








Compiler output:
a.cc: In function 'int main()':
a.cc:43:1: error: 'f' was not declared in this scope
   43 | f
      | ^
a.cc:48:5: error: 'else' without a previous 'if'
   48 |     else {
      |     ^~~~
Language: C++

#include<bits/stdc++.h> 
using namespace std;
int main(int args, char** argv){
  vector<int>arr(3);
  for(int i=0;i<3;i++){
    cin>>arr[i];
  }
  int li=0;
  int hi=arr.size()-1;
  int temp=arr[li];
  arr[li]=arr[hi];
  arr[2]=temp;
  for(int val:arr){
    cout<<val<<" ";  
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:3:32: note: to match this '{'
    3 | int main(int args, char** argv){
      |                                ^
Language: C++

#include <bits/stdc++. h> 
using namespace std;
int main(int args, char** argv){
  vector<int>arr(3);
  for(int i=0;i<3;i++){
    cin>>arr[i];
  }
  int li=0;
  int hi=arr.size()-1;
  int temp=arr[li];
  arr[li]=arr[hi];
  arr[2]=temp;
  for(int val:arr){
    cout<<val<<" ";  
  return 0;
}

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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		int z = sc.nextInt();
      int aux=a,aux1=c;
      a=b;
      b=aux;
      c=a;
      a=aux1;
		System.out.println((a+""+b+""+c));
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
      int aux=a,aux1=c;
              ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
      int aux=a,aux1=c;
                     ^
  symbol:   variable c
  location: class Main
Main.java:9: error: cannot find symbol
      a=b;
      ^
  symbol:   variable a
  location: class Main
Main.java:9: error: cannot find symbol
      a=b;
        ^
  symbol:   variable b
  location: class Main
Main.java:10: error: cannot find symbol
      b=aux;
      ^
  symbol:   variable b
  location: class Main
Main.java:11: error: cannot find symbol
      c=a;
      ^
  symbol:   variable c
  location: class Main
Main.java:11: error: cannot find symbol
      c=a;
        ^
  symbol:   variable a
  location: class Main
Main.java:12: error: cannot find symbol
      a=aux1;
      ^
  symbol:   variable a
  location: class Main
Main.java:13: error: cannot find symbol
		System.out.println((a+""+b+""+c));
		                    ^
  symbol:   variable a
  location: class Main
Main.java:13: error: cannot find symbol
		System.out.println((a+""+b+""+c));
		                         ^
  symbol:   variable b
  location: class Main
Main.java:13: error: cannot find symbol
		System.out.println((a+""+b+""+c));
		                              ^
  symbol:   variable c
  location: class Main
11 errors
Language: C++

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

void swap(int arr[])
{
  int temp =0;
  temp = arr[0];
  arr[0] = arr[2];
  arr[2] = arr[1];
  arr[1] = temp;
}
  
void printArray(int arr[])
{
  for(int i=0; i<3, i++)
    cout << arr[i] << " ";
}

int main()
{
  int arr[3];
  for(int i=0; i<3; i++)
  	cin >> arr[i];
  swap(arr);
  printArray(arr);
  return 0;
}

Compiler output:
a.cc: In function 'void printArray(int*)':
a.cc:15:24: error: expected ';' before ')' token
   15 |   for(int i=0; i<3, i++)
      |                        ^
      |                        ;
Language: C

clude<stdio.h>
 
int main(){
  int a,b,c;
  scanf("%d%d%d",&a,&b,&c);
  
  printf("%d%d%d\n",a,b,c);
  
  return 0;
}

Compiler output:
main.c:1:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | clude<stdio.h>
      |      ^
Language: C

#include<stdio.h>

int main(){
  int a,b,c;
  scanf("%d%d%d",a,b,c):
  
  printf("%d %d %d",c,a,b);
  
}

Compiler output:
main.c: In function 'main':
main.c:5:24: error: expected ';' before ':' token
    5 |   scanf("%d%d%d",a,b,c):
      |                        ^
      |                        ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int i,n,m;
cin>>n>>m;
int a[n];
int s=0;
for(i,0,n){
    cin>>a[i];
    s+=a[i];
}
int x=(1/4)*s,ans=0;
for(i,0,n){
    if(a[i]>=x) ans++;
}

return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected ';' before ')' token
    8 | for(i,0,n){
      |          ^
      |          ;
a.cc:12:14: error: expected ';' before ',' token
   12 | int x=(1/4)*s,ans=0;
      |              ^
      |              ;
a.cc:12:14: error: expected primary-expression before ',' token
a.cc:12:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 | int x=(1/4)*s,ans=0;
      |               ^~~
      |               abs
a.cc:12:20: error: expected ')' before ';' token
   12 | int x=(1/4)*s,ans=0;
      |                    ^
      |                    )
a.cc:8:4: note: to match this '('
    8 | for(i,0,n){
      |    ^
a.cc:13:10: error: expected ';' before ')' token
   13 | for(i,0,n){
      |          ^
      |          ;
a.cc:17:1: error: expected primary-expression before 'return'
   17 | return 0;
      | ^~~~~~
a.cc:15:2: error: expected ';' before 'return'
   15 | }
      |  ^
      |  ;
   16 | 
   17 | return 0;
      | ~~~~~~
a.cc:17:1: error: expected primary-expression before 'return'
   17 | return 0;
      | ^~~~~~
a.cc:15:2: error: expected ')' before 'return'
   15 | }
      |  ^
      |  )
   16 | 
   17 | return 0;
      | ~~~~~~
a.cc:13:4: note: to match this '('
   13 | for(i,0,n){
      |    ^
Language: C++

#include<bits/stdc++.h>
#define for(i,0,n) for(i=i0;i<n;i++)
#define vector<int> vi
#define push_back pb
#define long long ll
using namespace std;
int main(){
int x,y,z;
cin>>x>>y>>z;
cout<<z<<x<<y<<endl;
return 0;
}
  

Compiler output:
a.cc:2:15: error: expected parameter name, found "0"
    2 | #define for(i,0,n) for(i=i0;i<n;i++)
      |               ^
a.cc:3:9: warning: ISO C++11 requires whitespace after the macro name
    3 | #define vector<int> vi
      |         ^~~~~~