Language: C++

/*betaでやろう*/
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <iterator>
#include <cstring>

using namespace std;

typedef pair<int, int> P;
typedef long long ll;
#define PB push_back
#define rep(i, a) for(int i = 0; i < a; i++)
#define all(v) v.begin(),v.end()
#define FF first
#define SS second
#define mp make_pair
#define INT int_64
const ll INF = 1e17;
const ll NEGA=-INF; 

ll ans = 0;
int cnt=0;

int used[1001];
ll dp[1001][1001];
ll sumx,sumy,sumz;
ll sx,sy,sz;
int J[300];
int main() 
{ 
 int t;
 cin>>t;
 ll a,b,c,d;
 int f=0;
 rep(i,t){
     f=0;
     cin>>a>>b>>c>>d;
     ll res=a%b;
     if(a<b) f=1;
     rep(i,min(7000000,a)){
     if(res>c){
         f=1;
         continue;
     }
     res+=d;
     if(res<b){ 
         f=1;
         continue;
     }
     res%=b;
     }
    if(f) J[i]=1;
 }
 rep(i,t){
     if(J[i]) cout<<"No"<<endl;
     else cout<<"Yes"<<endl;
 }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:51:15: error: no matching function for call to 'min(int, ll&)'
   51 |      rep(i,min(7000000,a)){
      |            ~~~^~~~~~~~~~~
a.cc:23:38: note: in definition of macro 'rep'
   23 | #define rep(i, a) for(int i = 0; i < a; i++)
      |                                      ^
In file included from /usr/include/c++/14/string:51,
                 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:2:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:51:15: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   51 |      rep(i,min(7000000,a)){
      |            ~~~^~~~~~~~~~~
a.cc:23:38: note: in definition of macro 'rep'
   23 | #define rep(i, a) for(int i = 0; i < a; i++)
      |                                      ^
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:51:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   51 |      rep(i,min(7000000,a)){
      |            ~~~^~~~~~~~~~~
a.cc:23:38: note: in definition of macro 'rep'
   23 | #define rep(i, a) for(int i = 0; i < a; i++)
      |                                      ^