Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define rep1(i,n) for(int i=1; i<=(n); ++i)
#define repi(i,a,b) for(int i=a; i<=(b); ++i)
#define rrep(i,n) for(int i=(n-1); i>=0; --i)
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define pb push_back
#define mp make_pair
#define to_s to_string
#define sz(v) (int)v.size()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() )
#define pr(x) cout<<(x)<<'\n'
#define debug(x) cout << #x << ": " << (x) << '\n'
#define yes "Yes"
#define no "No"
using ll = long long;
using namespace std;
typedef pair<int,int> P;
struct aaa{aaa(){ cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);};}aaaaaaa;
int MOD = 1e9 + 7;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return (a*b)/gcd(a,b);}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

int A,B,C,D;
int tm[150];
int main(){
    cin >> A >> B >> C >> D;
    tm[A]++,tm[B]--,tm[C]++,tm[D]--;
    rep(i,101) tm[i+1] += tm[i];
    int ct = 0;
    rep(i,101) if(tm[i] == 2) ++ct;
    pr(ct);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: reference to 'tm' is ambiguous
   31 |     tm[A]++,tm[B]--,tm[C]++,tm[D]--;
      |     ^~
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:28:5: note:                 'int tm [150]'
   28 | int tm[150];
      |     ^~
a.cc:31:13: error: reference to 'tm' is ambiguous
   31 |     tm[A]++,tm[B]--,tm[C]++,tm[D]--;
      |             ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:28:5: note:                 'int tm [150]'
   28 | int tm[150];
      |     ^~
a.cc:31:21: error: reference to 'tm' is ambiguous
   31 |     tm[A]++,tm[B]--,tm[C]++,tm[D]--;
      |                     ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:28:5: note:                 'int tm [150]'
   28 | int tm[150];
      |     ^~
a.cc:31:29: error: reference to 'tm' is ambiguous
   31 |     tm[A]++,tm[B]--,tm[C]++,tm[D]--;
      |                             ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:28:5: note:                 'int tm [150]'
   28 | int tm[150];
      |     ^~
a.cc:32:16: error: reference to 'tm' is ambiguous
   32 |     rep(i,101) tm[i+1] += tm[i];
      |                ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:28:5: note:                 'int tm [150]'
   28 | int tm[150];
      |     ^~
a.cc:32:27: error: reference to 'tm' is ambiguous
   32 |     rep(i,101) tm[i+1] += tm[i];
      |                           ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:28:5: note:                 'int tm [150]'
   28 | int tm[150];
      |     ^~
a.cc:34:19: error: reference to 'tm' is ambiguous
   34 |     rep(i,101) if(tm[i] == 2) ++ct;
      |                   ^~
/usr/include/x86_64-linux-gnu/bits/types/struct_tm.h:7:8: note: candidates are: 'struct tm'
    7 | struct tm
      |        ^~
a.cc:28:5: note:                 'int tm [150]'
   28 | int tm[150];
      |     ^~