Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int INF=1e10;
int MOD=1e9+7;
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
}
int kurai(int a,int b){
  int m=pow(10,b),n=pow(10,b-1);
  return (a%m)/n;
}
int gcd(int a,int b){
  if(a%b==0)
    return b;
  return gcd(b,a%b);
}
int lcm(int a,int b){
    return a/gcd(a,b)*b;
}
bool sosuu(int a){
  bool b=1;
  if(a<=1)
    return 0;
  else{
  rep1(i,sqrt(a)-1){
  if(a%(i+1)==0)
  b=0;
  }
  return b;
  }
}
int modpow(int a,int b,int m=MOD){
	if(!b)return 1;	if(b&1)return modpow(a,b-1,m)*a%m;
	int memo = modpow(a,b>>1,m);
	return memo*memo%m;
}
int fact_mod(int n) {
    int f=1; 
for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD;
    return f;
}
int mod_pow(int x,int n) {
    int res=1;
    while(n>0){
        if(n&1) res=(res*x)%MOD; 
        x=(x*x)%MOD;        
n>>=1; 
    }
    return res;
}
int c_mod(int n, int r) {
    if(r>n-r) r=n-r;
    if(r==0) return 1;
    int a=1;
    rep(i,r) 
a=a*((n-i)%MOD)%MOD;
    int b=mod_pow(fact_mod(r), MOD-2);
    return (a%MOD)*(b%MOD)%MOD;
}
signed main(){
  string a;
  cin>>a;
  for(int i=0;i<a;i+=2)
    cout<<a[i];
  cout<<' '<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:85:16: error: no match for 'operator<' (operand types are 'long long int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   85 |   for(int i=0;i<a;i+=2)
      |               ~^~
      |               | |
      |               | std::string {aka std::__cxx11::basic_string<char>}
      |               long long int
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:2:
/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:85:17: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
/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:85:17: note:   mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
/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:85:17: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
/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:85:17: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
/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:85:17: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
/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:85:17: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
/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:85:17: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/vector:76,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/debug/vector:892:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::__debug::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)'
  892 |     operator<(const vector<_Tp, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/debug/vector:892:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::vector<_Tp, _Alloc>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/deque:77,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:139:
/usr/include/c++/14/debug/deque:690:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::__debug::operator<(const deque<_Tp, _Allocator>&, const deque<_Tp, _Allocator>&)'
  690 |     operator<(const deque<_Tp, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/debug/deque:690:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::deque<_Tp, _Allocator>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/list:69,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:150:
/usr/include/c++/14/debug/list:943:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::__debug::operator<(const list<_Tp, _Allocator>&, const list<_Tp, _Allocator>&)'
  943 |     operator<(const list<_Tp, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/debug/list:943:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::list<_Tp, _Allocator>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/debug/map:43,
                 from /usr/include/c++/14/map:69,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152:
/usr/include/c++/14/debug/map.h:769:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Allocator> bool std::__debug::operator<(const map<_Key, _Tp, _Compare, _Allocator>&, const map<_Key, _Tp, _Compare, _Allocator>&)'
  769 |     operator<(const map<_Key, _Tp, _Compare, _Allocator>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/debug/map.h:769:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::map<_Key, _Tp, _Compare, _Allocator>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/debug/map:44:
/usr/include/c++/14/debug/multimap.h:651:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Allocator> bool std::__debug::operator<(const multimap<_Key, _Tp, _Compare, _Allocator>&, const multimap<_Key, _Tp, _Compare, _Allocator>&)'
  651 |     operator<(const multimap<_Key, _Tp, _Compare, _Allocator>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/debug/multimap.h:651:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::multimap<_Key, _Tp, _Compare, _Allocator>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/debug/set:41,
                 from /usr/include/c++/14/set:69,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158:
/usr/include/c++/14/debug/set.h:630:5: note: candidate: 'template<class _Key, class _Compare, class _Allocator> bool std::__debug::operator<(const set<_Key, _Compare, _Allocator>&, const set<_Key, _Compare, _Allocator>&)'
  630 |     operator<(const set<_Key, _Compare, _Allocator>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/debug/set.h:630:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::set<_Key, _Compare, _Allocator>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/debug/set:42:
/usr/include/c++/14/debug/multiset.h:620:5: note: candidate: 'template<class _Key, class _Compare, class _Allocator> bool std::__debug::operator<(const multiset<_Key, _Compare, _Allocator>&, const multiset<_Key, _Compare, _Allocator>&)'
  620 |     operator<(const multiset<_Key, _Compare, _Allocator>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/debug/multiset.h:620:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::multiset<_Key, _Compare, _Allocator>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
In file included from /usr/include/c++/14/forward_list:45,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:175:
/usr/include/c++/14/debug/forward_list:878:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::__debug::operator<(const forward_list<_Tp, _Allocator>&, const forward_list<_Tp, _Allocator>&)'
  878 |     operator<(const forward_list<_Tp, _Alloc>& __lx,
      |     ^~~~~~~~
/usr/include/c++/14/debug/forward_list:878:5: note:   template argument deduction/substitution failed:
a.cc:85:17: note:   mismatched types 'const std::__debug::forward_list<_Tp, _Allocator>' and 'long long int'
   85 |   for(int i=0;i<a;i+=2)
      |                 ^
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