Language: C++

// luogu-judger-enable-o2
/*%:pragma GCC optimize(2)
%:pragma GCC optimize(3)
%:pragma GCC optimize("Ofast")
%:pragma GCC optimize("inline")
%:pragma GCC optimize("-fgcse")
%:pragma GCC optimize("-fgcse-lm")
%:pragma GCC optimize("-fipa-sra")
%:pragma GCC optimize("-ftree-pre")
%:pragma GCC optimize("-ftree-vrp")
%:pragma GCC optimize("-fpeephole2")
%:pragma GCC optimize("-ffast-math")
%:pragma GCC optimize("-fsched-spec")
%:pragma GCC optimize("unroll-loops")
%:pragma GCC optimize("-falign-jumps")
%:pragma GCC optimize("-falign-loops")
%:pragma GCC optimize("-falign-labels")
%:pragma GCC optimize("-fdevirtualize")
%:pragma GCC optimize("-fcaller-saves")
%:pragma GCC optimize("-fcrossjumping")
%:pragma GCC optimize("-fthread-jumps")
%:pragma GCC optimize("-funroll-loops")
%:pragma GCC optimize("-fwhole-program")
%:pragma GCC optimize("-freorder-blocks")
%:pragma GCC optimize("-fschedule-insns")
%:pragma GCC optimize("inline-functions")
%:pragma GCC optimize("-ftree-tail-merge")
%:pragma GCC optimize("-fschedule-insns2")
%:pragma GCC optimize("-fstrict-aliasing")
%:pragma GCC optimize("-fstrict-overflow")
%:pragma GCC optimize("-falign-functions")
%:pragma GCC optimize("-fcse-skip-blocks")
%:pragma GCC optimize("-fcse-follow-jumps")
%:pragma GCC optimize("-fsched-interblock")
%:pragma GCC optimize("-fpartial-inlining")
%:pragma GCC optimize("no-stack-protector")
%:pragma GCC optimize("-freorder-functions")
%:pragma GCC optimize("-findirect-inlining")
%:pragma GCC optimize("-fhoist-adjacent-loads")
%:pragma GCC optimize("-frerun-cse-after-loop")
%:pragma GCC optimize("inline-small-functions")
%:pragma GCC optimize("-finline-small-functions")
%:pragma GCC optimize("-ftree-switch-conversion")
%:pragma GCC optimize("-foptimize-sibling-calls")
%:pragma GCC optimize("-fexpensive-optimizations")
%:pragma GCC optimize("-funsafe-loop-optimizations")
%:pragma GCC optimize("inline-functions-called-once")
%:pragma GCC optimize("-fdelete-null-pointer-checks")*/
#include<bits/stdc++.h>
#define sr register short
#define su unsigned short
#define r register int
#define u unsigned int
#define ll long long
#define llr register long long
#define llu unsigned long long
#define lf double
#define Lf long double
/*#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")*/
using namespace std;
/*__attribute__((optimize("-O2")))
__attribute__((optimize("-O3")))
__attribute__((optimize("Ofast")))
__attribute__((optimize("inline")))
__attribute__((optimize("-fgcse")))
__attribute__((optimize("-fgcse-lm")))
__attribute__((optimize("-fipa-sra")))
__attribute__((optimize("-ftree-pre")))
__attribute__((optimize("-ftree-vrp")))
__attribute__((optimize("-fpeephole2")))
__attribute__((optimize("-ffast-math")))
__attribute__((optimize("-fsched-spec")))
__attribute__((optimize("unroll-loops")))
__attribute__((optimize("-falign-jumps")))
__attribute__((optimize("-falign-loops")))
__attribute__((optimize("-falign-labels")))
__attribute__((optimize("-fdevirtualize")))
__attribute__((optimize("-fcaller-saves")))
__attribute__((optimize("-fcrossjumping")))
__attribute__((optimize("-fthread-jumps")))
__attribute__((optimize("-funroll-loops")))
__attribute__((optimize("-fwhole-program")))
__attribute__((optimize("-freorder-blocks")))
__attribute__((optimize("-fschedule-insns")))
__attribute__((optimize("inline-functions")))
__attribute__((optimize("-ftree-tail-merge")))
__attribute__((optimize("-fschedule-insns2")))
__attribute__((optimize("-fstrict-aliasing")))
__attribute__((optimize("-fstrict-overflow")))
__attribute__((optimize("-falign-functions")))
__attribute__((optimize("-fcse-skip-blocks")))
__attribute__((optimize("-fcse-follow-jumps")))
__attribute__((optimize("-fsched-interblock")))
__attribute__((optimize("-fpartial-inlining")))
__attribute__((optimize("no-stack-protector")))
__attribute__((optimize("-freorder-functions")))
__attribute__((optimize("-findirect-inlining")))
__attribute__((optimize("-fhoist-adjacent-loads")))
__attribute__((optimize("-frerun-cse-after-loop")))
__attribute__((optimize("inline-small-functions")))
__attribute__((optimize("-finline-small-functions")))
__attribute__((optimize("-ftree-switch-conversion")))
__attribute__((optimize("-foptimize-sibling-calls")))
__attribute__((optimize("-fexpensive-optimizations")))
__attribute__((optimize("-funsafe-loop-optimizations")))
__attribute__((optimize("inline-functions-called-once")))
__attribute__((optimize("-fdelete-null-pointer-checks")))*/

int main()
{
/*#ifndef ONLINE_JUDGE 
    freopen("cpp.in","r",stdin); 
#endif*/
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    ll n,a,b;
    scanf("%lld%lld%lld",&n,&a,&b);
    printf("%lld",max(0,(n-2)*(b-a)+1));
    puts("");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:164:22: error: no matching function for call to 'max(int, long long int)'
  164 |     printf("%lld",max(0,(n-2)*(b-a)+1));
      |                   ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:49:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:164:22: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
  164 |     printf("%lld",max(0,(n-2)*(b-a)+1));
      |                   ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:164:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
  164 |     printf("%lld",max(0,(n-2)*(b-a)+1));
      |                   ~~~^~~~~~~~~~~~~~~~~