Language: C++

#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cassert>
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <sstream>
#include <bitset>
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define invrepr(i,a,b) for(int i=b-1;i>=a;i--)
#define invrep(i,n) invrepr(i,0,n)
 
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
 
int main() {
    std::ios::sync_with_stdio(0); cin.tie(0);
 
    ll i,j,h;
    ll Q,M,K,P,A,B,N,X;
 
    long double x;
 
    string S;
 
    ll ans=0;
    ll count=0;
    ll flag=0;
    ll temp=0;
 
vector<ll> aa, bb, hh, ff;
ll a,b;
    cin >>X;
    ll d;
 
    ll iii=3;
    //cout<<pow(iii,0.2)<<endl;
    //return 0;
 
repr(i,-10000000,10000000){
    if(pow(i,5)-X>=0){
        if(pow(pow(pow(i,5)-X,1/5),5)==pow(i,5)-X){
            cout<<i<<" "<<pow(pow(i,5)-X,1/5)<<endl;
            break;
        }
    }else{
        if(pow(pow(-(pow(i,5)-X),1/5),5)==-(pow(i,5)-X)){
            cout<<i<<" "<<-pow(-(pow(i,5)-X),1/5)<<endl;
            break;
        }
        
    }
}
 
 
//rep(i,N)cout<<ff[i];
 
    return 0;
}
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cassert>
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <sstream>
#include <bitset>
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define invrepr(i,a,b) for(int i=b-1;i>=a;i--)
#define invrep(i,n) invrepr(i,0,n)

using namespace std;
typedef long long ll;
const ll MOD=1e9+7;

int main() {
    std::ios::sync_with_stdio(0); cin.tie(0);

    ll i,j,h;
    ll Q,M,K,P,A,B,N,X;

    long double x;

    string S;

    ll ans=0;
    ll count=0;
    ll flag=0;
    ll temp=0;

vector<string> ss;
ll a,b;
    cin >>N>>A>>B>>C;
    ll d;

    ll iii=3;
    //cout<<pow(iii,0.2)<<endl;
    //return 0;
rep(i,N){
  cin>>S;
  ss.push_back(S);
}
map <string,ll> mm;
mm["B"]=B
mm["A"]=A
  mm["C"]=C
if(A+B+C==0){
  cout<<"No"<<endl;
}else if(A+B+C==1){
  rep(i,N){
  	if(mm[ss[i][0]]==0 && ss[i][1]]==0){
      cout << "No"<<endl;
      return 0;
    }else if (mm[ss[i][0]]==0){
      mm[ss[i][0]]++;
      mm[ss[i][1]]--;
    }else{
      mm[ss[i][0]]--;
      mm[ss[i][1]]++;
    }
  }
}else{
	if(mm[ss[i][0]]==0 && ss[i][1]]==0){
    cout<< "No"<<endl;
    }

}
cout<<"Yes"<<endl;
//rep(i,N)cout<<ff[i];

    return 0;
}

Compiler output:
a.cc:95:10: error: redefinition of 'const ll MOD'
   95 | const ll MOD=1e9+7;
      |          ^~~
a.cc:25:10: note: 'const ll MOD' previously defined here
   25 | const ll MOD=1e9+7;
      |          ^~~
a.cc:97:5: error: redefinition of 'int main()'
   97 | int main() {
      |     ^~~~
a.cc:27:5: note: 'int main()' previously defined here
   27 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:114:20: error: 'C' was not declared in this scope
  114 |     cin >>N>>A>>B>>C;
      |                    ^
a.cc:125:10: error: expected ';' before 'mm'
  125 | mm["B"]=B
      |          ^
      |          ;
  126 | mm["A"]=A
      | ~~        
a.cc:130:2: error: 'else' without a previous 'if'
  130 | }else if(A+B+C==1){
      |  ^~~~
a.cc:132:14: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, long long int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
  132 |         if(mm[ss[i][0]]==0 && ss[i][1]]==0){
      |              ^
In file included from /usr/include/c++/14/map:63,
                 from a.cc:12:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, long long int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, long long int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:132:39: error: expected ')' before ']' token
  132 |         if(mm[ss[i][0]]==0 && ss[i][1]]==0){
      |           ~                           ^
      |                                       )
a.cc:132:39: error: expected primary-expression before ']' token
a.cc:135:17: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, long long int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
  135 |     }else if (mm[ss[i][0]]==0){
      |                 ^
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, long long int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, long long int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:136:9: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, long long int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
  136 |       mm[ss[i][0]]++;
      |         ^
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, long long int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, long long int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:137:9: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, long long int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
  137 |       mm[ss[i][1]]--;
      |         ^
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, long long int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, long long int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:139:9: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, long long int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
  139 |       mm[ss[i][0]]--;
      |         ^
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = long long int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, long long int> >; mapped_type = long long int; key_type = std::__cxx11::basic_string<char>]'