Language: C++


                ans=fact(min(n,m));
                ans*=ans;
                ans%=mod;
                ans*=max(n,m);
                ans%=mod;
            }

        cout<<ans;
    }
    else
        cout<<"0\n";

}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(0); ///cant use scanf, printf
    cin.tie(0);cout.tie(0); /// no longer auto flush cout before each cin, remove for interactive
    //cout << fixed << setprecision(11); /// no scientific output
    ll test=1;
  //  cin>>test;
    while(test--)
    {

        //fun();
        vfun();
//         if(vfun())
//            cout<<"YES\n";
//         else
//            cout<<"NO\n";
    }
}
///before sub
/// check for value of zero and single input in array
///loop vars,1LL in mult, equal, one, bounds, int v ll, endl, finish taking inputs
/// check whether test cases are given or not




Compiler output:
a.cc:2:17: error: 'ans' does not name a type
    2 |                 ans=fact(min(n,m));
      |                 ^~~
a.cc:3:17: error: 'ans' does not name a type
    3 |                 ans*=ans;
      |                 ^~~
a.cc:4:17: error: 'ans' does not name a type
    4 |                 ans%=mod;
      |                 ^~~
a.cc:5:17: error: 'ans' does not name a type
    5 |                 ans*=max(n,m);
      |                 ^~~
a.cc:6:17: error: 'ans' does not name a type
    6 |                 ans%=mod;
      |                 ^~~
a.cc:7:13: error: expected declaration before '}' token
    7 |             }
      |             ^
a.cc:9:9: error: 'cout' does not name a type
    9 |         cout<<ans;
      |         ^~~~
a.cc:10:5: error: expected declaration before '}' token
   10 |     }
      |     ^
a.cc:11:5: error: expected unqualified-id before 'else'
   11 |     else
      |     ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
a.cc: In function 'int main()':
a.cc:19:31: error: 'stdin' was not declared in this scope
   19 |     freopen("input.txt", "r", stdin);
      |                               ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:19:5: error: 'freopen' was not declared in this scope
   19 |     freopen("input.txt", "r", stdin);
      |     ^~~~~~~
a.cc:20:32: error: 'stdout' was not declared in this scope
   20 |     freopen("output.txt", "w", stdout);
      |                                ^~~~~~
a.cc:20:32: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:22:5: error: 'ios_base' has not been declared
   22 |     ios_base::sync_with_stdio(0); ///cant use scanf, printf
      |     ^~~~~~~~
a.cc:23:5: error: 'cin' was not declared in this scope
   23 |     cin.tie(0);cout.tie(0); /// no longer auto flush cout before each cin, remove for interactive
      |     ^~~
a.cc:23:16: error: 'cout' was not declared in this scope
   23 |     cin.tie(0);cout.tie(0); /// no longer auto flush cout before each cin, remove for interactive
      |                ^~~~
a.cc:25:5: error: 'll' was not declared in this scope
   25 |     ll test=1;
      |     ^~
a.cc:27:11: error: 'test' was not declared in this scope
   27 |     while(test--)
      |           ^~~~
a.cc:31:9: error: 'vfun' was not declared in this scope
   31 |         vfun();
      |         ^~~~