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

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

#define ll long long

#define all(a) a.begin(),a.end()
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define Rep(i,n,m) for(int i=(int)(n);i<(int)(m);i++)
#define RepS(i,n,m) for(int i=(int)(n);i<=(int)(m);i++)
#define output_s(a) printf("%s\n",(a).c_str())

//library----------------------------------------------


int main(){
    int a,p; cin>>a>>p;
  	p += a*3;
  	int ans;
  	if(p!=0){
      printf("%d\n",p/2);
    }else{
      printf("0";)
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected ')' before ';' token
   22 |       printf("0";)
      |             ~   ^
      |                 )
a.cc:22:18: error: expected primary-expression before ')' token
   22 |       printf("0";)
      |                  ^
Language: C++

#include<bits/stdc++.h>

using namespace std ;
int main(){
  pair<pair<string,int>,int> m[100];
  
  int a;
  cin>>a;
  for(int i =0;i<a;i++){
    int &t ;
    string city;
    
    cin>>city>>t;
    
    m[i] = make_pair(make_pair(city,-t),i);
  }
  sort(m,m+a);
  for(int i =0;i<a;i++){
  
   
      cout<<m[i].second+1<<endl;
    
  } 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 't' declared as reference but not initialized
   10 |     int &t ;
      |          ^
Language: C++

# include < bits / stdc ++. h >
using namespace std ;
int main(){
  int A,p;
  
  cin>>A;
  cin>>p;
  
   A=A*3;
  cout<<(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<iostream>
int main(){
  int A,P;
  cin>>A;
  cin>>P;
  cout<<(3*A+P)/2<<endl;
  return 0;
  
}

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;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout<<(3*A+P)/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:6:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout<<(3*A+P)/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++

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        int a,b;
        Scanner in = new Scanner(System.in);
        a = in.nextInt();
        b = in.nextInt();
        System.out.println((a*3+b)/2);
    }
}

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

public class Main {
    public static void main(String[] args) {
        int a,b;
        Scanner in = new Scanner(System.in);
        a = in.nextInt();
        b = in.nextInt();
        System.out.println((a*3+b)/2);
    }
}

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

//author:luckYrat(twitter:@luckYrat_)
//#include <bits/stdc++.h>

//def
#include <iostream>

#include <cmath>
#include <algorithm>
#include <iomanip>

//array
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <utility>
#include <climits>



using namespace std;

using ll = long long;
using P = pair<ll,ll>;

#define anyfill(n,s) setw(n) << setfill(s)
#define loop(s) for(int i = 0; s > i; i++)
#define rep(i,q) for(int i = 0; (q) > i; i++)
#define repp(i,n,q) for(int i = n; (q) > i; i++)
#define dep(i,q) for(int i = (q); 0 < i; i--)


#define MAX 1000000000
const int mod = 1000000007;
#define EPS (1e-10)

#define pb push_back
#define fir first
#define scn second
#define ednl endl

#define YesNo(a) (a?"Yes":"No")
#define YESNO(a) (a?"YES":"NO")
#define yesno(a) (a?"yes":"no")


P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}};
P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
/*
確認ポイント
cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる
vector.unique()は隣接した同じ要素を削除するので先にソートをする

計算量は変わらないが楽できるシリーズ
C++11以降でmin({a,b,c...})で複数個のmic,maxを処理できる
min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる
count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる

*/
__attribute__((constructor))
void initial() {
 cin.tie(0);
 ios::sync_with_stdio(false);
}



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


Compiler output:
a.cc: In function 'int main()':
a.cc:71:16: error: 'p' was not declared in this scope
   71 |   cout << (a*3+p)/2 << endl;
      |                ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   cin>>a>>P;
      |        ^
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:9:12: error: unable to find numeric literal operator 'operator""a'
    9 |   cout << (3a + p) / 2;
      |            ^~
Language: C

#include <stdio.h>
int main(void){
	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:5:31: error: expected ';' before 'return'
    5 |         printf("%d",(a*3+b)/2)
      |                               ^
      |                               ;
    6 |         return 0;
      |         ~~~~~~
Language: C++

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


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

#include<bits/sdtc++>
using namespace std;
int main()
{
  long long a,b;
  cin>>a>>b;
  a = a/3;
  b+=a;
  cout<<b/2;
}
  

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

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

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

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

int main()
{
	int a,p;
	scanf("%d %d",&a,&p); 
	printf("%d",(a*3+p)/2);
	
	

	return 0;

}


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

#include<stdio.h>

int main(void)
{
        int a, p;

        scanf("%d%d", &a, &p);

        printf("%d", (a*3+p)/3 );
        return 0;
}
~   

Compiler output:
main.c:12:1: error: expected identifier or '(' before '~' token
   12 | ~
      | ^
Language: C

#include<stdio.h>
int main()
{
    int A,P,X,Y);
    scanf("%d%d",&A,&B);
    X=A*32;
    Y=X+P;


    printf("%d",Y);


return 0;


}


Compiler output:
main.c: In function 'main':
main.c:4:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before ')' token
    4 |     int A,P,X,Y);
      |                ^
main.c:5:22: error: 'B' undeclared (first use in this function)
    5 |     scanf("%d%d",&A,&B);
      |                      ^
main.c:5:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:5: error: 'Y' undeclared (first use in this function)
    7 |     Y=X+P;
      |     ^
Language: C

#include<stdio.h>
int main()
{
    int A,P,X,Y,Z,W,P,B;
    scanf("%d%d",&A,&P);
    X=A/3;
    Z=A%3;
    W=Z/3;
    B=X+W+P;
    Y=B/2;



    printf("%d",Y);


return 0;


}


Compiler output:
main.c: In function 'main':
main.c:4:21: error: redeclaration of 'P' with no linkage
    4 |     int A,P,X,Y,Z,W,P,B;
      |                     ^
main.c:4:11: note: previous declaration of 'P' with type 'int'
    4 |     int A,P,X,Y,Z,W,P,B;
      |           ^
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;

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


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

#include <iostream>
#include<algorithm>
#include<string>
#include <cmath>
#include <vector>
#pragma region Macros
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define int long long
#define all(x) (x).begin(),(x).end()
#define swap(a,b) (a += b,b = a - b,a -= b)
int gcd(int a, int b) // assuming a,b >= 1
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    if (a % b == 0)
        return b;
    return gcd(b, a % b);
}
int lcm(int a, int b) // assuming a,b >= 1
{
    return  a * b / gcd(a, b);
}
using namespace std;
#pragma endregion
signed main() {
    int A,P;
    cin >> A >> P;
    cout << (A * 3 + P) / 2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:28: error: expected ';' before ')' token
   31 |     cout << (A * 3 + P) / 2);
      |                            ^
      |                            ;
Language: C++

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

int main() {
  int A, P;
  int pies = P/2;

  cin >> A >> P;

  P += (A * 3);

  int pies = P/2;

  cout << pies;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: redeclaration of 'int pies'
   12 |   int pies = P/2;
      |       ^~~~
a.cc:6:7: note: 'int pies' previously declared here
    6 |   int pies = P/2;
      |       ^~~~
Language: C++

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

int main() {
  int A, P;
  int pies = P/2;

  cin >> A >> P;

  int pies = P/2;

  P += A * 3;

  cout << pies;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: redeclaration of 'int pies'
   10 |   int pies = P/2;
      |       ^~~~
a.cc:6:7: note: 'int pies' previously declared here
    6 |   int pies = P/2;
      |       ^~~~
Language: C++

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

int main()
{
    int A, P

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


    return 0;
}

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

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


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

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


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

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

Compiler output:
main.c: In function 'main':
main.c:8:21: error: expected ';' before '}' token
    8 |     printf("%d\n",h)
      |                     ^
      |                     ;
    9 | 
   10 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,l,n) for(int i = l; i < n; ++i)

int main() {
    int a,p;
    cin >> a >> p;
    p += a*3;

    cout << p / 2 << emdl;
}


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

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

int main() {
    int n, m;
    cin >> n >> m;

    cout << (3*n+p)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'p' was not declared in this scope
    8 |     cout << (3*n+p)/2 << endl;
      |                  ^
Language: C

#include <stdio.h>

int main()
{
    int a, b, d;
    scanf("%d %d",&a, &b);
    
    d = (a * 3) + b;
    printf("%d\n" d /2);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:18: error: expected ')' before 'd'
    9 |     printf("%d\n" d /2);
      |           ~      ^~
      |                  )
Language: C

#include <stdio.h>

int main()
{
    int a, b;
    scanf("%d %d",&a, &b);
    
    printf("%d\n" ((a * 3) + b) /2);

    return 0;
}


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

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <sstream>

using namespace std;

#define rep(i, n) for (int i = 0; i < n; i++)
#define pri(a) cout << a << endl
#define pri2(a, b) cout << a << " " << b << endl
#define in(a) cin >> a
#define in2(a, b) cin >> a >> b
#define vi vector<int>
#define vs vector<string>
#define vc vector<char>

typedef long long ll

//以上テンプレ

int main () {
    int a,p;
    in2(a, p);
    int s = (a * 3) / 2;
    pri(s);
}

Compiler output:
a.cc:23:1: error: expected initializer before 'int'
   23 | int main () {
      | ^~~
Language: C++

#include <bitset/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:10: fatal error: bitset/stdc++.h: No such file or directory
    1 | #include <bitset/stdc++.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
   int n,m;
   scanf("%d%d",&n,&m);
   int k=(3*n+m)/2
    printf("%d\n",k);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'printf'
    9 |     printf("%d\n",k);
      |     ^~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
   int n,m;
   scanf("%d%d",&n,&m);
   int k=(3*n+m)/2
    printf("%d\n",k);
    if(k==0)
        printf("\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'printf'
    9 |     printf("%d\n",k);
      |     ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a, b;
  cin >> a >> b;
  cout << int((3 * a + b) / 2)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:31: error: expected ';' before '}' token
    6 |   cout << int((3 * a + b) / 2)
      |                               ^
      |                               ;
    7 | }
      | ~
Language: C++

// Justice will be served
// شهید حاج قاسم سلیمانی
 
#include<bits/stdc++.h>
using namespace std ;
 
int main() {
  int a , b ;
  cin >> a >> b ;
  cout (a * 3 + b) / 2 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (int)'
   10 |   cout (a * 3 + b) / 2 ;
      |   ~~~~~^~~~~~~~~~~
Language: C++

#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:1:10: fatal error: bits/stdc=+.h: No such file or directory
    1 | #include <bits/stdc=+.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
int main(void) {
    int u, v;
    int total_apple, ans;

    scanf("%d, %d", &a, &p);

    total_apple = 3 * a + p;
    ans = total_apple / 3;

    printf("%d", ans);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:22: error: 'a' undeclared (first use in this function)
    6 |     scanf("%d, %d", &a, &p);
      |                      ^
main.c:6:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:26: error: 'p' undeclared (first use in this function)
    6 |     scanf("%d, %d", &a, &p);
      |                          ^
Language: C

#include <stdio.h>
int main(void){
  int a, p;
  int total_apple, ans;
  
  scanf("%d", "%d", a, p);
  
  total_appel = 3 * a + p;
  ans = total_ans / 3;
  
  printf("%d", ans);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:3: error: 'total_appel' undeclared (first use in this function); did you mean 'total_apple'?
    8 |   total_appel = 3 * a + p;
      |   ^~~~~~~~~~~
      |   total_apple
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:9: error: 'total_ans' undeclared (first use in this function); did you mean 'total_apple'?
    9 |   ans = total_ans / 3;
      |         ^~~~~~~~~
      |         total_apple
Language: C++

#include <iostream>
using namespace std
int main()
{
    int a,b,c;
     cin>>a>>b;
     c=((a*3)+b)/2;
     cout<<c;
 
return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main()
      | ~~~
Language: C++

using namespace std;
int main()
{
    int a,b,c;
     cin>>a>>b;
     c=((a*3)+b)/2;
     cout<<c;
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: 'cin' was not declared in this scope
    5 |      cin>>a>>b;
      |      ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:6: error: 'cout' was not declared in this scope
    7 |      cout<<c;
      |      ^~~~
a.cc:7:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

x = [int(i) for i in input().split()]

if x[0] < 1 and x[1] < 2:
    print(0)
else:
    print(((x[0] * 3) + x[1]) // 2)

Compiler output:
a.cc:1:1: error: 'x' does not name a type
    1 | x = [int(i) for i in input().split()]
      | ^
Language: C

#include<stdio.h>
int main ()
{
  int a,p;
	scanf("%d %d ",&a,&p);

	int ans;
	ans=(3a+p)/2;
	printf("%d\n",ans);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:14: error: invalid suffix "a" on integer constant
    8 |         ans=(3a+p)/2;
      |              ^~
Language: C++

#include <iostream>
using namespace std;

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'z' was not declared in this scope
    7 |      cout<<z;
      |            ^
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:4:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    4 | scanf("%d%d",&a,&p);
      | ^~~~~
main.c:6:22: error: 'p' undeclared (first use in this function)
    6 |   printf("%d\n",(a*3+p)/2);
      |                      ^
main.c:6:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected primary-expression before ')' token
    7 |   cout << (3*a+p/)2 << endl;
      |                  ^
Language: C

#include <stdio.h>

int main(){
	//input
	int a,p;
	if(scanf("%d%d",&n)==-1){
		return 1;
	}
	
	printf("%d",(a*3+p)/2);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:26: error: 'n' undeclared (first use in this function)
    6 |         if(scanf("%d%d",&n)==-1){
      |                          ^
main.c:6:26: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;
public class AApplePie{
  public static void main(String[]args){
      Scanner sc = new Scanner(System.in);

      int A = sc.nextInt();
      int P = sc.nextInt();

      int frag;

      frag = A*3 + P;

      System.out.println(frag/2);
  }
}


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

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>'
    8 |   cin>>A>P>>endl;
      |          ~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;
int main(){
  cin>>A>>P;
  cout << (3*A+P)/2 << endl;
  return 0;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected ')' before 'q'
    7 |   printf("%d\n"q%3);
      |         ~      ^
      |                )
Language: C++

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

int read(){
    int x=0;bool f=0;char c=getchar();
    while(c<'0'||c>'9') f|=c=='-',c=getchar();
    while(c>='0'&&c<='9') x=x*10+(c^48),c=getchar();
    return f?-x:x;
}

#define MAXN 200000
int N,M;
struct Node{
    int l,r,p;
    bool operator < (Node other) const{
        return (p==other.p)?(l==other.l?r<other.r:l<other.l):(p<other.p);
    }
}A[MAXN+5];

bool In(Node i,int x){
    return x>=i.l&&x<i.r;
}

int main(){
    //freopen("road.in" ,"r", stdin);
    //freopen("road.out","w",stdout);
    N=read(),M=read();
    for(int i=1;i<=N;i++)
        A[i].l=read(),A[i].r=read(),A[i].p=read();
    set<Node> R;
    for(int i=1;i<=N;i++){
        A[i].l=max(A[i].l-A[i].p,0);
        A[i].r=max(A[i].r-A[i].p,0);
        R.insert(A[i]);
    }
    int i=1;
    set<Node> Cover;
    while(M--){
        int D=read();
        set<Node> tmp;
        for(Node i:R)
            if(In(i,D))
                Cover.insert(i),
                tmp.insert(i);  q
        for(Node i:tmp)
            R.erase(i);
        tmp.clear();
        for(Node i:Cover)
            if(!In(i,D))
                tmp.insert(i);
        for(Node i:tmp)
            Cover.erase(i);
        if(Cover.empty())
            puts("-1");
        else
            printf("%d\n",Cover.begin()->p);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:33: error: 'q' was not declared in this scope
   44 |                 tmp.insert(i);  q
      |                                 ^
Language: C++

#include <iostream>

using namespace std;

int main()
{ 
  int a,b;
  cin >> a >> b;
  int x = 3a + b;
  x = x/2;
  return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: unable to find numeric literal operator 'operator""a'
    9 |   int x = 3a + b;
      |           ^~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> a >> p;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout << (int)((3*a+p)/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:6:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout << (int)((3*a+p)/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++

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

Compiler output:
a.cc:1:107: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h>                                                                                   int main()
      |                                                                                                           ^~~
a.cc:2:1: error: expected unqualified-id before '{' token
    2 | {
      | ^
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:12: error: unable to find numeric literal operator 'operator""A'
    7 |   cout << (3A + P)/2 << endl;
      |            ^~
Language: C++

#include<iostream>
#define ll long long 
using namespace std;
int main()
{
  ll apple,pieces;
  ll pies=0;
  cin>>apple>>pieces;
  pies = apple/3 + pieces/3
  cout<<pieces;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before 'cout'
    9 |   pies = apple/3 + pieces/3
      |                            ^
      |                            ;
   10 |   cout<<pieces;
      |   ~~~~
Language: C++

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

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>a>>p;
      |     ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<ans<<endl;
      |     ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope
    9 |     cout<<ans<<endl;
      |                ^~~~
Language: C++

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

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

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>a>>p;
      |     ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<ans<<endl;
      |     ^~~~
a.cc:8:16: error: 'endl' was not declared in this scope
    8 |     cout<<ans<<endl;
      |                ^~~~
Language: C++

#include<bits/stdc++.h>
using namepace std;
int main()
  {
  int i,n,t,p,a;
  cin>>a>>p;
  n=a*3+p;
    cout<<n/2<<endl;
  }

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepace'
    2 | using namepace 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>>a>>p;
      |   ^~~
      |   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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<n/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:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<n/2<<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++.h>
using namespaces std;
int main()
  {
  int i,n,t,p,a;
  cin>>a>>p;
  n=a*3+p;
    cout<<n/2<<endl;
  }

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces 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>>a>>p;
      |   ^~~
      |   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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<n/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:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<n/2<<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<iostream>
using namespaces std;
int main()
  {
  int i,n,t,p,a;
  cin>>a>>p;
  n=a*3+p;
    cout<<n/2<<endl;
  }

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces 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>>a>>p;
      |   ^~~
      |   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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<n/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:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<n/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++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'A'
    8 |     A=A/2;
      |     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'A'
    8 |     A=A/2;
      |     ^
a.cc:9:13: error: expected '}' at end of input
    9 |     cout<<A;
      |             ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'A'
    8 |     A=A/2
      |     ^
a.cc:9:13: error: expected '}' at end of input
    9 |     cout<<A;
      |             ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: unable to find numeric literal operator 'operator""a'
    7 |   cout <<(3a+b)/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;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> a >> p;
      |         ^~~
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << (a * 3 + p) / 2 << endl;
      |         ^~~~
a.cc:9:36: error: 'endl' was not declared in this scope
    9 |         cout << (a * 3 + p) / 2 << endl;
      |                                    ^~~~
Language: C++

main(a,p){scanf("%d%d",&a,&p);printf("%d",(p+a*3)/2);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(a,p){scanf("%d%d",&a,&p);printf("%d",(p+a*3)/2);}
      |     ^
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:6:27: error: expected ';' before 'return'
    6 |     printf("%d",(3*a+p)/2)
      |                           ^
      |                           ;
    7 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>

int main()
{
	int A,P;
  	scanf("%d%d",&A,&B);
  	printf("%d",(A*3+P)/2)

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:26: error: 'B' undeclared (first use in this function)
    6 |         scanf("%d%d",&A,&B);
      |                          ^
main.c:6:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:31: error: expected ';' before 'return'
    7 |         printf("%d",(A*3+P)/2)
      |                               ^
      |                               ;
    8 | 
    9 |         return 0;
      |         ~~~~~~
Language: C++

#include <iostream>
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:6:12: error: unable to find numeric literal operator 'operator""a'
    6 |   cout << (3a + p) / 2;
      |            ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    int A, P = 0;
    cin >> A >> P;
    cout << (A*3 +P)/2; //整数同士の割り算:少数切捨て

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: expected '}' at end of input
    6 |     cout << (A*3 +P)/2; //整数同士の割り算:少数切捨て
      |                        ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C

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


}

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: Java

import java.util.Scanner;

public class B_Guidebook {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int n = sc.nextInt();

		int[] num = new int[n+1];
		String[] s = new String[n+1];
		int[] p = new int[n+1];

		for(int i=0; i<n; i++) {
			num[i] = i+1;
			s[i] = sc.next();
			p[i] = sc.nextInt();
		}

		num[n]=0;
		s[n]="0";
		p[n]=0;

		/* 辞書順にソート */
		for(int j=n; 0<j; j--) {
			for(int k=0; k<j; k++) {
				if(s[k].compareToIgnoreCase(s[k+1]) > 0) {
					num[n] = num[k];
					s[n] = s[k];
					p[n] = p[k];

					num[k] = num[k+1];
					s[k] = s[k+1];
					p[k] = p[k+1];

					num[k+1] = num[n];
					s[k+1] = s[n];
					p[k+1] = p[n];
					/* P順にソート */
				}if(s[k].compareToIgnoreCase(s[k+1]) == 0) {
					if(p[k]<p[k+1]) {
						num[n] = num[k];
						s[n] = s[k];
						p[n] = p[k];

						num[k] = num[k+1];
						s[k] = s[k+1];
						p[k] = p[k+1];

						num[k+1] = num[n];
						s[k+1] = s[n];
						p[k+1] = p[n];
					}
				}
			}
		}

		for(int i=0; i<n; i++) {
			System.out.println(num[i]);
		}
	}
}


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

#include<iostream>

int main(void)
{
  int A, P;
  std::cin >> A;
  std::cin >> P;
  
  P = P + 3 * A;
  std::cout << P / 3 std::endl;
  
  return 0;
}

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

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: expected primary-expression before '%' token
    5 |     scanf("%d %d",&a,%p);
      |                      ^
Language: C++

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: expected primary-expression before '%' token
    5 |     scanf("%d %d",&a,%p);
      |                      ^
a.cc:10:13: error: expected ';' before '}' token
   10 |     return 0
      |             ^
      |             ;
   11 | }
      | ~
Language: Java

import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	

		int a = sc.nextInt();
		int p = sc.nextInt();
		int result;

		result = (a*3+p)/2;

		System.out.println(result);
}


Compiler output:
Main.java:12: error: <identifier> expected
		result = (a*3+p)/2;
		      ^
Main.java:14: error: <identifier> expected
		System.out.println(result);
		                  ^
Main.java:14: error: <identifier> expected
		System.out.println(result);
		                         ^
3 errors
Language: C++

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

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

  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'p' was not declared in this scope
    8 |   c=(3*a+p)/2;
      |          ^
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:18: error: unable to find numeric literal operator 'operator""A'
    7 |         cout << (3A+P)/2 << endl;
      |                  ^~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:6: error: invalid suffix "a" on integer constant
    6 |   d=(3a+p)/2;
      |      ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pop pop_back
#define V vector
#define P pair
#define V2(a,b,c) V<V<int>> a(b,V<int>(c))
#define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d))
#define incin(a) int a; cin>>a
//#define min min<int>
//#define max max<int>
template<class T>
 void cou(vector<vector<T>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}
/*template<>
 void cou(vector<vector<char>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}*/
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
struct Union{
  vector<int> par;
  Union(int n){
	par= vector<int>(n, -1);
  }
  int find(int x){
    if(par[x]<0)
      return x;
    else
      return par[x]=find(par[x]);
  }
  bool same(int a,int b){
    return find(a)==find(b);
  }
  int Size(int a){
    return -par[find(a)];
  }
  void unite(int a,int b){
    a=find(a);
    b=find(b);
    if(a==b)
      return;
    if(Size(b)>Size(a))
      swap<int>(a,b);
    par[a]+=par[b];
    par[b]=a;
  }
};
int ketas(int a){
  string b=to_string(a);
  int c=0;
  fo(i,keta(a)){
    c+=b[i]-'0';
  }
  return c;
}
/*struct aa{
	vector<int> gt;
  aa(int n){
	gt= vector<int>(n, 1);
  }
	void c(V<int> d,int b){
	if(d[b]==0){
		gt[d[b]-1]++;
		gt[gt.sz-1]++;
	}
	else{
		gt[d[b]-1]++;
		c(d,d[d[b]]-1);
	}
}
void cok(int a){
	cout<<gt[a-1]<<endl;
	fo(i,a-1)
	cout<<gt[i]<<endl;
}
};
*/
signed main(){
	int a;
	cin>>a;
	cout<<(a*3+b)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:177:20: error: 'b' was not declared in this scope
  177 |         cout<<(a*3+b)/2<<endl;
      |                    ^
Language: C++

#include<bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   int a,q;cin >>a >> q;
      |           ^~~
      |           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 << sum / 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:6:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << sum / 2 << 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 <cstdio>
using namespase std;
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  b+=a*3;
  printf("%d\n",b/2);
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'print' was not declared in this scope; did you mean 'printf'?
   12 |                 print("0\n");
      |                 ^~~~~
      |                 printf
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:3: error: 'ans' undeclared (first use in this function)
    4 |   ans=(a*3+p)/2;
      |   ^~~
main.c:4:3: note: each undeclared identifier is reported only once for each function it appears in
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:10: 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, P;
    cin >> A >> P;
    cout << (A * 3 + P) / 2 << endl;
    return 0;
}

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

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
void main()
{
	int n,l;
	scanf("%d %d", &n,&l);

	int *apples = malloc(n*sizeof(int));
	
	int sum = 0;

	for(int i=0; i<n; i++)
	{
		apples[i] = l+i;
		sum = sum + apples[i];
	}

	int tempsum = sum - apples[n-1];
	int j=0, index=0;
	for(int i=n-2; i>=0; i--)
	{
		if(tempsum<(abs(sum-apples[i])))
			tempsum = sum - apples[i];
	}
		

	printf("%d", tempsum);

	free(apples);

}


Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:29: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
    9 |         int *apples = malloc(n*sizeof(int));
      |                       ~~~~~~^~~~~~~~~~~~~~~
      |                             |
      |                             void*