Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <iomanip>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <set>
#include <stack>
using namespace std;
#define ll long long
#define maxn 105
#define angel 0x3f3f3f3f
#define eps 1e-9
#define my_angel main
#define ull unsigned long long
const ull mod=212370440130137957ll;
const int maxnode = 1000 * 100 + 10;
const int sigma_size = 28;
const ull base=1e9+7;
map<ll,int>hash;
int my_angel()
{
    ll a,b,c,d;
    int t;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
        if(a<b)
        {
            printf("No\n");
            continue;
        }
        hash.clear();
        hash[a]=1;
        int success=0;
        while(1)
        {
            if(a>c)
            {
                ll remain;
                if((a-c)%b==0)
                    remain=(a-c)/b-1;
                else
                    remain=(a-c)/b;
                a=a-remain*b;
                a-=b;
                if(a<0)
                    break;
                a+=d;
                if(a<b)
                    break;
                if(hash[a]==1)
                {
                    success=1;
                    break;
                }
                hash[a]=1;
            }
            else
            {
                a-=b;
                if(a<0)
                    break;
                a+=d;
                if(hash[a]==1)
                {
                    success=1;
                    break;
                }
                hash[a]=1;
            }
        }
        if(success)
            printf("Yes\n");
        else
            printf("No\n");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:9: error: reference to 'hash' is ambiguous
   39 |         hash.clear();
      |         ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:25:12: note:                 'std::map<long long int, int> hash'
   25 | map<ll,int>hash;
      |            ^~~~
a.cc:40:9: error: reference to 'hash' is ambiguous
   40 |         hash[a]=1;
      |         ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:25:12: note:                 'std::map<long long int, int> hash'
   25 | map<ll,int>hash;
      |            ^~~~
a.cc:58:20: error: reference to 'hash' is ambiguous
   58 |                 if(hash[a]==1)
      |                    ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:25:12: note:                 'std::map<long long int, int> hash'
   25 | map<ll,int>hash;
      |            ^~~~
a.cc:63:17: error: reference to 'hash' is ambiguous
   63 |                 hash[a]=1;
      |                 ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:25:12: note:                 'std::map<long long int, int> hash'
   25 | map<ll,int>hash;
      |            ^~~~
a.cc:71:20: error: reference to 'hash' is ambiguous
   71 |                 if(hash[a]==1)
      |                    ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:25:12: note:                 'std::map<long long int, int> hash'
   25 | map<ll,int>hash;
      |            ^~~~
a.cc:76:17: error: reference to 'hash' is ambiguous
   76 |                 hash[a]=1;
      |                 ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:25:12: note:                 'std::map<long long int, int> hash'
   25 | map<ll,int>hash;
      |            ^~~~