Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long l;
#define .first x1;
#define .second x2;
int main(){
    int a,b,y=0;
    cin>>a>>b;
    int c[a],d[a];
    pair<double,int>x[a];
    for(int i=0;i<a;i++){
        cin>>c[i]>>d[i];
        if(c[i]*(i+1)*100+d[i]<b) x[i]x1=(c[i]*(i+1)*100+d[i])/c[i]*1.0;
        else if((i+1)*100*(c[i]-1)<b) x[i]x1=b/c[i]*1.0;
        else x[i]x1=(i+1)*100*1.0;
        x[i]x2=i+1;
    }
    sort(x,x+a);
    for(int i=a-1;i>=0;i--){
        if(x[i]x1==i*100+100){
            cout<<y+(b-1)/x[i]x1<<endl;
            break;
        }
        y+=c[x[i]x2-1];
        if(b<=x[i]x1*c[x[i]x2-1]){
            cout<<y<<endl;
            break;
        }
        for(int j=0;j<i;j++){
            if(c[mutu]*(mutu+1)*100+d[mutu]<b) x[j].first=(c[mutu]*(mutu+1)*100+d[mutu])/c[mutu]*1.0;
            else if((mutu+1)*100*(c[mutu]-1)<b) x[j].first=b/c[mutu];
            else x[j].first=(mutu+1)*100;
        }
        sort(x,x+i);
    }
    return 0;
}


Compiler output:
a.cc:4:9: error: macro names must be identifiers
    4 | #define .first x1;
      |         ^
a.cc:5:9: error: macro names must be identifiers
    5 | #define .second x2;
      |         ^
a.cc: In function 'int main()':
a.cc:13:39: error: expected ';' before 'x1'
   13 |         if(c[i]*(i+1)*100+d[i]<b) x[i]x1=(c[i]*(i+1)*100+d[i])/c[i]*1.0;
      |                                       ^~
      |                                       ;
a.cc:14:43: error: expected ';' before 'x1'
   14 |         else if((i+1)*100*(c[i]-1)<b) x[i]x1=b/c[i]*1.0;
      |                                           ^~
      |                                           ;
a.cc:15:18: error: expected ';' before 'x1'
   15 |         else x[i]x1=(i+1)*100*1.0;
      |                  ^~
      |                  ;
a.cc:16:13: error: expected ';' before 'x2'
   16 |         x[i]x2=i+1;
      |             ^~
      |             ;
a.cc:20:16: error: expected ')' before 'x1'
   20 |         if(x[i]x1==i*100+100){
      |           ~    ^~
      |                )
a.cc:20:15: error: could not convert 'x[i]' from 'std::pair<double, int>' to 'bool'
   20 |         if(x[i]x1==i*100+100){
      |            ~~~^
      |               |
      |               std::pair<double, int>
a.cc:21:26: error: no match for 'operator/' (operand types are 'int' and 'std::pair<double, int>')
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                     ~~~~~^~~~~
      |                       |      |
      |                       int    std::pair<double, int>
In file included 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/complex:430:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator/(const complex<_Tp>&, const complex<_Tp>&)'
  430 |     operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/14/complex:430:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   mismatched types 'const std::complex<_Tp>' and 'int'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/complex:439:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator/(const complex<_Tp>&, const _Tp&)'
  439 |     operator/(const complex<_Tp>& __x, const _Tp& __y)
      |     ^~~~~~~~
/usr/include/c++/14/complex:439:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   mismatched types 'const std::complex<_Tp>' and 'int'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/complex:448:5: note: candidate: 'template<class _Tp> std::complex<_Tp> std::operator/(const _Tp&, const complex<_Tp>&)'
  448 |     operator/(const _Tp& __x, const complex<_Tp>& __y)
      |     ^~~~~~~~
/usr/include/c++/14/complex:448:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   'std::pair<double, int>' is not derived from 'const std::complex<_Tp>'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
In file included from /usr/include/c++/14/valarray:605,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/bits/valarray_after.h:408:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__divides, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__divides, typename _Dom1::value_type>::result_type> std::operator/(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
  408 |     _DEFINE_EXPR_BINARY_OPERATOR(/, struct std::__divides)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:408:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/bits/valarray_after.h:408:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__divides, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__divides, typename _Dom1::value_type>::result_type> std::operator/(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
  408 |     _DEFINE_EXPR_BINARY_OPERATOR(/, struct std::__divides)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:408:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/bits/valarray_after.h:408:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__divides, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__divides, typename _Dom1::value_type>::result_type> std::operator/(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
  408 |     _DEFINE_EXPR_BINARY_OPERATOR(/, struct std::__divides)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:408:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   'std::pair<double, int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/bits/valarray_after.h:408:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__divides, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__divides, typename _Dom1::value_type>::result_type> std::operator/(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
  408 |     _DEFINE_EXPR_BINARY_OPERATOR(/, struct std::__divides)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:408:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/bits/valarray_after.h:408:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__divides, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__divides, typename _Dom1::value_type>::result_type> std::operator/(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
  408 |     _DEFINE_EXPR_BINARY_OPERATOR(/, struct std::__divides)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:408:5: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   'std::pair<double, int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/valarray:1199:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__divides, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__divides, _Tp>::result_type> std::operator/(const valarray<_Tp>&, const valarray<_Tp>&)'
 1199 | _DEFINE_BINARY_OPERATOR(/, __divides)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1199:1: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   mismatched types 'const std::valarray<_Tp>' and 'int'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/valarray:1199:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__divides, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__divides, _Tp>::result_type> std::operator/(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
 1199 | _DEFINE_BINARY_OPERATOR(/, __divides)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1199:1: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   mismatched types 'const std::valarray<_Tp>' and 'int'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
/usr/include/c++/14/valarray:1199:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__divides, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__divides, _Tp>::result_type> std::operator/(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
 1199 | _DEFINE_BINARY_OPERATOR(/, __divides)
      | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1199:1: note:   template argument deduction/substitution failed:
a.cc:21:30: note:   'std::pair<double, int>' is not derived from 'const std::valarray<_Tp>'
   21 |             cout<<y+(b-1)/x[i]x1<<endl;
      |                              ^
a.cc:24:18: error: expected ']' before 'x2'
   24 |         y+=c[x[i]x2-1];
      |                  ^~
      |                  ]
a.cc:24:13: error: no match for 'operator[]' (operand types are 'int [a]' and 'std::pair<double, int>')
   24 |         y+=c[x[i]x2-1];
      |             ^
a.cc:25:13: error: no match for 'operator<=' (operand types are 'int' and 'std::pair<double, int>')
   25 |         if(b<=x[i]x1*c[x[i]x2-1]){
      |            ~^~~~~~
      |            |     |
      |            int   std::pair<double, int>
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/usr/include/c++/14/bits/regex.h:1154:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
 1154 |     operator<=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1154:5: note:   template argument deduction/substitution failed:
a.cc:25:18: note