Language: C++

#include <bits/stdc++.h>//むううううう
using namespace std;
//関数
const long INF=1000000000000;

//main関数
int main() {
    //入力
    long N,M;
    cin>>N>>M;
    
    vector<long> b(N),l(N),u(N);
    for(int i=0;i<N;i++){
        cin>>b.at(i)>>l.at(i)>>u.at(i);
    }
    
    //計算
    
    long B=0,X=0,BX=0;;
    for(int i=0;i<N;i++){
        B+=b.at(i)*b.at(i);
        X+=l.at(i)*l.at(i);
        BX+=b.at(i)*l.at(i);
    }
    
    B=sqrt(B);
    X=sqrt(X);
    
    vector<bool> setting(N,false);
    for(int i=0;i<N;i++){
        long comBX=BX+b.at(i)*u.at(i)-b.at(i)*l.at(i);
        long comX=X+u.at(i)*u.at(i)-l.at(i)*l.at(i);
        
        setting=(comBX/comX>BX/X);
    }
    
    vector<long> x(N);
    for(int i=0;i<N;i++){
        x.at(i)=l.at(i)+(setting.at(i))*(u.at(i))-l.at(i));
    }
    long lengthB=0,lengthX=0;
    for(int i=0;i<N;i++){
        lengthB+=b.at(i);
        lengthX+=x.at(i)
    }
    
    
    long ans=0;
    while(B>0){
        B-=X;
        ans+=X;
    }
    
    //出力
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:33: error: no match for 'operator=' (operand types are 'std::vector<bool>' and 'bool')
   34 |         setting=(comBX/comX>BX/X);
      |                                 ^
In file included from /usr/include/c++/14/vector:67,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_bvector.h:894:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]'
  894 |       operator=(const vector& __x)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:894:31: note:   no known conversion for argument 1 from 'bool' to 'const std::vector<bool>&'
  894 |       operator=(const vector& __x)
      |                 ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_bvector.h:926:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]'
  926 |       operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:926:26: note:   no known conversion for argument 1 from 'bool' to 'std::vector<bool>&&'
  926 |       operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_bvector.h:952:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]'
  952 |       operator=(initializer_list<bool> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_bvector.h:952:40: note:   no known conversion for argument 1 from 'bool' to 'std::initializer_list<bool>'
  952 |       operator=(initializer_list<bool> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:39:58: error: expected ';' before ')' token
   39 |         x.at(i)=l.at(i)+(setting.at(i))*(u.at(i))-l.at(i));
      |                                                          ^
      |                                                          ;
a.cc:44:25: error: expected ';' before '}' token
   44 |         lengthX+=x.at(i)
      |                         ^
      |                         ;
   45 |     }
      |     ~