Submission #51843

# Submission time Handle Problem Language Result Execution time Memory
51843 2018-06-21T16:08:58 Z mareksom Bowling (BOI15_bow) C++17
Compilation error
0 ms 0 KB
#ifndef LOCAL
#pragma GCC optimize ("O3")
#endif

#include <bits/stdc++.h>

using namespace std;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return {i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (c it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(x...) " [" #x ": " << (x) << "] "

using ld = long double;
using ll = long long;

constexpr int mod = 1000 * 1000 * 1000 + 7;
constexpr int odw2 = (mod + 1) / 2;

void OdejmijOd(int& a, int b) { a -= b; if (a < 0) a += mod; }
int Odejmij(int a, int b) { OdejmijOd(a, b); return a; }
void DodajDo(int& a, int b) { a += b; if (a >= mod) a -= mod; }
int Dodaj(int a, int b) { DodajDo(a, b); return a; }
int Mnoz(int a, int b) { return (ll) a * b % mod; }
void MnozDo(int& a, int b) { a = Mnoz(a, b); }
int Pot(int a, int b) { int res = 1; while (b) { if (b % 2 == 1) MnozDo(res, a); a = Mnoz(a, a); b /= 2; } return res; }
int Odw(int a) { return Pot(a, mod - 2); }
void PodzielDo(int& a, int b) { MnozDo(a, Odw(b)); }
int Podziel(int a, int b) { return Mnoz(a, Odw(b)); }
int Moduluj(ll x) { x %= mod; if (x < 0) x += mod; return x; }

template <typename T> T Maxi(T& a, T b) { return a = max(a, b); }
template <typename T> T Mini(T& a, T b) { return a = min(a, b); }

using ull = unsigned long long;

constexpr int MaxScore = 400;
constexpr int nax = 15;

bool Matches(const string& a, const string& b) {
  if (a.size() != b.size()) return false;
  for (int i = 0; i < (int) a.size(); i++) {
    if (a[i] != '?' and b[i] != '?' and a[i] != b[i]) {
      return false;
    }
  }
  return true;
}

int n;
string napis[nax];
int score[nax];

constexpr int empty = 11;
ull dp[nax][MaxScore][12][12];

void algos() {
  debug() << imie(n);
  debug() << range(napis + 1, napis + n + 1);
  debug() << range(score + 1, score + n + 1);
  for (int i = 0; i <= n + 1; i++) {
    for (int s = 0; s < MaxScore; s++) {
      for (int jed = 0; jed <= empty; jed++) {
        for (int dwa = 0; dwa <= empty; dwa++) {
          dp[i][s][jed][dwa] = 0;
        }
      }
    }
  }
  dp[0][0][empty][empty] = 1;
  auto Dorzuc = [](int i, const string& what, int s, int jed, int dwa, ull ile) -> void {
    assert(0 < ile);
    assert(0 <= s and s < MaxScore);
    assert(0 <= jed and jed <= empty);
    assert(0 <= dwa and dwa <= empty);
    if (score[i] == -1 or score[i] == s) {
      if (Matches(what, napis[i])) {
        dp[i][s][jed][dwa] += ile;
      }
    }
  };
  for (int i = 1; i < n; i++) {
    for (int s = 0; s < MaxScore; s++) {
      for (int jed = 0; jed <= 10; jed++) {
        for (int dwa = 0; dwa <= 10; dwa++) {
          const ull ile = dp[i - 1][s][jed][dwa] + dp[i - 1][s][jed][empty] + dp[i - 1][s][empty][dwa] + dp[i - 1][s][empty][empty];
          if (!ile) continue;
          debug() << "dp[" << i << "][" << s << "][" << jed << "][" << dwa << "] = " << ile;
          // x-
          if (jed == 10) {
            for (int trzy = 0; trzy <= 10; trzy++) {
              Dorzuc(i, "x-", s + 10 + dwa + trzy, dwa, trzy, ile);
            }
          }
          // A/
          if (jed < 10 and jed + dwa == 10) {
            for (int trzy = 0; trzy <= 10; trzy++) {
              Dorzuc(i, to_string(jed) + "/", s + 10 + trzy, trzy, empty, ile);
            }
          }
          // AB
          if (jed + dwa < 10) {
            Dorzuc(i, to_string(jed) + to_string(dwa), s + jed + dwa, empty, empty, ile);
          }
        }
      }
    }
  }
  ull wynik = 0;
  auto DorzucN = [&wynik](string what, int s, ull ile) -> void {
    assert(0 < ile);
    assert(0 <= s and s < MaxScore);
    if (Matches(what, napis[n])) {
      if (score[n] == -1 or score[n] == s) {
        wynik += ile;
      }
    }
  };
  for (int s = 0; s < MaxScore; s++) {
    for (int jed = 0; jed <= 10; jed++) {
      for (int dwa = 0; dwa <= 10; dwa++) {
        const ull ile = dp[n - 1][s][jed][dwa] + dp[n - 1][s][jed][empty] + dp[n - 1][s][empty][dwa] + dp[n - 1][s][empty][empty];
        if (!ile) continue;
        // xxx
        if (jed == 10 and dwa == 10) {
          DorzucN("xxx", s + 30, ile);
        }
        // xxA"
        if (jed == 10 and dwa == 10) {
          for (int a = 0; a <= 9; a++) {
            DorzucN("xx" + to_string(a), s + 20 + a, ile);
          }
        }
        // xA/"
        if (jed == 10 and dwa < 10) {
          DorzucN("x" + to_string(dwa) + "/", s + 20, ile);
        }
        // xAB"
        if (jed == 10 and dwa < 10) {
          for (int trzy = 0; dwa + trzy < 10; trzy++) {
            DorzucN("x" + to_string(dwa) + to_string(trzy), s + 10 + dwa + trzy, ile);
          }
        }
        // A/x
        if (jed < 10 and jed + dwa == 10) {
          DorzucN(to_string(jed) + "/x", s + 20, ile);
        }
        // A/B
        if (jed < 10 and jed + dwa == 10) {
          for (int trzy = 0; trzy < 10; trzy++) {
            DorzucN(to_string(jed) + "/" + to_string(trzy), s + 10 + trzy, ile);
          }
        }
        // AB-"
        if (jed + dwa < 10) {
          DorzucN(to_string(jed) + to_string(dwa) + "-", s + jed + dwa, ile);
        }
      }
    }
  }
  printf("%llu\n", wynik);
}

void przyp() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    char c;
    if (i == 1) scanf(" %c", &c);
    else scanf("%c", &c);
    napis[i].clear();
    napis[i].push_back(c);
    scanf("%c", &c);
    napis[i].push_back(c);
    if (i == n) {
      scanf("%c", &c);
      napis[i].push_back(c);
    }
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &score[i]);
  }
  algos();
}

int main() {
  int t;
  scanf("%d", &t);
  while (t--) przyp();
  return 0;
}

Compilation message

bow.cpp: In function 'void algos()':
bow.cpp:87:32: error: reference to 'empty' is ambiguous
       for (int jed = 0; jed <= empty; jed++) {
                                ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:88:34: error: reference to 'empty' is ambiguous
         for (int dwa = 0; dwa <= empty; dwa++) {
                                  ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:94:12: error: reference to 'empty' is ambiguous
   dp[0][0][empty][empty] = 1;
            ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:94:19: error: reference to 'empty' is ambiguous
   dp[0][0][empty][empty] = 1;
                   ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
                 from bow.cpp:5:
bow.cpp: In lambda function:
bow.cpp:98:32: error: reference to 'empty' is ambiguous
     assert(0 <= jed and jed <= empty);
                                ^
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
In file included from /usr/include/c++/7/cassert:44:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
                 from bow.cpp:5:
bow.cpp:99:32: error: reference to 'empty' is ambiguous
     assert(0 <= dwa and dwa <= empty);
                                ^
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp: In function 'void algos()':
bow.cpp:110:70: error: reference to 'empty' is ambiguous
           const ull ile = dp[i - 1][s][jed][dwa] + dp[i - 1][s][jed][empty] + dp[i - 1][s][empty][dwa] + dp[i - 1][s][empty][empty];
                                                                      ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:110:92: error: reference to 'empty' is ambiguous
           const ull ile = dp[i - 1][s][jed][dwa] + dp[i - 1][s][jed][empty] + dp[i - 1][s][empty][dwa] + dp[i - 1][s][empty][empty];
                                                                                            ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:110:119: error: reference to 'empty' is ambiguous
           const ull ile = dp[i - 1][s][jed][dwa] + dp[i - 1][s][jed][empty] + dp[i - 1][s][empty][dwa] + dp[i - 1][s][empty][empty];
                                                                                                                       ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:110:126: error: reference to 'empty' is ambiguous
           const ull ile = dp[i - 1][s][jed][dwa] + dp[i - 1][s][jed][empty] + dp[i - 1][s][empty][dwa] + dp[i - 1][s][empty][empty];
                                                                                                                              ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:111:16: error: in argument to unary !
           if (!ile) continue;
                ^~~
bow.cpp:122:68: error: reference to 'empty' is ambiguous
               Dorzuc(i, to_string(jed) + "/", s + 10 + trzy, trzy, empty, ile);
                                                                    ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note:                 template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)
     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
     ^~~~~
bow.cpp:127:71: error: reference to 'empty' is ambiguous
             Dorzuc(i, to_string(jed) + to_string(dwa), s + jed + dwa, empty, empty, ile);
                                                                       ^~~~~
bow.cpp:78:15: note: candidates are: constexpr const int empty
 constexpr int empty = 11;
               ^~~~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from bow.cpp:5:
/usr/include/c++/7/bits/range_access.h:280:5: note:                 template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)
     empty(initializer_list<_Tp> __il) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:271:5: note:                 template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])
     empty(const _Tp (&/*__array*/)[_Nm]) noexcept
     ^~~~~
/usr/include/c++/7/bits/range_access.h:261:5: note: