Language: C++

#include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
int dx[]={1, -1, 0, 0, 1, -1, -1, 1};

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define mp make_pair
#define fi first
#define sc second
ll n,t[100010],a[100010],tM[100010],tm[100010],aM[100010],am[100010];
int main(){
	cin >> n;
	REP(i,n)
		cin >> t[i];
	REP(i,n) 
		cin >> a[i];

	tM[0] = t[0];
	tm[0] = t[0] - 1;

	FOR(i,1,n) {
		if(t[i - 1] < t[i]) {
			tM[i] = t[i];
			tm[i] = t[i] - 1;
		}else {
			tM[i] = t[i];tm[i] = 0;
		}
	}

	aM[n - 1] = a[n - 1];
	am[n - 1] = a[n - 1] - 1;
	REP(i,n - 1) {
		if(a[i] > a[i + 1]) {
			aM[i] = a[i];
			am[i] = a[i] - 1;
		}else {
			aM[i] = a[i];am[i] = 0;
		}
	}

	ll ans = 1;

	REP(i,n) {
		(ans *= max(0ll,min(tM[i],aM[i]) - max(tm[i],am[i]))) %= 1000000007;
		//cout << max(0ll,min(tM[i],aM[i]) - max(tm[i],am[i])) << endl;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: reference to 'tm' is ambiguous
   25 |         tm[0] = t[0] - 1;
      |         ^~
In file included from /usr/include/time.h:39,
                 from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:16:37: note:                 'll tm [100010]'
   16 | ll n,t[100010],a[100010],tM[100010],tm[100010],aM[100010],am[100010];
      |                                     ^~
a.cc:30:25: error: reference to 'tm' is ambiguous
   30 |                         tm[i] = t[i] - 1;
      |                         ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:16:37: note:                 'll tm [100010]'
   16 | ll n,t[100010],a[100010],tM[100010],tm[100010],aM[100010],am[100010];
      |                                     ^~
a.cc:32:38: error: reference to 'tm' is ambiguous
   32 |                         tM[i] = t[i];tm[i] = 0;
      |                                      ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:16:37: note:                 'll tm [100010]'
   16 | ll n,t[100010],a[100010],tM[100010],tm[100010],aM[100010],am[100010];
      |                                     ^~
a.cc:50:56: error: reference to 'tm' is ambiguous
   50 |                 (ans *= max(0ll,min(tM[i],aM[i]) - max(tm[i],am[i]))) %= 1000000007;
      |                                                        ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:16:37: note:                 'll tm [100010]'
   16 | ll n,t[100010],a[100010],tM[100010],tm[100010],aM[100010],am[100010];
      |                                     ^~