Language: Java

#include<bits/stdc++.h>
using namespace std;

long long FACT[1000000];
long long IFACT[1000000];

static int MOD = 1000000007;
static int mod = MOD;
int modPow(long a, long b) {
 if(b == 0) return 1 % MOD;
 if(b == 1) return (int) (a % MOD);

 if(b % 2 == 0) {
	 long ret = modPow(a % MOD,b / 2) % MOD;
	 return (int)((ret * ret) % MOD);
 }
 else {
	 long ret = (a * (long)modPow(a % MOD,b-1)) % MOD;
	 return (int)(ret % MOD);
 }
}



	long long C(int n, int r)
	{
		if(n < 0 || r < 0 || r > n)return 0;
		if(r > n / 2)r = n - r;
		return FACT[n]*IFACT[n-r]%mod*IFACT[r]%mod;
	}

	long long INV(long v) {
		return modPow(v, MOD - 2);
	}



int main() {
	int N,M,K,n;
	cin >> N >> M >> K;
		n = N + M + K;

		FACT[0] = 1;
		IFACT[0] = 1;
		for(int i = 1;i <= n;i++){
			FACT[i] = FACT[i-1] * i % mod;
			IFACT[i] = INV(FACT[i]);
		}
		long long ans = 0;
		long long hh = 0;
		for(int i = N; i <= N + M + K; i++) {
			int retA = modPow(3,N + M + K - i);

			int retB = (int)C(i-1,N-1);
			long  retC = 0;
			retC = (retC + modPow(2,i - N)) % MOD;
			hh = hh * 2 % MOD;
			if (i - N > M) hh = (hh + C(M + i - N - M - 1, i - N - M - 1)) % MOD;
			if (i - N > K) hh = (hh + C(K + i - N - K - 1, i - N - K - 1)) % MOD;
			retC = (retC - hh) % MOD;
			long ansA = ((long)(retA) * (long)(retB)) % MOD;

			ansA *= retC % MOD;
			ansA %= MOD;
			ans += ansA;
			ans %= MOD;
		}
		cout << ans << endl;
	}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:4: error: class, interface, enum, or record expected
long long FACT[1000000];
^
Main.java:5: error: class, interface, enum, or record expected
long long IFACT[1000000];
^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
static int MOD = 1000000007;
       ^
  (use --enable-preview to enable unnamed classes)
Main.java:25: error: class, interface, enum, or record expected
	long long C(int n, int r)
	^
Main.java:28: error: class, interface, enum, or record expected
		if(r > n / 2)r = n - r;
		^
Main.java:29: error: class, interface, enum, or record expected
		return FACT[n]*IFACT[n-r]%mod*IFACT[r]%mod;
		^
Main.java:30: error: class, interface, enum, or record expected
	}
	^
Main.java:34: error: class, interface, enum, or record expected
	}
	^
Main.java:40: error: class, interface, enum, or record expected
	cin >> N >> M >> K;
	^
Main.java:41: error: class, interface, enum, or record expected
		n = N + M + K;
		^
Main.java:43: error: class, interface, enum, or record expected
		FACT[0] = 1;
		^
Main.java:44: error: class, interface, enum, or record expected
		IFACT[0] = 1;
		^
Main.java:45: error: class, interface, enum, or record expected
		for(int i = 1;i <= n;i++){
		^
Main.java:45: error: class, interface, enum, or record expected
		for(int i = 1;i <= n;i++){
		              ^
Main.java:45: error: class, interface, enum, or record expected
		for(int i = 1;i <= n;i++){
		                     ^
Main.java:47: error: class, interface, enum, or record expected
			IFACT[i] = INV(FACT[i]);
			^
Main.java:48: error: class, interface, enum, or record expected
		}
		^
Main.java:50: error: class, interface, enum, or record expected
		long long hh = 0;
		^
Main.java:51: error: class, interface, enum, or record expected
		for(int i = N; i <= N + M + K; i++) {
		^
Main.java:51: error: class, interface, enum, or record expected
		for(int i = N; i <= N + M + K; i++) {
		               ^
Main.java:51: error: class, interface, enum, or record expected
		for(int i = N; i <= N + M + K; i++) {
		                               ^
Main.java:56: error: class, interface, enum, or record expected
			retC = (retC + modPow(2,i - N)) % MOD;
			^
Main.java:57: error: class, interface, enum, or record expected
			hh = hh * 2 % MOD;
			^
Main.java:58: error: class, interface, enum, or record expected
			if (i - N > M) hh = (hh + C(M + i - N - M - 1, i - N - M - 1)) % MOD;
			^
Main.java:59: error: class, interface, enum, or record expected
			if (i - N > K) hh = (hh + C(K + i - N - K - 1, i - N - K - 1)) % MOD;
			^
Main.java:60: error: class, interface, enum, or record expected
			retC = (retC - hh) % MOD;
			^
Main.java:63: error: class, interface, enum, or record expected
			ansA *= retC % MOD;
			^
Main.java:64: error: class, interface, enum, or record expected
			ansA %= MOD;
			^
Main.java:65: error: class, interface, enum, or record expected
			ans += ansA;
			^
Main.java:66: error: class, interface, enum, or record expected
			ans %= MOD;
			^
Main.java:67: error: class, interface, enum, or record expected
		}
		^
Main.java:69: error: class, interface, enum, or record expected
	}
	^
34 errors