Language: C++

#include "bits/stdc++.h"
#include <chrono>

using namespace std;
using namespace std::chrono;

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

#define forn(ii,nn) for (int ii = 0; ii < nn; ++ii)
#define gcd(ade,bde) __gcd(ade,bde)
#define vi vector<int>
#define vll vector<ll>
#define vs vector<string>
#define vc vector<char>
#define pb(ade) push_back(ade)
#define pp pop_back()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define type(ade) typeid(ade).name();
#define starting() auto start = high_resolution_clock::now()
#define ending() auto stop = high_resolution_clock::now();\
auto duration = duration_cast<microseconds>(stop - start);\
cerr << "\n" << "\n" << "Execution Time : "<< duration.count()/1000 << " ms" << "\n"

template <typename T1>
void print(vector<T1> arr) {
	int l = (int)arr.size();
	cerr << "[" ;
	for(int i = 0; i < l; i++) {
		(i == l - 1) ? cerr << arr[i] : cerr << arr[i] << "," ;
	}
	cerr << "]" << "\n";
}

template <typename T1>
void printArr(int arr[], int l) {
	cerr << "[" ;
	for (int i = 0; i < (int)l; i++) {
		(i == l-1) ? cerr << arr[i] : cerr << arr[i] << "," ;
	}
	cerr << "]" << "\n";
}

template <typename T1>
void console(vector<vector<T1>> arr) {
	for (int i = 0; i < (int)arr.size(); ++i) {
		cerr << "\n" << " [" ;
	    for(int j = 0; j < (int)arr[i].size(); ++j) {
			(j == (int)arr[i].size() - 1) ? cerr << arr[i][j] : cerr << arr[i][j] << "," ;
		}
	    cerr << "]";
	}
	cerr << "\n";
}
template <typename T1,typename T2>
void mapped(map<T1,T2> m) {
	for(auto ite = m.begin(); ite != m.end(); ++ite){
		cerr << "'" << ite->first << "'"<< " : " << ite->second << "\n";
	}
}

template <typename T1 , typename T2>
void mappedArr(map<T1,vector<T2>> m) {
	for (auto ity = m.begin(); ity != m.end(); ++ity) {
		cerr << "'" << ity->first << "'" << " : " << "[";
        for (int i = 0; i < (int)ity->second.size(); ++i) {
			(i == (int)ity->second.size() - 1) ? cerr << ity->second[i] : cerr << ity->second[i] << ",";
		}
		cerr << "]"<< "\n";
	}
}

string int_to_string(int x) {
    stringstream ss;
	ss << x;
	string ni = ss.str();
	return ni;
}
int char_to_int(char c) {
	int n = (int)c - 48;
	return n;
}
int string_to_int(string x) {
	int n;
	stringstream s(x);
	s >> n;
	return n;
}

template <typename T1, typename T2>
void vectPair(vector<pair<T1,T2>> vp) {
	for (int arrp = 0; arrp< (int)vp.size(); ++arrp){
		cerr << "(" << vp[arrp].first << "," << vp[arrp].second << ")" << "\n" ;
	}
}

//unordered_map<int,int> um;
//unordered_set<int> us;
//set<int> s;
// v.front() gives the first element of vector
// v.back()  gives the last element of vector
// insert erase substr
//g++ -o Legendary-Grandmaster Legendary-Grandmaster.cpp&Legendary-Grandmaster.exe
//cd C:\Users\158si\Desktop\Algorithim\codeForces\elite
// for-bash cd C:/Users/158si/Desktop/Algorithim/codeForces/elite
//memset(arr,element,sizeofarray);//Converts the value ch to unsigned char and copies it
// into each of the first n characters of the object pointed to by str[].
//g++ -o impulse.exe impulse.cpp
//puts

typedef long long ll;

ll power (ll a, ll n) {
	ll ans = 1;
	for (ll i = 0; pow(2,i) <= n; ++i) {
		if ((n >> i) & 1) {
			ans *= a;
		}
		a = a * a;
	}
	return ans;
}

void inverse(vector<ll>& v, ll w, ll p) {
	v[1] = 1;
	for (ll i = 2; i < w; ++i) {
		v[i] = (p - (p/i) * v[p % i] % p) % p;
	}
}

ll gcd(ll a, ll b) {
	if (b == 0) {
	    return a;	
	}
	return gcd(b,a % b);
}

ll lcm(ll a, ll b) {
	ll ans = a * b / gcd(a,b);
	return ans;
}
	
const ll INF = 1e18L + 5;
const int MOD = 1e9 + 7;


//vectPair<type>(v)         //vector<pair> 
//mappedArr<type,type>(m)   //map<array>
//mapped<type,type>(m)      // map
//printArr<type>(arr,len)   //arry
//print<type>(vect)         //1D vector 
//console<type>(arr)        //2D vector

/**************************/


//some usefull links
//https://csacademy.com/app/graph_editor/    //for visualization of graph and  trees
//https://www.desmos.com/calculator          //for lines and graphs in a plane
//https://www.wolframalpha.com/              //for maths scientific calculation
//https://oeis.org/                          //another math scientific calculation webite
//https://codeforces.com/blog/entry/70330    //2d visualizer

///things to look for
// * int overflow, array bounds
// * special cases (n=1?)
// * analyze the time complexity properly
// * read the question properly and check for constrains
// * while using global variable make sure to re-initialize it

//contest 079 problem A test case 

int main() {
	IOS;
	//#ifndef ONLINE_JUDGE
	//freopen("input.txt", "r", satdin);
	//freopen("output.txt", "w", stdout);
	//#endif
   int a, b;
   cin >> (a + b + 1) / 2;
    return 0;
}










Compiler output:
a.cc: In function 'int main()':
a.cc:181:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
  181 |    cin >> (a + b + 1) / 2;
      |    ~~~ ^~ ~~~~~~~~~~~~~~~
      |    |                  |
      |    |                  int
      |    std::istream {aka std::basic_istream<char>}
In file included 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,
                 from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  170 |       operator>>(bool& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:170:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  174 |       operator>>(short& __n);
      |       ^~~~~~~~
/usr/include/c++/14/istream:174:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  177 |       operator>>(unsigned short& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:177:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
  181 |       operator>>(int& __n);
      |       ^~~~~~~~
/usr/include/c++/14/istream:181:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  184 |       operator>>(unsigned int& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:184:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  188 |       operator>>(long& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:188:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  192 |       operator>>(unsigned long& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:192:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  199 |       operator>>(long long& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:199:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  203 |       operator>>(unsigned long long& __n)
      |       ^~~~~~~~
/usr/include/c++/14/istream:203:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  219 |       operator>>(float& __f)
      |       ^~~~~~~~
/usr/include/c++/14/istream:219:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  223 |       operator>>(double& __f)
      |       ^~~~~~~~
/usr/include/c++/14/istream:223:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  227 |       operator>>(long double& __f)
      |       ^~~~~~~~
/usr/include/c++/14/istream:227:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'int'
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  328 |       operator>>(void*& __p)
      |       ^~~~~~~~
/usr/include/c++/14/istream:328:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: invalid conversion from 'int' to 'void*' [-fpermissive]
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
      |                       |
      |                       int
a.cc:181:23: error: cannot bind rvalue '(void*)((long int)(((a + b) + 1) / 2))' to 'void*&'
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
  122 |       operator>>(__istream_type& (*__pf)(__istream_type&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:122:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: invalid conversion from 'int' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
      |                       |
      |                       int
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match)
  126 |       operator>>(__ios_type& (*__pf)(__ios_type&))
      |       ^~~~~~~~
/usr/include/c++/14/istream:126:7: note:   conversion of argument 1 would be ill-formed:
a.cc:181:23: error: invalid conversion from 'int' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive]
  181 |    cin >> (a + b + 1) / 2;
      |           ~~~~~~~~~~~~^~~
      |                       |
      |                       int
/usr/include/c++/14/istream:13