Language: C++

#include<bits/stdc++.h>
using namespace std;
///------------input------------//
#define fi freopen("in.txt","r",stdin)
#define fo freopen("out.txt","w",stdout)
#define sc1(a) scanf("%lld",&a)
#define sc3(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define sc2(a,b) scanf("%lld%lld",&a,&b)
#define scar(arr,n) for(int index=0;index<n;index++)sc1(arr[index]);

///------------Vector------------///

#define vs vector<string>
#define vll vector<long long int >
#define vc vector<char>
#define vpll vector<pair<long long,long long> >
#define vvll vector<vector<long long>>
#define up(v,x) upper_bound(v.begin(),v.end(),x)-v.begin()
#define low(v,x) lower_bound(v.begin(),v.end(),x)-v.begin()
#define all(a) (a).begin(),(a).end()

///-------------LOOP--------------///

#define foreach(i,a) for(__typeof((a).begin()) i = (a).begin(); i != (a).end(); ++i)
#define cases ll t,ti=0;cin>>t;while((ti++)!=t)
#define fr(a,n) for(long long i = (a); i < (n); i++)
#define fri(a,n) for(long long i = (a); i <= (n); i++)

///------------limite------------///
#define eps 1e-13
#define mod 1000000007LL
#define PI acos(-1)
#define INF 1000000011

///------------PAIR------------///

#define pii pair<int, int>
#define pll pair<long long, long long>
#define pil pair<int, long long>
#define pli pair<long long, int>
#define pcc pair<char, char>
#define pdd pair<double, double>
#define mk make_pair
#define ff first
#define ss second

///------------Extra------------///

#define clc clock_t time_req=clock()
#define pclc cout<<setprecision(10)<<(float)time_req/CLOCKS_PER_SEC
#define ll long long int
#define nl printf("\n")
#define qll queue<long long int >
#define mll map<long long int , long long int>
#define pb(x) push_back(x)
#define gtl(x) getline(cin, (x))
#define flsh fflush(stdout)
#define sws ios_base::sync_with_stdio(false); cin.tie(0)
#define mst(x) memset(x,0,sizeof(x))
#define Log(x,a) (log(a)/log(x))
#define PNY(f,a) printf((f==a)?"NO\n":"YES\n");
#define PYN(f,a) printf((f==a)?"YES\n":"NO\n");
bool CMP(int a, int b) { return a>b; }
ll p=1e9+7;
ll power2(ll n)
{
    ll res=1;
    for(ll i=1;i<=n;i++)
        res*=2;
    return res;
}
ll power(ll x, ll y)
{
    ll res = 1;     // Initialize result

    x = x % p; // Update x if it is more than or
                // equal to p

    if (x == 0) return 0; // In case x is divisible by p;

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}
ll cnt1=0,u,cnt=0,n;
vector<vector<ll> >adj1(200010);
vector<pair<ll,ll> >adj[200010];
vector<ll>wt(200010);
ll visi[310068],vis[300100],last1[10000];
vector<ll> viso;
bool ok=false;
ll m,ans=0;
/*void dfs(ll k,ll parent)
{
  if(vis[k]!=1){
    vis[k]=1;
    if(a[k]==1)
      {
        a[k]=parent+1;
      }
    //cout<<1<<endl;
    if(a[k]<=m)
    {
         if(adj[k].size()==1&&k!=1)
          ans++;
          else
          {
            for(ll i=0;i<adj[k].size();i++)
                dfs(adj[k][i],a[k]);
          }
    }


  }

    //cout<<4<<endl;
}
*/

/*vector<ll> bfs(const vector<vector<ll> >& adj,ll s)
{
    ll n=adj.size();
    vector<ll>dis(n,1000'000'000);
    queue<ll>q;
    dis[s]=0;
    q.push(s);
    while(!q.empty())
    {
        ll u=q.front();
        q.pop();
        for(ll v: adj[u])
        {
            if(dis[v]>dis[u]+1)
            {
                dis[v]=dis[u]+1;
                q.push(v);
            }
        }
    }
    return move(dis);
}*/
#define PI 3.14159265
 ll dp[200010];
bool mycompare(string s,string t)
{
    string x=s+t;
    string y=t+s;
    if(x>y)
        return 1;
    else
        return 0;
}


ll maxi=1e7;
set<ll>w;

pair<ll, ll> rotate(ll x, ll y, ll a, ll b, ll t)
{
    ll i;
  for (i = 0; i < t; i++)
  {
    ll p = a + b - y, q = x + b - a;
    x = p, y = q;
  }

  pair<ll, ll> P = make_pair(x, y);
  return P;
}

ll dist(ll x1, ll y1, ll x2, ll y2)
{
  ll d = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
  return d;
}

bool check(ll x1, ll y1, ll x2, ll y2, ll x3, ll y3, ll x4, ll y4)
{
  ll d2 = dist(x1, y1, x2, y2);
  ll d3 = dist(x1, y1, x3, y3);
  ll d4 = dist(x1, y1, x4, y4);

  if (d2 == 0 || d3 == 0 || d4 == 0)
    return false;

  if (d2 == d3 && d4 == 2 * d2 && 2 * dist(x2, y2, x4, y4) == dist(x2, y2, x3, y3))
    return true;

  if (d3 == d4 && d2 == 2 * d3 && 2 * dist(x2, y2, x3, y3) == dist(x3, y3, x4, y4))
    return true;

  if (d2 == d4 && d3 == 2 * d2 && 2 * dist(x2, y2, x3, y3) == dist(x2, y2, x4, y4))
    return true;

  return false;
}
#ifdef Akshat
   #include "../../trace.h"
#else
  #define trace(args...)
#endif
//vector<ll>adj(200010);
ll A[20010];
class SegmentTree{
//0-Indexed
//update(index,value)
//query(l,r)
public:
    vector<ll>A;
    vector<ll>tree;
    ll n,d;
    SegmentTree(vector<ll> &inp, ll depth)
    {
        A=inp;
        d=depth;
        n=A.size();
        tree.resize(4*n);
        build(1,0,n-1,d);
    }

void build(ll node, ll start,ll end,ll depth)
{
    if(start==end)
        tree[node]=A[start];
    else
    {
        ll mid=(start+end)/2;
        build(2*node,start,mid,depth-1);
        build(2*node+1,mid+1,end,depth-1);
        if(depth%2==1)
        tree[node]=tree[2*node]|tree[2*node+1];
        else
            tree[node]=tree[2*node]^tree[2*node+1];
    }
}
void update(ll node,ll start,ll end,ll idx,ll depth)
{
    if(start==end)
    {
        tree[node]=A[start];
    }
    else
    {
        ll mid=(start+end)/2;
        if(start<=idx && idx<=mid)
            update(2*node,start,mid,idx,depth-1);
        else
            update(2*node+1,mid+1,end,idx,depth-1);
           if(depth%2==1)
        tree[node]=tree[2*node]|tree[2*node+1];
        else
            tree[node]=tree[2*node]^tree[2*node+1];
    }
}
ll update(ll index,ll value)
{
    A[index]=value;
    update(1,0,n-1,index,d);
    return tree[1];
}
};
/*ll query(ll node,ll start,ll end,ll l,ll r)
{
    if(r<start || end<l)
      return 0;
    if(l<=start && end<=r)
        return tree[node];
    ll mid=(start+end)/2;
    ll p1=query(2*node+1,start,mid,l,r);
    ll p2=query(2*node+2,mid+1,end,l,r);
    return (p1|p2);
}*/
priority_queue<pair<ll,ll>,vector<pair<ll,ll> >,greater<pair<ll,ll> > >pq;
void dj(ll s)
{
    pair<ll,ll>pi;
    for(ll i=0;i<adj[s].size();i++)
    {
        if(vis[adj[s][i].first]>vis[s]+adj[s][i].second)
        {
            vis[adj[s][i].first]=vis[s]+adj[s][i].second;
            visi[adj[s][i].first]=s;
            pq.push(mk(vis[adj[s][i].first],adj[s][i].first));
        }
    }
    if(pq.empty())
        return;
    pi=pq.top();
    pq.pop();
    dj(pi.second);
}
void path(ll x)
{
    if(x==0)
        return ;
    path(visi[x]);
    cout<<x<<" ";
}
int main()
{
  ll x1,x2,x3,x4,x5;
  cin>>x1>>x2>>x3>>x4>>x5;
  if(x1==0)
    cout<<1<<endl;
  else if(x2==0)
    cout<<2<<endl;
  else if(x3==0)
    cout<<3<<endl;
  else if(x4==0)
    cout<<4<endl;
  else
    cout<<5<<endl;
}



Compiler output:
a.cc:150:9: warning: "PI" redefined
  150 | #define PI 3.14159265
      |         ^~
a.cc:32:9: note: this is the location of the previous definition
   32 | #define PI acos(-1)
      |         ^~
a.cc: In function 'int main()':
a.cc:318:12: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
  318 |     cout<<4<endl;
      |     ~~~~~~~^~~~~
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
                 from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
 1143 |     operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
 1224 |     operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1317 |     operator<(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
 1391 |     operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   couldn't deduce template parameter '_Bi_iter'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
 1485 |     operator<(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
 1560 |     operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   couldn't deduce template parameter '_Bi_iter'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
 1660 |     operator<(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  318 |     cout<<4<endl;
      |             ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
 1045 |     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
  318 |     cout<<4<endl;
      |             ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
  448 |     operator<(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  493 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1694 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
 1760 |     operator<(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
  318 |     cout<<4<endl;
      |             ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
  673 |     operator< (basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
  680 |     operator< (basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
  688 |     operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   couldn't deduce template parameter '_CharT'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3874 |     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note:   template argument deduction/substitution failed:
a.cc:318:13: note:   'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
  318 |     cout<<4<endl;
      |             ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
 3888 |     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3