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

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

int main(){
  int A;
  cin >> A;
  int P;
  cin >> P;
  
  int a = A/3
    
  cout << (a+P)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'cout'
   12 |   cout << (a+P)/2 << endl;
      |   ^~~~
Language: C++

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

int main(){
  int A;
  cin >> A;
  int P;
  cin >> P;
  
  int ap = A/3
    
    cout << (ap+P)/2 << endl;
}

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

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

int main(){
  int A;
  cin >> A;
  int P;
  cin >> P;
  
  int ap = A/3
    
    cout << (ap+P)/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'cout'
   12 |     cout << (ap+P)/2 << endl;
      |     ^~~~
a.cc:12:30: error: expected '}' at end of input
   12 |     cout << (ap+P)/2 << endl;
      |                              ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

//c++
#include<iostream>
#include<string>
using namespace std;

int main()
{
  int a;
  int b;
  int c;
  int d;
  
  cin >> a;
  cin >> b;
  
  c = a / 3;
  d = (b + c) / 2;
  
  cout<<d<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected '}' at end of input
   19 |   cout<<d<<endl;
      |                 ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

//c++
#include<iostream>
#include<string>
using namespace std;

int main()
{
  int a;
  int b;
  int c;
  int d
  
  cin >> a;
  cin >> b;
  
  c = a / 3;
  d = (b + c) / 2;
  
  cout<<d<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected initializer before 'cin'
   13 |   cin >> a;
      |   ^~~
a.cc:17:3: error: 'd' was not declared in this scope
   17 |   d = (b + c) / 2;
      |   ^
a.cc:19:17: error: expected '}' at end of input
   19 |   cout<<d<<endl;
      |                 ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

#include <iostream>

using namespace std;

int main(){
  int a, p, c;
  cin >> a >> p;
  
  c =(3*a + p)/2
    
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before 'cout'
    9 |   c =(3*a + p)/2
      |                 ^
      |                 ;
   10 | 
   11 |   cout << c << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, P;
  cin >> A >> P;
  cout << (3A + P) / 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: unable to find numeric literal operator 'operator""A'
    6 |   cout << (3A + P) / 2 << endl;
      |            ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, P;
  cin >> A >> P;
  cout << (3A + B) / 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: unable to find numeric literal operator 'operator""A'
    6 |   cout << (3A + B) / 2 << endl;
      |            ^~
a.cc:6:17: error: 'B' was not declared in this scope
    6 |   cout << (3A + B) / 2 << endl;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, P;
  cin >> A >> P;
  cout << (3A + 2B) / 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: unable to find numeric literal operator 'operator""A'
    6 |   cout << (3A + 2B) / 2 << endl;
      |            ^~
a.cc:6:17: error: unable to find numeric literal operator 'operator""B'
    6 |   cout << (3A + 2B) / 2 << endl;
      |                 ^~
Language: C++

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

int main() {
  int A,P;
  cin >> A >> P;
  cout << (A*3+P)/2 << endl;
}#include <bits/stdc++.h>
using namespace std;

int main() {
  int A,P;
  cin >> A >> P;
  cout << (A*3+P)/2 << endl;
}

Compiler output:
a.cc:8:2: error: stray '#' in program
    8 | }#include <bits/stdc++.h>
      |  ^
a.cc:8:3: error: 'include' does not name a type
    8 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:11:5: error: redefinition of 'int main()'
   11 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a , p;
  cin >> a >> p;
  //a = 3 p
  //2p =apple pie
  int applepie =(3*a+p)/2
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected ',' or ';' before '}' token
    9 | }
      | ^
Language: C++

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

int main() {
int A;
  int P ;
  cin>>A>>P;
  if((3A+P)%2==0){
    cout<<(3A+P)/2<<endl;
  }
    else if((3A+P)%2==1){
      cout<<(3A+P-1)/2<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: unable to find numeric literal operator 'operator""A'
    8 |   if((3A+P)%2==0){
      |       ^~
a.cc:9:12: error: unable to find numeric literal operator 'operator""A'
    9 |     cout<<(3A+P)/2<<endl;
      |            ^~
a.cc:11:14: error: unable to find numeric literal operator 'operator""A'
   11 |     else if((3A+P)%2==1){
      |              ^~
a.cc:12:14: error: unable to find numeric literal operator 'operator""A'
   12 |       cout<<(3A+P-1)/2<<endl;
      |              ^~
Language: Java

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

public class ABC128B {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		String[] S = new String[N];
		int[] P = new int[N];
		String[] sp = new String[N];
		for(int i=0;i<N;i++){
			S[i]=sc.next();
			P[i]=sc.nextInt();
			sp[i]=S[i]+"_"+(10100-P[i])+"_"+(i+1);
		}
		sc.close();

		Arrays.sort(sp);

		for(String s2:sp){
			String ans=s2.split("_")[2];
			System.out.println(ans);
		}

	}

}

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

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

public class Main0128_A {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		long[] tmp = toLongArray(in);
		System.out.println((tmp[0]*3+tmp[1])/2);

	}

	public static String[] readLineArray(BufferedReader in) throws Exception{
		return in.readLine().split(" ");
	}

	public static long[] toLongArray(String[] tmp) throws Exception{
		long[] ret = new long[tmp.length];
		for(int i=0;i<tmp.length;i++){
			ret[i] = Long.parseLong(tmp[i]);
		}
		return ret;
	}
	public static long[] toLongArray(BufferedReader in) throws Exception{
		return toLongArray(readLineArray(in));
	}
	public static String readLine(BufferedReader in) throws Exception{
		return in.readLine();
	}
	public static long toLong(String tmp) throws Exception{
		long ret = Long.parseLong(tmp);
		return ret;
	}
	public static long toLong(BufferedReader in) throws Exception{
		return toLong(readLine(in));
	}



}


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

#include<iostream>
using namespace std;
int main()
{
  int A, P;
  cin >> A >> P;
  cout << (A*3 + P)/2 << endl;
  return 0;
}

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

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

int main() {

int a,b;
  cin >> a >> b ;

  int ans ;
  ans = (3*a +b )/2
    cout << ans << endl ;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before 'cout'
   10 |   ans = (3*a +b )/2
      |                    ^
      |                    ;
   11 |     cout << ans << endl ;
      |     ~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int main() {

  int A ,P; cin >> A >> P;
  int num;num = A*3+P;
  cout << numn/2;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'numn' was not declared in this scope; did you mean 'num'?
    9 |   cout << numn/2;
      |           ^~~~
      |           num
Language: C++

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

int main(){
    int a,p: cin >> a >> p;
    cout << (a*3+p)/2 << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: found ':' in nested-name-specifier, expected '::'
    5 |     int a,p: cin >> a >> p;
      |            ^
      |            ::
a.cc:5:11: error: 'p' has not been declared
    5 |     int a,p: cin >> a >> p;
      |           ^
a.cc:5:18: error: qualified-id in declaration before '>>' token
    5 |     int a,p: cin >> a >> p;
      |                  ^~
a.cc:6:18: error: 'p' was not declared in this scope
    6 |     cout << (a*3+p)/2 << endl;
      |                  ^
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

const long long MOD = 1000000007LL;
const long long INF = 1e18;

int GCD(int a, int b){return b == 0 ? a : GCD(b, a % b);}
long long fast_exp(long long base, long long exp, long long mod = MOD) {
    long long tot = 1;
    for(;exp > 0;exp >>= 1) {
       if((exp & 1) == 1) tot = tot * base % mod;
       base = base * base % mod;
    }
    return tot;
}
long long mult_mod(long long base, long long exp, long long mod = MOD) {
    long long tot = 0;
    for(;exp > 0;exp >>= 1){
       if((exp & 1) == 1) tot = (tot + base) % mod;
       base = base * 2 % mod;
    }
    return tot;
}

struct chash {
    static uint64_t splitmix64(uint64_t x) {x += 0x8e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf54876d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049bb133111eb; return x ^ (x >> 31);}
    size_t operator()(uint64_t x) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); return splitmix64(x + FIXED_RANDOM);}
    size_t operator()(pair<uint64_t,uint64_t> x) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); return splitmix64(x.first + FIXED_RANDOM)^(splitmix64(x.second + FIXED_RANDOM) >> 1);}
};

int main(){

    cin.sync_with_stdio(0); cin.tie(0); cout.tie(0);

    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    int a, p; cin >> a >> b;
  	
  	cout << (p + a * 3) / 2;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:27: error: 'b' was not declared in this scope
   40 |     int a, p; cin >> a >> b;
      |                           ^
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <queue>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
//typedef pair<int, int> P;
const int c_INF = 111111111;
const int c_mINF = -111111111;
const int c_YET = -1;
const int c_Dx[4] = { 0,0,1,-1 };
const int c_Dy[4] = { 1,-1,0,0 };


char name[120];
pair<pair<string, int>, int> info[110];


int main() {
	int N;
	scanf("%d", &N);
	for (int i = 0; i < N; i++) {
		int temp; scanf("%s%d", name, &temp);
		info[i] = make_pair(make_pair(name, -temp), i);
	}

	sort(info, info + N);
	for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);

}



/*         提出前の確認事項

・デバッグ用の関数は＜＜コメント化＞＞しているか？
・すべての＜＜入力例＞＞は試したか？
・＜＜限界値分析＞＞はしたか？
・＜＜出力の改行＞＞の有無は確認したか？
　　　　　　　　↓
	 ＜＜提出先＞＞に注意して提出！！
*/

Compiler output:
a.cc:18:11: error: 'string' was not declared in this scope
   18 | pair<pair<string, int>, int> info[110];
      |           ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    5 | #include <queue>
  +++ |+#include <string>
    6 | using namespace std;
a.cc:18:22: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                      ^
a.cc:18:28: error: template argument 1 is invalid
   18 | pair<pair<string, int>, int> info[110];
      |                            ^
a.cc: In function 'int main()':
a.cc:26:36: error: cannot convert 'std::pair<std::pair<char*, int>, int>' to 'int' in assignment
   26 |                 info[i] = make_pair(make_pair(name, -temp), i);
      |                           ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                    |
      |                                    std::pair<std::pair<char*, int>, int>
a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   29 |         sort(info, info + N);
      |         ^~~~
      |         sqrt
a.cc:30:59: error: request for member 'second' in 'info[i]', which is of non-class type 'int'
   30 |         for (int i = 0; i < N; i++)printf("%d\n", info[i].second + 1);
      |                                                           ^~~~~~
Language: C

#include <stdio.h>


int main()
{
	int i = 0;
	int P, N;
	int total = 0;


	scanf("%d %d", &P, &N);

	total = P * 3 + N;

	printf("%d\n", total / 2);

	return 0;

Compiler output:
main.c: In function 'main':
main.c:17:9: error: expected declaration or statement at end of input
   17 |         return 0;
      |         ^~~~~~
Language: C

include <stdio.h>

int main()
{

int i = 0;
	int P, N;
	int total = 0;


	scanf("%d %d", &P, &N);

	total = P * 3 + N;

	printf("%d\n", total / 2);

	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
  int main () {
  int A , P;

  cin >> A >> P;
    
  cout << (3A + P) /2;
    
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: unable to find numeric literal operator 'operator""A'
    8 |   cout << (3A + P) /2;
      |            ^~
Language: C

#include<stdio.h>
int main () {
	int A, P;
	scanf("%d %d", &A, &P);
	printf("%d\n", (A * 3 + p) / 2);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:33: error: 'p' undeclared (first use in this function)
    5 |         printf("%d\n", (A * 3 + p) / 2);
      |                                 ^
main.c:5:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int a d;
	cin >> a >> d;
	cout << (3*a+d)/2 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected initializer before 'd'
    6 |         int a d;
      |               ^
a.cc:7:16: error: 'a' was not declared in this scope
    7 |         cin >> a >> d;
      |                ^
a.cc:7:21: error: 'd' was not declared in this scope
    7 |         cin >> a >> d;
      |                     ^
Language: C++

#include<bits/stdc++>
using namespace std;
int main(){
  int A,P; cin >> A >> P;
  cout >> (3*A + P)/2 >> endl;
  return 0;
}


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

include<bits/stdc++>
using namespace std;
int main(){
  int A,P; cin >> A >> P;
  cout >> (3*A + P)/2 >> endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:12: error: 'cin' was not declared in this scope
    4 |   int A,P; cin >> A >> P;
      |            ^~~
a.cc:5:3: error: 'cout' was not declared in this scope
    5 |   cout >> (3*A + P)/2 >> endl;
      |   ^~~~
a.cc:5:26: error: 'endl' was not declared in this scope
    5 |   cout >> (3*A + P)/2 >> endl;
      |                          ^~~~
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<string>
#include<cstdlib>
using namespace std;

int main()
{
  int n,p;
  cin >> n >> p;
  cout << (3*n+p)/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected '}' at end of input
   14 |   cout << (3*n+p)/2 << endl;
      |                             ^
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
Language: Java

package _128;

import java.util.Scanner;

public class A_ApplePie {
    public static int getNumOfPie(int A, int P) {
        return (int) (A * 3 + P) / 2;
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int P = scan.nextInt();
        System.out.println(getNumOfPie(A, P));
    }
}


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

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

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))
#define rep(i,a,b) for(int (i)=int(a);(i)<int(b);(i)++)
#define rrep(i,a,b) for(int (i)=int(a);(i)>=int(b);(i)--)

#define put(a) cout << (a) << endl

#define INF 1000000001
#define MOD 1000000007
#define INF64 1000000000000000001

#define F first
#define S second

#define Pii  pair<int,int>
#define Pll  pair<long long,long long>
#define Piii pair<int,pair<int,int>>
#define Plll pair<long long,pair<long long,long long>>

#define Vll(a,b,c)    vector<vector<long long>> (a)((b),vector<long long>((c))
#define Vlll(a,b,c,d) vector<vector<vector<long long>>> (a)((b),vector<vector<long long>>((c),vector<long long>((d)))

#define MAX_N 1000000
int N,M,L;
int K[MAX_N];
int ans;
vector<char> C;
bool bool_ans;

int solve(void) {

  ans = (A * 3 + P)/ 2;
  return ans;
}

int main (void)
{
  cin >> N >> M;

  ans = solve();
  put(ans);

  return 0;
}


Compiler output:
a.cc: In function 'int solve()':
a.cc:42:10: error: 'A' was not declared in this scope
   42 |   ans = (A * 3 + P)/ 2;
      |          ^
a.cc:42:18: error: 'P' was not declared in this scope
   42 |   ans = (A * 3 + P)/ 2;
      |                  ^
Language: C++

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

int main (){
  int A P,sum,ans;
  cin >> A >> P;
  sum = A*3 + P;
  ans = sum/2;
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'P'
    5 |   int A P,sum,ans;
      |         ^
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   cin >> A >> P;
      |          ^
a.cc:6:15: error: 'P' was not declared in this scope
    6 |   cin >> A >> P;
      |               ^
a.cc:7:3: error: 'sum' was not declared in this scope
    7 |   sum = A*3 + P;
      |   ^~~
a.cc:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   ans = sum/2;
      |   ^~~
      |   abs
Language: C++

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

int main (){
  int A P,sum,ans;
  cin >> A >> P;
  sum = A*3 + P;
  ans = sum/2;
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'P'
    5 |   int A P,sum,ans;
      |         ^
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   cin >> A >> P;
      |          ^
a.cc:6:15: error: 'P' was not declared in this scope
    6 |   cin >> A >> P;
      |               ^
a.cc:7:3: error: 'sum' was not declared in this scope
    7 |   sum = A*3 + P;
      |   ^~~
a.cc:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   ans = sum/2;
      |   ^~~
      |   abs
Language: C++

#include <iostream>
using namespace std;

int main(){
  cin>>A;
  cin>>P;
  cout<<((A*3)+P)/2<<endl;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'A' was not declared in this scope
    5 |   cin>>A;
      |        ^
a.cc:6:8: error: 'P' was not declared in this scope
    6 |   cin>>P;
      |        ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int A=0;
  int P=0;
  cin>>A;
  cin>>P;
  cout<<[(A*3)+P]/2<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected identifier before '(' token
    8 |   cout<<[(A*3)+P]/2<<endl;
      |          ^
a.cc: In lambda function:
a.cc:8:18: error: expected '{' before '/' token
    8 |   cout<<[(A*3)+P]/2<<endl;
      |                  ^
a.cc: In function 'int main()':
a.cc:8:18: error: no match for 'operator/' (operand types are 'main()::<lambda()>' and 'int')
    8 |   cout<<[(A*3)+P]/2<<endl;
      |         ~~~~~~~~~^~
      |         |         |
      |         |         int
      |         main()::<lambda()>
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a=0;
  int p=0;
  cin>>a;
  cin>>p;
  cout<<[(a*3)+p]/2<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected identifier before '(' token
    8 |   cout<<[(a*3)+p]/2<<endl;
      |          ^
a.cc: In lambda function:
a.cc:8:18: error: expected '{' before '/' token
    8 |   cout<<[(a*3)+p]/2<<endl;
      |                  ^
a.cc: In function 'int main()':
a.cc:8:18: error: no match for 'operator/' (operand types are 'main()::<lambda()>' and 'int')
    8 |   cout<<[(a*3)+p]/2<<endl;
      |         ~~~~~~~~~^~
      |         |         |
      |         |         int
      |         main()::<lambda()>
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a=0;
  int p=0;
  cin>>a>>p;
  cout<<[(a*3)+p]/2<<;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected identifier before '(' token
    7 |   cout<<[(a*3)+p]/2<<;
      |          ^
a.cc: In lambda function:
a.cc:7:18: error: expected '{' before '/' token
    7 |   cout<<[(a*3)+p]/2<<;
      |                  ^
a.cc: In function 'int main()':
a.cc:7:18: error: no match for 'operator/' (operand types are 'main()::<lambda()>' and 'int')
    7 |   cout<<[(a*3)+p]/2<<;
      |         ~~~~~~~~~^~
      |         |         |
      |         |         int
      |         main()::<lambda()>
a.cc:7:22: error: expected primary-expression before ';' token
    7 |   cout<<[(a*3)+p]/2<<;
      |                      ^
Language: C

#include<stdio.h>{
	int a,b;
	scanf("%d %d",&a,&b);
	b = (a * 3 + b) / 2;
	printf("%d",b);
	return 0;
}

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>{
      |                  ^
main.c:3:15: error: expected declaration specifiers or '...' before string constant
    3 |         scanf("%d %d",&a,&b);
      |               ^~~~~~~
main.c:3:23: error: expected declaration specifiers or '...' before '&' token
    3 |         scanf("%d %d",&a,&b);
      |                       ^
main.c:3:26: error: expected declaration specifiers or '...' before '&' token
    3 |         scanf("%d %d",&a,&b);
      |                          ^
main.c:4:9: warning: data definition has no type or storage class
    4 |         b = (a * 3 + b) / 2;
      |         ^
main.c:4:9: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:4:13: error: initializer element is not constant
    4 |         b = (a * 3 + b) / 2;
      |             ^
main.c:5:16: error: expected declaration specifiers or '...' before string constant
    5 |         printf("%d",b);
      |                ^~~~
main.c:5:21: error: expected declaration specifiers or '...' before 'b'
    5 |         printf("%d",b);
      |                     ^
main.c:6:9: error: expected identifier or '(' before 'return'
    6 |         return 0;
      |         ^~~~~~
main.c:7:1: error: expected identifier or '(' before '}' token
    7 | }
      | ^
Language: C++

# include < bits / stdc ++. h >
using namespace std ;
int main () {
int A , P ;
cin >> A >> P ;
cout << (3 * A + P ) / 2 << endl ;
return 0;
}


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

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

int main() {
  
int A,P;
cin >>A>>P;
  int r;
  r = (3*A+P)/2
    
    cout << r << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before 'cout'
    9 |   r = (3*A+P)/2
      |                ^
      |                ;
   10 | 
   11 |     cout << r << endl;
      |     ~~~~
Language: C++

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

int main() {
  
int A,P:
cin >>A>>P;
  int r;
  r = (3*A+P)/2
    
    cout << r << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: found ':' in nested-name-specifier, expected '::'
    6 | int A,P:
      |        ^
      |        ::
a.cc:6:7: error: 'P' has not been declared
    6 | int A,P:
      |       ^
a.cc:7:5: error: qualified-id in declaration before '>>' token
    7 | cin >>A>>P;
      |     ^~
a.cc:9:12: error: 'P' was not declared in this scope
    9 |   r = (3*A+P)/2
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int A,P;
  cin >> A >> P;
  cout << (A*3+P)/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:29: error: expected '}' at end of input
    6 |   cout << (A*3+P)/2 << endl;
      |                             ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 int main () {
   int a, p, x;
   cin >> a >> p;
   x = (a * 3) + p
     
     cout << x / 2 << endl;
   return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before 'cout'
    6 |    x = (a * 3) + p
      |                   ^
      |                   ;
    7 | 
    8 |      cout << x / 2 << endl;
      |      ~~~~
Language: C++

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

int main() {
  int A,P,W;
  cin >> A >> P;
  if(A > 0)
    W =A * 3;
  W += P;
  cout << X/2 << endl;
}
  



Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'X' was not declared in this scope
   10 |   cout << X/2 << endl;
      |           ^
Language: C++

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

int main() {
  int A,P,W;
  cin >> A >> P;
  if(A > 0)
    X =A * 3;
  X += P;
  cout << X/2 << endl;
}
  



Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'X' was not declared in this scope
    8 |     X =A * 3;
      |     ^
a.cc:9:3: error: 'X' was not declared in this scope
    9 |   X += P;
      |   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int A, P;
	cin >> A >> P;
	count << (3 * A) / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'count' was not declared in this scope
    7 |         count << (3 * A) / 2 << endl;
      |         ^~~~~
Language: C

#include<stdio.h>
int main(){
  int A,P;
  scanf("%d %d",&A,&P);
  printf("%d",3A+P/2);
  
  return 0;
}   

Compiler output:
main.c: In function 'main':
main.c:5:15: error: invalid suffix "A" on integer constant
    5 |   printf("%d",3A+P/2);
      |               ^~
Language: C

#include<stdio.h>
int main(){
  int A,P;
  scanf("%d %d",&A,&P);
  printf(3A+P/2);
  
  return 0;
}   

Compiler output:
main.c: In function 'main':
main.c:5:10: error: invalid suffix "A" on integer constant
    5 |   printf(3A+P/2);
      |          ^~
Language: C

#include<stdio.h>
int main(){
  int A,P;
  scanf("%d %d",&A,&P);
  printf((3A+P)/2);
  
  return 0;
}   

Compiler output:
main.c: In function 'main':
main.c:5:11: error: invalid suffix "A" on integer constant
    5 |   printf((3A+P)/2);
      |           ^~
Language: C++

int main()
{
    int a,p;
    std::cin>>a>>p;
    std::cout<<(a*3+p)/2<<std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' is not a member of 'std'
    4 |     std::cin>>a>>p;
      |          ^~~
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()
a.cc:5:10: error: 'cout' is not a member of 'std'
    5 |     std::cout<<(a*3+p)/2<<std::endl;
      |          ^~~~
a.cc:5:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:5:32: error: 'endl' is not a member of 'std'
    5 |     std::cout<<(a*3+p)/2<<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()
Language: C++

#include <iosteram>
using namespace std;

int main(){
  int a, p;
  cin >> a >> p;
  int totl;
  total = 3*a + p;
  int res;
  cout << total/2 << endl;
}

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

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


int main()
{
  int A, P;
  cint >> A >> P;
  cout << floor(((3 * A) + P) / 2) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cint' was not declared in this scope; did you mean 'uint'?
    8 |   cint >> A >> P;
      |   ^~~~
      |   uint
Language: C

#include<stdio.h>
in#include<stdio.h>
int main(void){
  int a,p,piece,pie;
  scanf("%d %d",&a,&p);
  piece = p+a*3;
  pie = piece/2;
  printf("%d\n",pie);
  return 0;
}

Compiler output:
main.c:2:3: error: stray '#' in program
    2 | in#include<stdio.h>
      |   ^
main.c:2:1: error: unknown type name 'in'; did you mean 'int'?
    2 | in#include<stdio.h>
      | ^~
      | int
main.c:2:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    2 | in#include<stdio.h>
      |           ^
Language: C

#include<stdio.h>
int main(void){
  int a,p,piece,pie;
  scanf("%d %d",&a,&p);
  piece = p+a*3;
  pie = piece/2
  printf("%d\n",pie);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: expected ';' before 'printf'
    6 |   pie = piece/2
      |                ^
      |                ;
    7 |   printf("%d\n",pie);
      |   ~~~~~~
Language: C

#include<stdio.h>
int main(void){
  int a,p,piece,pie;
  scanf("%d %d",&a,&p);
  piece = p+a*3;
  pie = piece/2
  printf("%d\n",pie);
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: expected ';' before 'printf'
    6 |   pie = piece/2
      |                ^
      |                ;
    7 |   printf("%d\n",pie);
      |   ~~~~~~
Language: C

#include <stdio.h>
int main(){
 int a,b,c;
  scanf("%d%d",&a,&b);
  c = a*3 + b
  printf("%d",c / 2);
   return 0;
  
  
  	
}

Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected ';' before 'printf'
    5 |   c = a*3 + b
      |              ^
      |              ;
    6 |   printf("%d",c / 2);
      |   ~~~~~~
Language: C

#include <stdio.h>
int main(){
 int a,b,c;
  scanf("%d%d",&a,&b);
  c = a*3 + b
  printf("%d",c/2);
   return 0;
  
  
  	
}

Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected ';' before 'printf'
    5 |   c = a*3 + b
      |              ^
      |              ;
    6 |   printf("%d",c/2);
      |   ~~~~~~
Language: C

#include <stdio.h>
int main(){
 int a,b,;
  scanf("%d%d",&a,&b);
  printf("%d",(a*3 + b)/2);
   return 0;
  
  
  	
}

Compiler output:
main.c: In function 'main':
main.c:3:10: error: expected identifier or '(' before ';' token
    3 |  int a,b,;
      |          ^
Language: C

#include <stdio.h>
int main(){
 int a,b,;
  scanf("%d%d",&a,&b);
  printf("%d",(a*3 + b) / 2);
   return 0;
  
  
  	
}

Compiler output:
main.c: In function 'main':
main.c:3:10: error: expected identifier or '(' before ';' token
    3 |  int a,b,;
      |          ^
Language: C

#include <stdio.h>
int main(){
 int a,b,c;
  scanf("%d%d",&a,&b);
  c = a*3 + b;
  printf("%d",c)
   return 0;
  
  
  	
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: expected ';' before 'return'
    6 |   printf("%d",c)
      |                 ^
      |                 ;
    7 |    return 0;
      |    ~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d%d",&a,&b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d%d",&a,&b);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 |   printf("%d",c)
      |   ^~~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:17: error: expected ';' before 'return'
    5 |   printf("%d",c)
      |                 ^
      |                 ;
    6 |    return 0;
      |    ~~~~~~
Language: C

#include<stdio.h>

int main()
{
	int apple;
	int apple_piece;

	scanf("%d%d",apple,apple_piece);

	printf("%d\n"(3*apple+apple_piece)/2);



}

Compiler output:
main.c: In function 'main':
main.c:10:16: error: called object is not a function or function pointer
   10 |         printf("%d\n"(3*apple+apple_piece)/2);
      |                ^~~~~~
Language: C++

#include <bits/stdc++.h>}
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  sum=(a*3+b)/2;
  cout<<sum<<endl;
}

Compiler output:
a.cc:1:25: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h>}
      |                         ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'sum' was not declared in this scope
    6 |   sum=(a*3+b)/2;
      |   ^~~
Language: C++

#include <stdio.h>
#include <algorithm>
#include <map>
#include <vector>
#include <iostream>
using namespace std;

int N;
int t;
string S;
vector<pair<pair<string,int>,int>> p(110);

int main(){
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> S;
    cin >> t;
    p[i] = make_pair(make_pair(S,-t),i);
  }
  
  sort(p.begin(),p.end());
  for(i=0;i<N;i++){
    cout << p[i] << endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'i' was not declared in this scope
   22 |   for(i=0;i<N;i++){
      |       ^
Language: C

#include <stdio.h>

int main(void){
  int A,P,a,num;
  scanf("%d%d"&A,&P);
  a = A*3;
  num = (P+a)/2;
  printf("%d",num);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:15: error: invalid operands to binary & (have 'char *' and 'int')
    5 |   scanf("%d%d"&A,&P);
      |         ~~~~~~^
      |         |
      |         char *
Language: C++

#import numpy as np
def cin():
    return map(int, input().split())


a, p = cin()
print((p + a*3)//2)


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import numpy as np
      |  ^~~~~~
a.cc:1:9: error: #import expects "FILENAME" or <FILENAME>
    1 | #import numpy as np
      |         ^~~~~
a.cc:2:1: error: 'def' does not name a type
    2 | def cin():
      | ^~~
Language: Java

import java.util.Scanner;
import java.util.TreeMap;
import java.util.Iterator;
 
public class Main {
  	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        TreeMap<String, TreeMap<Integer, Integer>> restaurants = new TreeMap<>();
 
        int N = sc.nextInt();
        for (int i = 0; i < N; i++) {
            String city = sc.next();
            TreeMap<Integer, Integer> restaurantsInCity = restaurants.get(city);
            if (restaurantsInCity == null) {
                restaurantsInCity = new TreeMap<>(new Comparator<Integer>() {
                    public int compare (Integer m, Integer n) {
                        return m.compareTo(n) * -1;
                    }
                });
            }
 
            restaurantsInCity.put(sc.nextInt(), i);
        }
 
        Iterator<String> itr = restaurants.keySet().iterator();
        while (itr.hasNext()) {
            TreeMap<Integer, Integer> resutaurantsInCity = restaurants.get(itr.next());
            Iterator<Integer> index = resutaurantsInCity.values().iterator();
            while (index.hasNext()) {
                System.out.println(index.next());
            }
        }
    }
}

Compiler output:
Main.java:15: error: cannot find symbol
                restaurantsInCity = new TreeMap<>(new Comparator<Integer>() {
                                                      ^
  symbol:   class Comparator
  location: class Main
1 error
Language: C++

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

int main(){
  int A,P;
  cin>>A>>P;
  cout<<(3A+P)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: unable to find numeric literal operator 'operator""A'
    7 |   cout<<(3A+P)/2<<endl;
      |          ^~
Language: C++

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

int main(){
  int A,P;
  
  cout<<(3A+P)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: unable to find numeric literal operator 'operator""A'
    7 |   cout<<(3A+P)/2<<endl;
      |          ^~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;


int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};


int main(){
  int A,P;
  cin >> A >> P;
  int B = A * 3;
  B = (B + P) / 2;
  cout << B << endl;
  1 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:4: error: expected ';' before '}' token
   27 |   1
      |    ^
      |    ;
   28 | }
      | ~
Language: Java

import java.util.*;
 
public class Main {
	public static void main(String[] args) {
     Scanner ap = Scanner.nextInt(System.in);
     //整数入力
     int A = ap.nextInt();
     int P = ap.nextInt();
     
     int pie = (A*3 + P / 2);
      
      System.out.println(pie);
      
    }
}

Compiler output:
Main.java:5: error: incompatible types: InputStream cannot be converted to int
     Scanner ap = Scanner.nextInt(System.in);
                                        ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) {
     Scanner ap = Scanner.nextInt(System.int);
     //整数入力
     int A = ap.nextInt();
     int P = ap.nextInt();
     
     int pie = (A*3 + P / 2);
      
      System.out.println(pie);
      
    }
}

Compiler output:
Main.java:5: error: <identifier> expected
     Scanner ap = Scanner.nextInt(System.int);
                                         ^
Main.java:5: error: ';' expected
     Scanner ap = Scanner.nextInt(System.int);
                                            ^
2 errors
Language: Java

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
    	System.out.print("林檎の数：");
      	Scanner apple = Scanner.nextInt();
      
      	int kakera = apple*3;
      	int applepie = kakera/2;
      
      	System.out.println("作れるアップルパイの数：" + applepie);
    }
}


Compiler output:
Main.java:6: error: non-static method nextInt() cannot be referenced from a static context
      	Scanner apple = Scanner.nextInt();
      	                       ^
Main.java:6: error: incompatible types: int cannot be converted to Scanner
      	Scanner apple = Scanner.nextInt();
      	                               ^
Main.java:8: error: bad operand types for binary operator '*'
      	int kakera = apple*3;
      	                  ^
  first type:  Scanner
  second type: int
3 errors
Language: Java

import java.util.Scanner;

public class AMain {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        int p = scanner.nextInt();


        System.out.println((int)(a*3 + p)/2);
    }
}


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

# include <iostream>

using namespase std;

int main(){;
	int apple,piece;
	cin >> apple >> piece;
	cout << (apple*3+piece)/2<<endl;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namespase'
    3 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> apple >> piece;
      |         ^~~
      |         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:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << (apple*3+piece)/2<<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:8:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         cout << (apple*3+piece)/2<<endl;
      |                                    ^~~~
      |                                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

int main(){
  	int pie ,apple, piece;
  	cin >> apple >> piece;
  	pie = (apple*3 + piece)/2
  	cout << pie<<endl
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> apple >> piece;
      |         ^~~
a.cc:4:34: error: expected ';' before 'cout'
    4 |         pie = (apple*3 + piece)/2
      |                                  ^
      |                                  ;
    5 |         cout << pie<<endl
      |         ~~~~
Language: C++

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

int main(){
    int N;
    cin >> N;
    vector<tuple<string, int, int>> a;
    for(int i = 1; i <= N; ++i){
        string S;
        int P;
        cin >> S >> P;
        P = -P;
        a.emplace_back(tie(S,P,i));
    }
    sort(a.begin(),a.end());
    for(int i = 0; i <= N-1; i++){
        cout << get<2>(a[i])<<endl;
    }
    
}


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

#!/usr/local/bin/python3
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a, p = f()
    print((a*3 +p)//2)

solve()


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/local/bin/python3
      |  ^
a.cc:5:4: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 | if 'local' in os.environ :
      |    ^~~~~~~
a.cc:6:22: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
    6 |     sys.stdin = open('./input.txt', 'r')
      |                      ^~~~~~~~~~~~~
a.cc:2:1: error: 'import' does not name a type
    2 | import sys, os
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
#include<iomanip>
#include<climits>
#include<vector>
#include<list>
#include<functional>
#include<algorithm>
#include<string>
#include<cmath>
#include<complex>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<tuple>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int A, P;#include<iostream>
#include<iomanip>
#include<climits>
#include<vector>
#include<list>
#include<functional>
#include<algorithm>
#include<string>
#include<cmath>
#include<complex>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<tuple>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int A, P;
	cin >> A >> P;
	cout << (3 * A + P) / 2 << endl;

	return 0;
}

	cin >> A >> P;
	cout << (3 * A + P) / 2 << endl;

	return 0;
}


Compiler output:
a.cc:28:18: error: stray '#' in program
   28 |         int A, P;#include<iostream>
      |                  ^
a.cc: In function 'int main()':
a.cc:28:19: error: 'include' was not declared in this scope
   28 |         int A, P;#include<iostream>
      |                   ^~~~~~~
a.cc:28:35: error: expected primary-expression before '>' token
   28 |         int A, P;#include<iostream>
      |                                   ^
a.cc:46:1: error: expected primary-expression before 'using'
   46 | using namespace std;
      | ^~~~~
a.cc:48:24: error: 'typedef struct std::pair<int, int> P' redeclared as different kind of entity
   48 | typedef pair<int, int> P;
      |                        ^
a.cc:28:16: note: previous declaration 'int P'
   28 |         int A, P;#include<iostream>
      |                ^
a.cc:51:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   51 | int main() {
      |         ^~
a.cc:51:9: note: remove parentheses to default-initialize a variable
   51 | int main() {
      |         ^~
      |         --
a.cc:51:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:51:12: error: a function-definition is not allowed here before '{' token
   51 | int main() {
      |            ^
Language: Java

int apple = 0;
int piece_apple = 0;

InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);

try {
  String str = "";
  str = br.readLine();
  br.close();
  String strs[] = str.split(" ", 2);
  apple = Integer.parseInt(strs[0]);
  piece_apple = Integer.parseInt(strs[0]);
} catch(IOException e) {
  e.printStackTrace();
}

System.out.println((3 * apple + piece_apple) / 2);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int apple = 0;
^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: class, interface, enum, or record expected
try {
^
Main.java:9: error: class, interface, enum, or record expected
  str = br.readLine();
  ^
Main.java:10: error: class, interface, enum, or record expected
  br.close();
  ^
Main.java:11: error: class, interface, enum, or record expected
  String strs[] = str.split(" ", 2);
  ^
Main.java:12: error: class, interface, enum, or record expected
  apple = Integer.parseInt(strs[0]);
  ^
Main.java:13: error: class, interface, enum, or record expected
  piece_apple = Integer.parseInt(strs[0]);
  ^
Main.java:14: error: class, interface, enum, or record expected
} catch(IOException e) {
^
Main.java:16: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

import java.io.*;

public class ApplePie {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int apple = 0;
		int piece_apple = 0;
		
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		
		try {
			String str = "";
			str = br.readLine();
			br.close();
			String strs[] = str.split(" ", 2);
			apple = Integer.parseInt(strs[0]);
			piece_apple = Integer.parseInt(strs[0]);
		} catch(IOException e) {
			e.printStackTrace();
		}
		
		System.out.println((3 * apple + piece_apple) / 2);
	}

}

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