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

#include<iostream>
using namespace stg;
int main(){
  int a,b;
  cin >> a >> b;
  cout << (a+b+1)/2 << endl;
}

Compiler output:
a.cc:2:17: error: 'stg' is not a namespace-name
    2 | using namespace stg;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b;
      |   ^~~
      |   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 << (a+b+1)/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:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << (a+b+1)/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 a, b;
  cin >> a >> b;
  cout << (a + b + 2 - 1) / x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: 'x' was not declared in this scope
    7 |   cout << (a + b + 2 - 1) / x << endl;
      |                             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: redeclaration of 'int ans'
    7 |   int ans = (a+b)/2;
      |       ^~~
a.cc:5:13: note: 'int ans' previously declared here
    5 |   int a, b, ans;
      |             ^~~
Language: C++

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

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

Compiler output:
a.cc:1:10: 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, b;
  cin >> a >> b;
  cout << (a+b)/2+(a%2+b%2)%2 << endl;
}

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

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

int main() {
int a, b, x;
cin >> a >> b;
cout<<x  = (a + b)/2<<endl;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 | cout<<x  = (a + b)/2<<endl;
      |            ~~~~~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int a , b, c;
  cin >> a >> b;
  if (a + b) % 2 == 0
    c = (a + b) / 2;
  else
    c = (a + b) / 2 + 1;
  end
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected primary-expression before '%' token
    8 |   if (a + b) % 2 == 0
      |              ^
a.cc:12:6: error: expected ';' before 'cout'
   12 |   end
      |      ^
      |      ;
   13 |   cout << c << endl;
      |   ~~~~
a.cc:13:20: error: statement cannot resolve address of overloaded function
   13 |   cout << c << endl;
      |                    ^
Language: C++

#include <iostream>

int main() {
  int a = 0, b = 0, x = 0;
  
  std::cin >> a >> b;
  
  x = ((a + b) / 2 ) + ((a + b) % 2)
    
  std::cout << x << std::endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: expected ';' before 'std'
    8 |   x = ((a + b) / 2 ) + ((a + b) % 2)
      |                                     ^
      |                                     ;
    9 | 
   10 |   std::cout << x << std::endl;
      |   ~~~
Language: C++

#include <stdio.h>
 
int main() {
  float a,b,c;
  cin >> a >> b;
  int d;
  c=(a+b)/2+0.5;
  d=c;
  cout << d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a >> b;
      |   ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout << d << endl;
      |   ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope
    9 |   cout << d << endl;
      |                ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'end1' was not declared in this scope
    9 |   cout << "c"<<end1;
      |                ^~~~
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.printf((int)Math.ceil((a + b) / 2);
    }
}

Compiler output:
Main.java:13: error: ')' or ',' expected
        System.out.printf((int)Math.ceil((a + b) / 2);
                                                     ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            solve(sc);
        }
    }

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.printf("%d%n", Math.floor((a + b) / 2);
    }
}

Compiler output:
Main.java:13: error: ')' or ',' expected
        System.out.printf("%d%n", Math.floor((a + b) / 2);
                                                         ^
1 error
Language: C++

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

int main(){
  double a, b, ave;
  int ans;
  cin >> a >> b;
  
  ave = (a+b)/2
  ans = ave
    
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before 'ans'
    9 |   ave = (a+b)/2
      |                ^
      |                ;
   10 |   ans = ave
      |   ~~~
Language: C++

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

int main(){
  double a, b;
  int ans;
  cin >> a >> b;
  
  ave = (a+b)/2
  ans = ave
    
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'ave' was not declared in this scope
    9 |   ave = (a+b)/2
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() 
{
	int a, b;
  	int x;
  
  	cin >> a >> b;
  	x = (a+b)/2
  	if(x%1==x){
  		cout << x << endl;
    }else{
    	cout << x+1 << endl;
    }
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before 'if'
   10 |         x = (a+b)/2
      |                    ^
      |                    ;
   11 |         if(x%1==x){
      |         ~~          
a.cc:13:6: error: 'else' without a previous 'if'
   13 |     }else{
      |      ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:63: error: expected '}' at end of input
    9 |   cout << ((a + b) / 2) + (a + b - ((a + b) / 2) * 2) << endl;
      |                                                               ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
 int a,b,c;
 cin >> a >> b;
 double d;
  c = (a + b)/2; //切り捨て
    d = (a + b)/2 //小数点以下あり
  if(d-c>0){cout << c+1 << endl;}
    else { cout << c << endl;}
    

}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'if'
    9 |     d = (a + b)/2 //小数点以下あり
      |                  ^
      |                  ;
   10 |   if(d-c>0){cout << c+1 << endl;}
      |   ~~              
a.cc:11:5: error: 'else' without a previous 'if'
   11 |     else { cout << c << endl;}
      |     ^~~~
Language: C++

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

int main() {
 int a,b,c;
 cin >> a >> b;
 double d;
  c = (a + b)/2 //切り捨て
  
  d = (a + b)/2 //小数点以下あり
  if((d-c)>0){cout << c+1 << endl;}
    else{ cout << c << endl;}
    

}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'd'
    8 |   c = (a + b)/2 //切り捨て
      |                ^
      |                ;
    9 | 
   10 |   d = (a + b)/2 //小数点以下あり
      |   ~             
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else{ cout << c << endl;}
      |     ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before ')' token
    8 |     cout << (a+b+1))/2 << endl;
      |                    ^
      |                    ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before '}' token
    8 |   return 0
      |           ^
      |           ;
    9 | }
      | ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> a >> b;
      |   ^~~
a.cc:4:3: error: 'cout' was not declared in this scope
    4 |   cout << (a+b+1)/2 << endl;
      |   ^~~~
a.cc:4:24: error: 'endl' was not declared in this scope
    4 |   cout << (a+b+1)/2 << endl;
      |                        ^~~~
Language: C++

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

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main() {
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main() {
      | ~~~             
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 >> b;
      |   ^~~
      |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a + b + 1) /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:7:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a + b + 1) /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 namespace
  
int main() {
  int a, b;
  cin >> a >> b;
  cout << (a + b + 1) /2 << endl;
}
  
  

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main() {
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main() {
      | ~~~             
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 >> b;
      |   ^~~
      |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a + b + 1) /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:7:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a + b + 1) /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 namespace
  
int main() {
  int a, b;
  cin >> a >> b;
  cout << (a + b) /2 << endl;
}
  
  

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main() {
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main() {
      | ~~~             
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 >> b;
      |   ^~~
      |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a + b) /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:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a + b) /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 namespace
  
int main() {
  double a, b;
  cin >> a >> b;
  cout << (a + b) /2 << endl;
}
  
  

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main() {
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main() {
      | ~~~             
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 >> b;
      |   ^~~
      |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a + b) /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:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a + b) /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 namespace
  
int main() {
  double a, b;
  cin >> a >> b;
  cout << (a + b) /2 << endl;
  
}
  
  

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main() {
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main() {
      | ~~~             
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 >> b;
      |   ^~~
      |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a + b) /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:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a + b) /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 namespace
  
  int main() {
  double a, b;
  cin >> a >> b;
  cout << (a + b) /2 << endl;
  
}
  
  

Compiler output:
a.cc:4:3: error: expected identifier before 'int'
    4 |   int main() {
      |   ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 |   int main() {
      |   ~~~           
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 >> b;
      |   ^~~
      |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a + b) /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:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a + b) /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>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    double a,b;
    cin >> a >> b;
    double x = (a+b)/2;
    cout << round(x) << endl;
}

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

int A,B;
int main(){
  	scanf("%d%d",&A,&B);
  	printf("%d\n",A+B+1>>1);
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d%d",&A,&B);
      |         ^~~~~
a.cc:4:9: error: 'printf' was not declared in this scope
    4 |         printf("%d\n",A+B+1>>1);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int A,B;
Language: C++

#include<stdio.h>
using namespace std;
int main(){
  double a,b;
  cin >> a >> b;
  cout << (a+b)/2 << endl;
  return 0;
}


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

#include<iostream>

using namespace std;

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

	cout << (a + b + 1) / 2);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before ')' token
    9 |         cout << (a + b + 1) / 2);
      |                                ^
      |                                ;
Language: C++

#include <iostream>
#include <string>
#include <vector>
typedef unsigned int UINT;
using namespace std;


int main(void) {
    int A, B;
    cin >> A >> B;
    float x = A + B;
    x /= 2;
    cout << ceil(x) << endl;
    return 0;
}


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

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



bool is_reachable(vector<int> axis,int goal){
    int sum=accumulate(axis.begin(),axis.end(),0);
    int res;
    res=sum-goal;
    if(res %2 == 1 or res <0) return false;
    res/=2;
    int tmp=1;
    for(auto itr = axis.begin();itr!=axis.end();itr++){
        tmp=tmp | (tmp << *itr);
    }
    if(tmp & 1 << res) return true;
    else return false;
}


int main(){
    string s;
    int x,y;
    cin >> s;
    cin >>x >>y;

    vector<int>x_axis;
    vector<int>y_axis;

    int tmp=0;
    bool flag=true;
    for(int i=0;i<s.length();i++){
        if(s[i]=='F') tmp+=1;
        else{
            if(flag){
                x_axis.push_back(tmp);
            }
            else y_axis.push_back(tmp);

            tmp=0;
            flag = not flag;
        }
    }
    if(tmp!=0){
        if(flag) x_axis.push_back(tmp);
        else y_axis.push_back(tmp);
    }
    if(is_reachable(x_axis,x) and is_reachable(y_axis,y)) printf("Yes\n");
    else printf("No\n");


}

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

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

int main() {
int a , b;
double c;
cin >> a >> b;
c = (a + b) /2.0;
cout << ceil((c) << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 | cout << ceil((c) << endl;
      |              ~~~~^~~~~~~
Language: C++

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

int main() {
int a , b;
double c;
cin >> a >> b;
c = (a + b) /2.0;
cout << ceil((c) << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 | cout << ceil((c) << endl;
      |              ~~~~^~~~~~~
Language: C++

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

int main() {
int a , b;
double c;
cin >> a >> b;
c = (a + b) /2.0
cout << ceil((c) << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'cout'
    8 | c = (a + b) /2.0
      |                 ^
      |                 ;
    9 | cout << ceil((c) << endl;
      | ~~~~
Language: C++

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

int main() {
  int a,b,x;
  cin >> a >> b;
  x!=(a+b)/2+1
    cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'cout'
    7 |   x!=(a+b)/2+1
      |               ^
      |               ;
    8 |     cout << x << endl;
      |     ~~~~
Language: C++

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

int main(){
  int a , b , c;
  double x;
  x = 0.5
  cin >> a >> b;
  c = ( a + b ) / 2;
  cout << c + x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'cin'
    7 |   x = 0.5
      |          ^
      |          ;
    8 |   cin >> a >> b;
      |   ~~~
Language: C++

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

int main(){
  int a , b , c;
  double x;
  x = 0.5
  cin >> a >> b;
  c = ( a + b ) / 2
  cout << c + x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'cin'
    7 |   x = 0.5
      |          ^
      |          ;
    8 |   cin >> a >> b;
      |   ~~~     
a.cc:9:20: error: expected ';' before 'cout'
    9 |   c = ( a + b ) / 2
      |                    ^
      |                    ;
   10 |   cout << c + x << endl;
      |   ~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:10: error: expected expression before '%' token
    5 |   if(a+b)%2==0{
      |          ^
Language: C++

#include <iostream>

using namespace std;

int main() {
  string s,t;
  cin >> s;
  cin >> t;
  sort(t.begin(),t.end(),greater<>());
  if(s<t){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}


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

#include <iostream>

using namespace std;

int main() {
  string s,t;
  cin >> s;
  cin >> t;
  sort(t.begin(),t.end(),greater());
  if(s<t){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}


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

#include <iostream>
using namespace std;
int main() {
int a, b, c;
  cin >> a >> b;
  if (( a + b ) % == 1) {
c = 1;
  };
  else {
    c = 0;
  };
  cout << ( a + b ) /2 + c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected primary-expression before '==' token
    6 |   if (( a + b ) % == 1) {
      |                   ^~
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else {
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
int a, b, c;
  cin >> a >> b;
  if (( a + b ) % == 1) {
c = 1;
  };
  else {
    c = 0;
  };
  cout << (a+b)/2+c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected primary-expression before '==' token
    6 |   if (( a + b ) % == 1) {
      |                   ^~
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else {
      |   ^~~~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'cout'
    8 |   c = (a+b)/2
      |              ^
      |              ;
    9 |   cout << c << endl;
      |   ~~~~
Language: C

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

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

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

int main() {
  // ここにプログラムを追記
  int a,b,c;
  cin >> a >> b;
  c=(a+b)/2
  cout<< c <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'cout'
    8 |   c=(a+b)/2
      |            ^
      |            ;
    9 |   cout<< c <<endl;
      |   ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   11 |     cout  << ((a+b+1)/2<<endl;
      |               ~~~~~~~~~^~~~~~
a.cc:11:30: error: expected ')' before ';' token
   11 |     cout  << ((a+b+1)/2<<endl;
      |              ~               ^
      |                              )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before 'cin'
    8 |   cin >> a
      |           ^
      |           ;
    9 |   cin >> b
      |   ~~~
Language: C++

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

int main() {
  
  int a, b;
  
  cin >> a >> b;
    
  int x = ((a + b) / 2) + 1
    
  cout << x << endl;
}


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

#inlucde <iostream>
using namespace std;
int main()
{
  int a,b;
  cin >> a >> b;
  cout << (a+b)/2 << endl;
  
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    1 | #inlucde <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | #inlucde <iostream>
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << (a+b)/2 << endl;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:22: error: 'endl' was not declared in this scope
    7 |   cout << (a+b)/2 << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inlucde <iostream>
Language: C++

#include<stdio.h>
int main(){
    int a,b,f;
    scanf("%d %d",&a,&b);
    f=round((float)(a+b)/2);
    printf("%d\n",f);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'round' was not declared in this scope
    5 |     f=round((float)(a+b)/2);
      |       ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
int A,B;
  cin>>A>>B;
  cout<<(a+b+1)/2<<endl;
}

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

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before ')' token
    8 |     cout << (a+b+1)/2) << endl;
      |                      ^
      |                      ;
Language: C++

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

int main() {
  double a, b;
  cin >> a >> b;
  int c = (a + b)/2;
  cou << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
    8 |   cou << c << endl;
      |   ^~~
      |   cos
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    7 |   cout << (((a + b) / 2) + 0.5) % 1 << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~ ^ ~
      |                          |        |
      |                          double   int
Language: C++

#include<iostream>
using namaspace std;
int main(){
  int a,b;
  cin >> a >> b ;
  cout >> (a+b)/2+0.5 >> endl;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namaspace'
    2 | using namaspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b ;
      |   ^~~
      |   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 >> (a+b)/2+0.5 >> 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:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout >> (a+b)/2+0.5 >> 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 a,b;
  cin >> a >> b;
  int c = {(a + b) +1}/2;
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ',' or ';' before '/' token
    7 |   int c = {(a + b) +1}/2;
      |                       ^
Language: C++

#include <iostream>
using namespace std;

int main () {
  int a,b;
  cin >> a >> b;
  int c = {(a + b) +1)}/2;
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected '}' before ')' token
    7 |   int c = {(a + b) +1)}/2;
      |           ~          ^
a.cc:7:22: error: expected ',' or ';' before ')' token
a.cc: At global scope:
a.cc:7:24: error: expected unqualified-id before '/' token
    7 |   int c = {(a + b) +1)}/2;
      |                        ^
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout << c << endl;
      |   ^~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

#include <iostream>
using namesapace std;

int main () {
  int a,b;
  cin >> a >> b;
  int c = {(a + b) +1)}/2;
  cout << c << endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapace'
    2 | using namesapace 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 >> b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:22: error: expected '}' before ')' token
    7 |   int c = {(a + b) +1)}/2;
      |           ~          ^
a.cc:7:22: error: expected ',' or ';' before ')' token
a.cc: At global scope:
a.cc:7:24: error: expected unqualified-id before '/' token
    7 |   int c = {(a + b) +1)}/2;
      |                        ^
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout << c << endl;
      |   ^~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

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

int main() {
  int a,b;
  cin >> a >> b;
  double N = a * b /2+0.5;
  int M = N
  cout << M << endl;
}


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

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

int main() {
  int a,b;
  cin >> a >> b;
  double N = a * b /2+0.5
  int M = N
  cout << M << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int M = N
      |   ^~~
Language: C++

#include <iostream>

int main()
{
  int a,b;
  std::cin >> a >> b;
  std::cout << (int)std::ceil((a+b)/2.0) << std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: 'ceil' is not a member of 'std'
    7 |   std::cout << (int)std::ceil((a+b)/2.0) << std::endl;
      |                          ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> a >> b;
      |   ^~~
      |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << (a + b) / 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:5:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout << (a + b) / 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>
int main() {
  int a, b;
  cin >> a >> b; 
  cout << (a + b) / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> a >> b;
      |   ^~~
      |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << (a + b) / 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:5:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout << (a + b) / 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>
int main() {
  int a, b;
  cin >> a, b;
  cout << (a + b) / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> a, b;
      |   ^~~
      |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << (a + b) / 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:5:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout << (a + b) / 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>
int main() {
  int a, b, x;
  cin >> a, b;
  int x = (a + b) / 2
  cout << (a + b) / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> a, b;
      |   ^~~
      |   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:5:7: error: redeclaration of 'int x'
    5 |   int x = (a + b) / 2
      |       ^
a.cc:3:13: note: 'int x' previously declared here
    3 |   int a, b, x;
      |             ^
Language: C++

#include <bits/stdc++.h>
int main() {
  int a, b;
  double x
  cin >> a, b;
  double x = (a + b) / 2;
  cout << (a + b) / 2 << endl;
  int y = x;
  cout << (a + b) / 2 << endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'cin'
    5 |   cin >> a, b;
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << (a + b) / 2 << endl;
      |   ^~~~
      |   std::cout
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:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << (a + b) / 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>
int main() {
  int a, b;
  double x
  cin >> a, b;
  double x = (a + b) / 2
  cout << (a + b) / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'cin'
    5 |   cin >> a, b;
      |   ^~~
a.cc:7:3: error: expected ',' or ';' before 'cout'
    7 |   cout << (a + b) / 2 << endl;
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> a, b;
      |   ^~~
      |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << (a + b) / 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:5:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout << (a + b) / 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 namespace std
  
int main()
{
  int a, b;
  cin >> a, b;
  cout << (a + b) / 2 << endl;
}

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