criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
 
public class Main {
 
    void solve() throws IOException {
        int N = ni();
        int[] a = new int[N];
        for (int i = 0; i < N; i++) {
            a[i] = ni();
        }
        int all = a[0];
        for (int i = 1; i < N; i++) {
            all = all ^ a[i];
        }
        for (int i = 0; i < N; i++) {
            out.print(all ^ a[i]);
            out.print(" ")            
        }
    }

 
    String ns() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine(), " ");
        }
        return tok.nextToken();
    }
 
    int ni() throws IOException {
        return Integer.parseInt(ns());
    }
 
    long nl() throws IOException {
        return Long.parseLong(ns());
    }
 
    double nd() throws IOException {
        return Double.parseDouble(ns());
    }
 
    String[] nsa(int n) throws IOException {
        String[] res = new String[n];
        for (int i = 0; i < n; i++) {
            res[i] = ns();
        }
        return res;
    }
 
    int[] nia(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = ni();
        }
        return res;
    }
 
    long[] nla(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = nl();
        }
        return res;
    }
 
    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;
 
    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        tok = new StringTokenizer("");
        Main main = new Main();
        main.solve();
        out.close();
    }
}

Compiler output:
Main.java:21: error: ';' expected
            out.print(" ")            
                          ^
1 error
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long int lli;
#define pb push_back



int main() {
	int n;
	cin >> n ;
	std::vector<int > v(n);

	int val =0;
	for (int i = 0; i < n; ++i)
	{
		/* code */
		cin >> v[i];
		val = val ^ v[i;]
	}

	for (int i = 0; i < n; ++i)
	 {
	 	int ans = val ^ v[i];
	 	cout << ans << " ";
	 } 
	 cout << endl;

	/*for (int i = 0; i < n; ++i)
	{
		
		int  val = 0;
		for (int j = 0; j < n; ++j)
		{
			if(i!=j){
				val = val ^ v[j];
			}
		}
		cout << val <<" " << endl;
	}
	*/


}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: expected ']' before ';' token
   18 |                 val = val ^ v[i;]
      |                                ^
      |                                ]
a.cc:18:33: error: expected primary-expression before ']' token
   18 |                 val = val ^ v[i;]
      |                                 ^
Language: C++

N = int(input())
a = list(map(int,input().split()))

ans = 0

for i in range (N):
    ans = ans ^ a[i]

for i in range (N):
    print(ans ^ a[i])

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include <cstdio>
#include <iostream>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>

#define int long long
#define rr register

#define inf 1e9
#define MAXN 1010

using namespace std;

inline int read() {
	int s = 0, f = 0;
	char ch = getchar();
	while (!isdigit(ch)) f |= ch == '-', ch = getchar();
	while (isdigit(ch)) s = s * 10 + (ch ^ 48), ch = getchar();
	return f ? -s : s;
}

void print(int x) {
	if (x < 0) putchar('-'), x = -x;
	if (x > 9) print(x / 10);
	putchar(x % 10 + 48);
}

int n, ans;

int a[MAXN]

int main() {
	n = read();
	for (int i = 1; i <= n; i++) a[i] = read(), ans ^= a[i];
	for (int i = 1; i <= n; i++) cout << (ans ^ a[i]) << " ";
	puts("");
}

Compiler output:
a.cc:8:13: error: expected initializer before 'long'
    8 | #define int long long
      |             ^~~~
a.cc:34:1: note: in expansion of macro 'int'
   34 | int main() {
      | ^~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long int lli;
#define pb push_back



int main() {
	int n;
	cin >> n ;
	std::vector<int > v(n);
	for (int i = 0; i < n; ++i)
	{
		/* code */
		cin >> v[i];
	}

	for (int i = 0; i < n; ++i)
	{
		/* code */
		int  val = 0;
		for (int j = 0; j < count; ++j)
		{
			if(i!=j){
				val = val ^ v[j];
			}
		}
		cout << val <<" " << endl;
	}


}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:22:35: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
   22 |                 for (int j = 0; j < count; ++j)
      |                                 ~~^~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(int argc, char *argv[])
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int n; cin >> n;
  vector<int> a(n);
  int xr = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    xr ^= a[i];
  }
  for (int i = 0; i < n; ++i) {
    cout << xr^a[i] << " ";
  }
  cout << endl;

  
  return 0;
}




Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:20:21: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'const char [2]' to binary 'operator<<'
   20 |     cout << xr^a[i] << " ";
Language: C++

#include <cstdio>
#include <iostream>
#include <string>
#include <cstring>
#include <cmath>
#include <algorithm>

#define int long long
#define rr register

#define inf 1e9
#define MAXN 1010

using namespace std;

inline int read() {
	int s = 0, f = 0;
	char ch = getchar();
	while (!isdigit(ch)) f |= ch == '-', ch = getchar();
	while (isdigit(ch)) s = s * 10 + (ch ^ 48), ch = getchar();
	return f ? -s : s;
}

void print(int x) {
	if (x < 0) putchar('-'), x = -x;
	if (x > 9) print(x / 10);
	putchar(x % 10 + 48);
}

int n, ans;

int a[MAXN]

int main() {
	n = read();
	for (int i = 1; i <= n; i++) a[i] = read(), ans ^= a[i];
	for (int i = 1; i <= n; i++) cout << (ans ^ d[i]) << " ";
	puts("");
}

Compiler output:
a.cc:8:13: error: expected initializer before 'long'
    8 | #define int long long
      |             ^~~~
a.cc:34:1: note: in expansion of macro 'int'
   34 | int main() {
      | ^~~
Language: C++

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

typedef long long ll;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;
const ll LINF = 1e18;
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define MP make_pair
#define MT make_tuple
#define F first
#define S second
#define PB push_back
#define dump(x)  cout << #x << " = " << (x) << endl;	//debug
#define SZ(x) ((ll)(x).size())
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (ll i = (a); i >= (b); i--)
#define ps(s) cout << #s << endl;
#define pv(v) cout << (v) << endl;
#define pvd(v) cout << setprecision(16) << (v) << endl;
#define ALL(a)  (a).begin(),(a).end()
#define RANGE(a, start_index, num)  (a).begin()+(start_index),(a).begin()+(num)

int main() {
	vector<int> cnt(101);
	int n;
	cin >> n;
	vector<vector<int>> memo(n, vector<int>(101));
	FOR(i, 0, n-1) {
		ll a;
		cin >> a;
		FOR(j, 0, 100) {
			if (a&(1i64 << j)) {
				cnt[j]++;
				memo[i][j] = 1;
			}
		}
	}
	FOR(j, 0, 100) {
		if (cnt[j] % 2) {
			FOR(i, 0, n - 1) {
				if (memo[i][j] == 1) {
					memo[i][j] = 0;
				}
				else {
					memo[i][j] = 1;
				}
			}
		}
	}
	FOR(i, 0, n - 1) {
		ll tmp = 0;
		FOR(j, 0, 100) {
			if (memo[i][j]) {
				tmp += (1i64 << j);
			}
		}
		cout<<tmp;
		if (i == n - 1) {
			cout << endl;
		}
		else {
			cout << " ";
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:32: error: unable to find numeric literal operator 'operator""i64'
   40 |                         if (a&(1i64 << j)) {
      |                                ^~~~
a.cc:62:41: error: unable to find numeric literal operator 'operator""i64'
   62 |                                 tmp += (1i64 << j);
      |                                         ^~~~
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	int n;
	cin >> n;
	int xo[n];
	int allxor = 0;
	for(int i = 0; i < n; i++){
		cin >> xo[n];
		allxor ^= xo[n];
	}
	for(int i = 0; i < n; i++){
		cout << xo[i] ^ allxor << " ";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:40: error: invalid operands of types 'long long int' and 'const char [2]' to binary 'operator<<'
   14 |                 cout << xo[i] ^ allxor << " ";
      |                                 ~~~~~~ ^~ ~~~
      |                                 |         |
      |                                 |         const char [2]
      |                                 long long int
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>


using namespace std;
using ll = long long;

int main() {
	int n;
	int keta[31];
	for (int i = 0;i < 31;i++) {
		keta[i] = 0;
	}
	cin >> n;
	int* a = new int[n];
	for (int i = 0;i < n;i++) {
		cin >> a[i];
		int tmp = a[i];
		for (int i = 0;i < 31;i++) {
			keta[i] += tmp % 2;
			keta[i] %= 2;
			tmp /= 2;
		}
	}
	ll ans;
	for (int i = 0;i < n-1;i++) {
		ans = 0;
		for (int j = 0;j < 31;j++) {
			ans += (ll)pow(2, j) * ((keta[j] + a[i] % 2) % 2);
			a[i] /= 2;
		}
		cout << ans << " ";
	}
	ans = 0;
	for (int j = 0;j < 31;j++) {
		ans += (ll)pow(2, j) * ((keta[j] + a[n-1] % 2) % 2);
		a[n-1] /= 2;
	}
	cout << ans <<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:36: error: 'pow' was not declared in this scope
   30 |                         ans += (ll)pow(2, j) * ((keta[j] + a[i] % 2) % 2);
      |                                    ^~~
a.cc:37:28: error: 'pow' was not declared in this scope
   37 |                 ans += (ll)pow(2, j) * ((keta[j] + a[n-1] % 2) % 2);
      |                            ^~~
Language: C++

include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
long long a[n];
for(long long i=0;i<n;i++){
    cin>>a[i];
}
long long b[n];
long long sum=0;
for(long long i=0;i<n;i++){
    sum^=a[i];
}
for(long long i=0;i<n;i++){
    b[i]=sum^a[i];
}
for(long long i=0;i<n;i++){
    if(i==n-1){
        cout<<b[i]<<endl;
    }
    else{
        cout<<b[i]<<' ';
    }
}
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>n;
      | ^~~
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout<<b[i]<<endl;
      |         ^~~~
a.cc:20:21: error: 'endl' was not declared in this scope
   20 |         cout<<b[i]<<endl;
      |                     ^~~~
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout<<b[i]<<' ';
      |         ^~~~
Language: C++

#include <iostream>

signed main() {
  int n;
  std::cin >> n;

  int a[n];
  int xor = 0;
  for(int i = 0; i < n; i++) {
    std::cin >> a[i];
    xor ^= a[i];
  }

  for(int i = 0; i < n; i++)
    std::cout << a[i]^xor << " ";

  std::cout << std::endl;
  return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: expected unqualified-id before 'xor' token
    8 |   int xor = 0;
      |       ^~~
a.cc:11:5: error: expected primary-expression before 'xor' token
   11 |     xor ^= a[i];
      |     ^~~
a.cc:11:9: error: expected primary-expression before '^=' token
   11 |     xor ^= a[i];
      |         ^~
a.cc:15:23: error: expected primary-expression before 'xor' token
   15 |     std::cout << a[i]^xor << " ";
      |                       ^~~
a.cc:15:27: error: expected primary-expression before '<<' token
   15 |     std::cout << a[i]^xor << " ";
      |                           ^~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n;
  cin>>n;
  int a[n];
  int x = 0;
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    x = x^a[i];
  }
  for(int i=0;i<n;i++)
  {
    int temp = x;
    ans = temp ^ a[i];
    cout<<ans<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |     ans = temp ^ a[i];
      |     ^~~
      |     abs
Language: C

#include<bits/stdc++.h>
using namespace std;
int main(){
	int t=1;
	//cin >> t;
	while(t--){
		long long int n,k,z,i=0,q=0,count=0,c=0,d=0,sum=0,xor1=0;
      	cin >> n ;
      	vector<long long int> arr;
      	//memset(arr,0,sizeof(arr));
      	for(i=0;i<n;i++){
        	cin >> z;
          arr.push_back(z);
          //sum += z;
          xor1^=z;
        }
    	for(i=0;i<n;i++){
          c = arr[i];
        	cout << (c|xor1) - (c&xor1) <<" ";
        }
      
	}
}

Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

n=int(input())
a=list(map(int,input().split()))
s=0
res=list()
for i in range(n):
    s^=a[i]
for i in range(n):
    res.append(s^a[i])
for i in range(n):
    print(res[i],end=" ")

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=int(input())
      | ^
Language: C++

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

int main(){
    int n;
    cin >> n;
    int a[n];
    cin >> a[0];
    int sum = a[0];
    for(int i=1;i<n;i++){
        cin >> a[i];
        sum ^= a[i];
    }
    for(int i=0;i<n;i++)cout << sum^a[i] << " ";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:42: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   14 |     for(int i=0;i<n;i++)cout << sum^a[i] << " ";
      |                                     ~~~~ ^~ ~~~
      |                                        |    |
      |                                        int  const char [2]
Language: C++

#include<bits/stdc++.h>
using namespace std;
     
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define int long long
#define rep(i,a,b)    for(int i=a;i<b;i++)
#define repn(i,a,b)   for(int i=a;i>=b;i--)
#define F first
#define S second
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define mp  make_pair
#define all(v) (v).begin(), (v).end()
#define hell 1000000007  
#define hell2 998244353 

int solve(){
    int n;
    cin>>n;
    int x=0,a[n];
    rep(i,0,n){cin>>a[i]; x=x^a[i];}
    rep(i,0,n) cout<<x^a[i]<<" ";
    return 0;
}   
     
signed main(){
    IOS;
    int t=1;
  //  cin>>t;
    while(t--){
        solve();
        cout<<"\n";
    }
//    return 0;
} 

Compiler output:
a.cc: In function 'long long int solve()':
a.cc:24:28: error: invalid operands of types 'long long int' and 'const char [2]' to binary 'operator<<'
   24 |     rep(i,0,n) cout<<x^a[i]<<" ";
      |                        ~~~~^~~~~
      |                           |  |
      |                           |  const char [2]
      |                           long long int
Language: C++

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

int main() {
	int n;
	cin>>n;
	int x=0;
	long long int int a[300000];
	for(int i=0;i<n;i++)cin>>a[i];
	for(int i=0;i<n;i++)x=x^a[i];
	for(int i=0;i<n;i++)a[i]=x^a[i];
	for(int i=0;i<n;i++)cout<<a[i]<<" ";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: two or more data types in declaration of 'a'
    8 |         long long int int a[300000];
      |                   ^~~
a.cc:9:34: error: 'a' was not declared in this scope
    9 |         for(int i=0;i<n;i++)cin>>a[i];
      |                                  ^
a.cc:10:33: error: 'a' was not declared in this scope
   10 |         for(int i=0;i<n;i++)x=x^a[i];
      |                                 ^
a.cc:11:29: error: 'a' was not declared in this scope
   11 |         for(int i=0;i<n;i++)a[i]=x^a[i];
      |                             ^
a.cc:12:35: error: 'a' was not declared in this scope
   12 |         for(int i=0;i<n;i++)cout<<a[i]<<" ";
      |                                   ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define pb push_back

using namespace std;

const int e = 2e5 + 69;

ll a[e];

int main()
{
    int n;
    cin >> n;
    for(int i=1; i<=n; i++){
        cin >> a[i];
    }
    vector<ll>ans;
    ll x = a[1]^a[2];
    cout << x <<<" ";
    for(int i=2; i<=n; i++){
        cout << a[i] <<" ";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: expected primary-expression before '<' token
   20 |     cout << x <<<" ";
      |                 ^
Language: C++

def xor_operate(a_list):
    result = 0
    for a in a_list:
        result ^= int(a)
    return str(result)



if __name__ == "__main__":
    N = input()
    a_list = input()

    a_list = a_list.split(" ")

    i_list = []
    for i in range(len(a_list)):
        r_list = a_list[:i]+a_list[i+1:]
        i_list.append(xor_operate(r_list))
    return " ".join(i_list)
    


        



Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def xor_operate(a_list):
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main () {
  int N;
  cin >> N;
  vector<int>sc(N);
  int sm = 0;
  for (int i = 0; i < N; i ++) {
    cin >> sc[i];
    sm = sm ^ sc[i];
  }
  for (int i = 0; i < N; i ++) {
    cout << sm ^ sc[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   13 |     cout << sm ^ sc[i] << endl;
Language: C++

// C++ program to find Excel
// column name from a given
// column number
#include <bits/stdc++.h>
#define MAX 50
using namespace std;
#define ll long long
// Function to print Excel column name for a given column number
void printString(ll n)
{
	char str[MAX]; // To store result (Excel column name)
	ll i = 0; // To store current index in str which is result

	while (n > 0) {
		// Find remainder
		ll rem = n % 26;

		// If remainder is 0, then a 'Z' must be there in output
		if (rem == 0) {
			str[i++] = 'z';
			n = (n / 26) - 1;
		}
		else // If remainder is non-zero
		{
			str[i++] = (rem - 1) + 'a';
			n = n / 26;
		}
	}
	str[i] = '\0';

	// Reverse the string and print result
	reverse(str, str + strlen(str));
	cout << str << endl;

	return;
}

// Driver program to test above function
int main()
{
	ll n,i;
	cin>>n;
	ll xo=0;
	for(i=0;i<n;i++)
	{
		cin>>ar[i];
		xo^=ar[i];
	}
	for(i=0;i<n;i++)
		cout<<xo^ar[i]<<" ";
	printf("\n");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:22: error: 'ar' was not declared in this scope
   46 |                 cin>>ar[i];
      |                      ^~
a.cc:50:26: error: 'ar' was not declared in this scope
   50 |                 cout<<xo^ar[i]<<" ";
      |                          ^~
Language: C++

#define mp make_pair
#define FI first
#define SE second
#define maxn 200000
#define mod 1000000007
#define inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef double db;

int a[maxn+5];

int main()
{
    int n; scanf("%d",&n);
    int s=0;
    rep(i,1,n) scanf("%d",&a[i]);
    rep(i,1,n) s^=a[i];
    rep(i,1,n) printf("%d%c",s^a[i]," \n"[i==n]);
    return 0;
}

Compiler output:
a.cc:9:9: error: 'pair' does not name a type
    9 | typedef pair<int,int> pii;
      |         ^~~~
a.cc:10:9: error: 'vector' does not name a type
   10 | typedef vector<int> vi;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:17:12: error: 'scanf' was not declared in this scope
   17 |     int n; scanf("%d",&n);
      |            ^~~~~
a.cc:19:9: error: 'i' was not declared in this scope
   19 |     rep(i,1,n) scanf("%d",&a[i]);
      |         ^
a.cc:19:5: error: 'rep' was not declared in this scope
   19 |     rep(i,1,n) scanf("%d",&a[i]);
      |     ^~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n; cin>>n; int a[n];
  ll s=0;
  rep(i,n){
    cin>>a[i];
    s=s^a[i];
  }
  rep(i,n){
    cout<< s^a[i] <<" ";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   26 |     cout<< s^a[i] <<" ";
      |              ~~~~ ^~~~~
      |                 |   |
      |                 int const char [2]
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n; cin>>n; int a[n];
  ll s=0;
  rep(i,n){
    cin>>a[i];
    s=s^a[i];
  }
  rep(i,n){
    cout<<s^a[i]<<" ";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   26 |     cout<<s^a[i]<<" ";
      |             ~~~~^~~~~
      |                |  |
      |                |  const char [2]
      |                int
Language: C++

#include<iostream>
#include<vector>

int main(){
  int n;
  std::cin>>n;
  std::vector<int> a(n);
  for(auto &e:a)std::cin>>e;
  int g=0;
  for(auto e:a)g^=e;
  for(auto e:a)std::cout<<g^e<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   11 |   for(auto e:a)std::cout<<g^e<<"\n";
      |                             ~^~~~~~
      |                             |  |
      |                             |  const char [2]
      |                             int
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef long double D;
//typedef complex<D> P;
#define F first
#define S second
const ll MOD=1000000007;
//const ll MOD=998244353;

template<typename T,typename U>istream & operator >> (istream &i,pair<T,U> &A){i>>A.F>>A.S; return i;}
template<typename T>istream & operator >> (istream &i,vector<T> &A){for(auto &I:A){i>>I;} return i;}
template<typename T,typename U>ostream & operator << (ostream &o,const pair<T,U> &A){o<<A.F<<" "<<A.S; return o;}
template<typename T>ostream & operator << (ostream &o,const vector<T> &A){int i=A.size(); for(auto &I:A){o<<I<<(--i?" ":"");} return o;}



int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll N;
  cin>>N;
  vector<ll> A(N);
  cin>>A;
  ll x=0;
  for(auto &I:A){x^=I;}
  for(auto &I:A){cout<<x^I<<endl;}
  


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:27: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
   29 |   for(auto &I:A){cout<<x^I<<endl;}
      |                          ~^~~~~~
Language: C++

#include<cstdio>
#include<algorithm>
using namespace std;
#define ll long long
const ll mod=1e9+7;
const int maxn=1e6+5;
char ss[maxn];
ll f[2*maxn],inv[2*maxn];
ll quick_pow(ll a,int times)
{
    ll res=1;
    while(times)
    {
        if(times&1) res=(res*a)%mod;
        a=(a*a)%mod; times>>=1;
    }
    return res;
}
ll binom(int a,int b)
{
    return f[a]*inv[b]%mod*inv[a-b]%mod;
}
int main()
{
    int k;
    scanf("%d",&k);
    scanf("%s",ss);
    int s=(int)strlen(ss);
    int len=k+s;
    f[0]=1;
    for(int i=1;i<=len;i++)
        f[i]=(f[i-1]*i)%mod;
    inv[len]=quick_pow(f[len],(int)mod-2);
    for(int i=len-1;i>=0;i--)
        inv[i]=inv[i+1]*(i+1)%mod;
    ll ans=0;
    for(int i=s;i<=len;i++)
    {
        ll cur=1;
        int front=i-s,back=len-i;
        cur=cur*quick_pow(25,front)%mod*quick_pow(26,back)%mod;
        cur=cur*binom(i-1,s-1)%mod;
        ans=(ans+cur)%mod;
    }
    printf("%lld\n",ans);
    return 0;
}
/*
5
oof
 
37564
whydidyoudesertme
 */


Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: 'strlen' was not declared in this scope
   28 |     int s=(int)strlen(ss);
      |                ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C

#include <stdio.h>
#include <stdlib.h>

#define ll long long
#define MD 1000000007
#define mod(n) ((n%MD+MD)%MD)
#define max(x, y) (x>y? x : y)
#define min(x, y) (x<y? x : y)
#define mul3(x, y, z) (mod(mod(x*y)*z)) 

ll perm(ll n, ll r){
    ll res = 1;
    for(ll i=0;i<r;i++){
        res = mod(res*(n-i));
    }
    return res;
}

ll memo_inv[1000000] = {0};
ll inv(ll _n){
    //printf("inv: %lld\n", _n);
    if(memo_inv[_n]) return memo_inv[_n];
    ll res = 1;
    ll a = MD-2;
    ll n = _n;
    while(a){
        if(a&1) res = mod(res*n);
        n = mod(n*n);
        a >>= 1;
    }

    memo_inv[_n] = res;
    return res;
}

ll conb(ll n, ll r){
    ll res = 1;
    r = min(r, n-r);
    for(ll i=0;i<r;i++){
        res = mod(res*(n-i));
        res = mod(res*inv(r-i));
    }
    return res;
}

ll modpow(ll x, ll y){
    ll res = 1;
    while(y>0){
        if(y&1) res = mod(res*x);
        x = mod(x*x);
        y >>= 1;
    }
    return res;
}

ll pow25[1000000] = {1};
ll pow26[1000000] = {1};

int main(){
    ll K;
    char S[1000000];
    scanf("%lld%s", &K, S);
    // end input

    ll s_len = 0;
    for(;s_len<(ll)1e6;s_len++){
        if(!S[s_len]) break;
    }

    /*for(ll i=1;i<=K;i++){
        pow25[i] = mod(pow25[i-1]*25);
        pow26[i] = mod(pow26[i-1]*26);
    }

    for(ll i=0;i<K+1;i++)
    printf("%lld\n", pow25[i]-modpow(25,i));
    return 0;*/
    
    ll ans = 0;
    for(ll i=K;i>=0;i--){
        //ll t = mul3(conb(s_len+i-1, i), pow25[i], pow26[K-i]);
        ll t = mul3(conb(s_len+i-1, i), modpow(25, i), modpow(26, K-i));
        a = mod(ans + t);
    }
    printf("%lld\n", ans);

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:83:9: error: 'a' undeclared (first use in this function)
   83 |         a = mod(ans + t);
      |         ^
main.c:83:9: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long k = sc.nextLong();
    String s = sc.next();
    long n = s.length();
    long MOD = (long)Math.pow(10, 9) + 7;
    long[] rui26 = new long[1000001];
    long[] rui25 = new long[1000001];
    rui26[0] = 1;
    rui25[0] = 1;
    long[] kai = new long[2000001];
    kai[0] = 1;
    for(long i = 1; i < 2000001; i++) {
      kai[(int)i] = (kai[(int)(i - 1)] * i) % MOD;
    }
    for(int i = 1; i < 1000001; i++) {
      rui26[i] = (rui26[(int)(i - 1)] * (long)26) % MOD;
    }
    for(int i = 1; i < 1000001; i++) {
      rui25[i] = (rui25[(int)(i - 1)] * (long)25) % MOD;
    }
    long ans = 0;
    for(long t = 0; t <= k; t++) {
      long c = (rui26[(int)t] * rui25[(int)(k - t - 1)]) % MOD;
      c = (c * kai[(int)(n + k - t - 1)]) % MOD;
      long d = kai[(int)(n - 1)];
      long e = kai[(int)(k - t)];
      c = (c * func(d, MOD - 2)) % MOD;
      c = (c * func(e, MOD - 2)) % MOD;
      ans = (ans + c) % MOD;
    }
    System.out.println(ans);
  }

  public static long func(long a, long x) {
    if(x == 0) return 1;
    if((x % 2) == 0) {
      long t = func(a, x / 2);
      return (t * t) % MOD;
    } else {
      return (a * func(a, x - 1)) % MOD;
    }
  }
}


Compiler output:
Main.java:42: error: cannot find symbol
      return (t * t) % MOD;
                       ^
  symbol:   variable MOD
  location: class Main
Main.java:44: error: cannot find symbol
      return (a * func(a, x - 1)) % MOD;
                                    ^
  symbol:   variable MOD
  location: class Main
2 errors
Language: C++

#include<vector>
#include<iostream>
#include<algorithm>
#include<chrono>
#include<set>
#include<cstdio>
#include<string>
#include<unordered_map>

using namespace std;
typedef long long ll;
const int mod=1e9+7;

ll qpow(ll a,ll n){
    ll res=1;
    while(n)
    {
        if(n&1) 
          res = res*a%mod;
        a=a*a%mod;
        n >>= 1;
    }
    return res;
}

int n,m;
ll ans,f[10000005]={1}, inv[10000005]={1};

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    for(int i=1;i<=3e6;i++){
        f[i] = f[i-1] * i%mod;
        inv[i] = qpow(f[i],mod-2); //质数模下的逆元，根据费马定理
    }
    int K;
    long long ans = 0;
    string S;
    cin >> K >> S;
    int n = S.length();
    for(int i = 0; i <= K; i++){
        ans = (ans + qpow(26,i)%mod*f[n+K-i-1]%mod*inv[n-1]*inv[K-i]%mod*qpow(25,K-i))%mod;
    }
    cout << ans;
}

Compiler output:
/tmp/cclvEbbz.s: Assembler messages:
/tmp/cclvEbbz.s: Fatal error: can't fill 256 bytes in section .data of /tmp/cciijKP5.o: 'No space left on device'
/tmp/cclvEbbz.s: Fatal error: /tmp/cciijKP5.o: No such file or directory
Language: C++


#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>

typedef unsigned long long ULLONG;
typedef long long LLONG;
static const LLONG MOD_NUM = 1000000007;//998244353;

template<class _T> static void get(_T& a) {
	std::cin >> a;
}
template<class _T> static void get(_T& a, _T& b) {
	std::cin >> a >> b;
}
template<class _T> static void get(_T& a, _T& b, _T& c) {
	std::cin >> a >> b >> c;
}

static void exec();

int main()
{
	exec();
	fflush(stdout);
	return 0;
}

static void exec()
{
	int K;
	get(K);

	std::string orgs;
	get(orgs);

	int len = orgs.length();
	LLONG ans = 0;
	PermComb<LLONG> cmb(len + K, MOD_NUM);

	for (int k = 0; k <= K; k++) {
		LLONG tmp = (cmb.nCk(len + K - k - 1, len - 1) * tp_modpow<LLONG>(25, K - k, MOD_NUM)) % MOD_NUM;
		tmp *= tp_modpow<LLONG>(26, k, MOD_NUM);
		ans = (ans + tmp) % MOD_NUM;
	}

	printf("%lld\n", ans);
}


Compiler output:
a.cc: In function 'void exec()':
a.cc:48:9: error: 'PermComb' was not declared in this scope
   48 |         PermComb<LLONG> cmb(len + K, MOD_NUM);
      |         ^~~~~~~~
a.cc:48:23: error: expected primary-expression before '>' token
   48 |         PermComb<LLONG> cmb(len + K, MOD_NUM);
      |                       ^
a.cc:48:25: error: 'cmb' was not declared in this scope
   48 |         PermComb<LLONG> cmb(len + K, MOD_NUM);
      |                         ^~~
a.cc:51:66: error: 'tp_modpow' was not declared in this scope
   51 |                 LLONG tmp = (cmb.nCk(len + K - k - 1, len - 1) * tp_modpow<LLONG>(25, K - k, MOD_NUM)) % MOD_NUM;
      |                                                                  ^~~~~~~~~
a.cc:51:81: error: expected primary-expression before '>' token
   51 |                 LLONG tmp = (cmb.nCk(len + K - k - 1, len - 1) * tp_modpow<LLONG>(25, K - k, MOD_NUM)) % MOD_NUM;
      |                                                                                 ^
a.cc:52:39: error: expected primary-expression before '>' token
   52 |                 tmp *= tp_modpow<LLONG>(26, k, MOD_NUM);
      |                                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max=1e6+10, N=Max+10, mod=1e9+7;

ll fct[N],k,ans;
string s;

ll qmi(ll a,ll b){
	ll res=1;
	while(b){
		if(b&1) res=res*a%mod;
		b>>=1; a=a*a%mod;
	}
	return res;
}
ll C(ll a,ll b){
	if(a<b) return 0;
	return fct[a]*qmi(fct[b],mod-2)%mod*qmi(fct[a-b],mod-2)%mod;
}
void init(){
	fct[0]=1;
	for(ll i=1;i<=n;i++) fct[i]=fct[i-1]*i%mod;
}
int main(){
	cin>>k;
	cin>>s;
	init();
	ll len=s.size();
	ll n=len+k;
	for(ll i=len;i<=n;i++){
		ans+=C(i-1,len-1)*qmi(25,i-len)%mod*qmi(26,n-i)%mod, ans%=mod;
	}
	cout<<ans<<endl;
	return 0;
} 

Compiler output:
a.cc: In function 'void init()':
a.cc:23:23: error: 'n' was not declared in this scope
   23 |         for(ll i=1;i<=n;i++) fct[i]=fct[i-1]*i%mod;
      |                       ^
Language: C++

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

long long MOD = 1000000000 + 7;
long long fact[9999999]={1};
long long invfact[9999999]={1};

long long nCr(int n, int r){
    long long ans = (fact[n] * invfact[r] % MOD) * invfact[n-r] % MOD; 
    return ans;
}

long long power(long long a, long long b){
    long long res = 1;

    while(b > 0){
        if(b&1) res = res * a % MOD;
        a = a * a % MOD;
        b >>= 1;
    }
    return res;
}

int main(void)
{
    for(int i = 1; i < 9999999; i++){
        fact[i] = fact[i-1] * i % MOD;
    }
    
    invfact[9999999-1] = power(fact[9999999-1], MOD-2);
    for(int i = 9999999-1; i > 0; i--){
        invfact[i-1] = invfact[i] * i % MOD; 
    }


    long long K;
    string S;

    cin >> K >> S;

    int slen = S.length();

    int tlen = slen + K;
    long long ans = 0;
    for(int i = slen; i <= tlen; i++){
        ans += power(26 , (tlen - i)) * power(25, (tlen - slen - (tlen - i ) )) % MOD * nCr((tlen - (tlen - i ) -1), slen-1 ) % MOD;
        ans %= MOD;
    }

    cout << ans << endl;
}


Compiler output:
/tmp/cc4ZSoOZ.s: Assembler messages:
/tmp/cc4ZSoOZ.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccddW0tR.o: 'No space left on device'
Language: C++

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

long long MOD = 1000000000 + 7;
long long fact[10000000]={1};
long long invfact[10000000]={1};

long long nCr(int n, int r){
    long long ans = (fact[n] * invfact[r] % MOD) * invfact[n-r] % MOD; 
    return ans;
}

long long power(long long a, long long b){
    long long res = 1;

    while(b > 0){
        if(b&1) res = res * a % MOD;
        a = a * a % MOD;
        b >>= 1;
    }
    return res;
}

int main(void)
{
    for(int i = 1; i < 10000000; i++){
        fact[i] = fact[i-1] * i % MOD;
    }
    
    invfact[10000000-1] = power(fact[10000000-1], MOD-2);
    for(int i = 10000000-1; i > 0; i--){
        invfact[i-1] = invfact[i] * i % MOD; 
    }


    long long K;
    string S;

    cin >> K >> S;

    int slen = S.length();

    int tlen = slen + K;
    long long ans = 0;
    for(int i = slen; i <= tlen; i++){
        ans += power(26 , (tlen - i)) * power(25, (tlen - slen - (tlen - i ) )) % MOD * nCr((tlen - (tlen - i ) -1), slen-1 ) % MOD;
        ans %= MOD;
    }

    cout << ans << endl;
}


Compiler output:
/tmp/ccmJbeK5.s: Assembler messages:
/tmp/ccmJbeK5.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccrZFCiT.o: 'No space left on device'
Language: C++

#include <iostream>
#include <vector>
#include <string>

struct ModValue
{
    static constexpr int
        value = 1'000'000'007;
};

template<int mod = ModValue::value>
struct mint
{   
    long long x;
    
    mint(long long xx = 0) : x(xx % mod){}
    
    mint(const mint&) = default;
    mint& operator=(const mint& rhs) = default;
    
    mint operator-() const
    {
        return mint(-x);
    }
    
    mint& operator+=(const mint rhs)
    {
        x += rhs.x;
        if(x >= mod)
        {
            x -= mod;
        }
        
        return *this;
    }
    
    mint& operator-=(const mint rhs)
    {
        x += mod - rhs.x;
        if(x >= mod)
        {
            x -= mod;
        }
        
        return *this;
    }
    
    mint& operator*=(const mint rhs)
    {
        x *= rhs.x;
        x %= mod;
        return *this;
    }
    
    mint operator+(const mint rhs) const
    {
        return mint(*this) += rhs;
    }
    
    mint operator-(const mint rhs) const
    {
        return mint(*this) -= rhs;
    }
    
    mint operator*(const mint rhs) const
    {
        return mint(*this) *= rhs;
    }
    
    mint pow(long long t) const
    {
        mint rtn = 1;
        mint tmp = *this;
        while(t > 0)
        {
            if(t & 1)
            {
                rtn *= tmp;
            }
            tmp *= tmp;
            t >>= 1;
        }
        return rtn;
    }
    
    mint inv() const
    {
        return pow(mod - 2);
    }
    mint& operator/= (const mint rhs)
    {
        return *this *= rhs.inv();
    }
    mint operator/ (const mint rhs) const
    {
        return mint(*this) /= rhs;
    }
};
template<int mod = ModValue::value>
std::istream& operator>>(std::istream& is, mint<mod>& m)
{ return is >> m.x; }

template<int mod = ModValue::value>
std::ostream& operator<<(std::ostream& os, mint<mod>& m)
{ return os << m.x; }

template<int mod = ModValue::value>
struct combination
{
    // factorial, invFactorial
    std::vector<mint<mod>> fact, ifact;
    
    combination(int n) : fact(n + 1), ifact(n + 1)
    {
        fact[0] = 1;
        for(int i = 1; i <= n; ++i)
        {
            fact[i] = fact[i - 1] * i;
        }
        
        // inv
        ifact[n] = fact[n].inv();
        for(int i = n; i >= 1; --i)
        {
            ifact[i - 1] = ifact[i] * i;
        }
    }
    
    mint<mod> operator()(int n, int k)
    {
        if(k < 0 || k > n)
        {
            return 0;
        }
        // nCk = n! / k!(n-k)!
        return fact[n] * ifact[k] * ifact[n - k];
    }
};

int main()
{
    long long k;
    std::string s;
    
    std::cin >> k >> s;
    long long n = s.size();
    
    combination c(n+k);
    mint rtn = 0;
    for(long long i = 0; i <= k; ++i)
    {
        rtn += mint(26).pow(k - i) * mint(25).pow(i) * c(n-1+i,n-1);
    }
    
    std::cout << rtn << std::endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:155:35: error: expected '}' at end of input
  155 |     std::cout << rtn << std::endl;
      |                                   ^
a.cc:141:1: note: to match this '{'
  141 | {
      | ^
Language: C++

from sys import stdin,stdout
input = stdin.readline
print = stdout.write
from math import factorial as f
def nCr(n,r):
    return f(n)//f(r)//f(n-r)
M = 1000000007
k = int(input())
ls = len(input())
total = pow(26,ls+k,M)
noSubsequence = 0
for i in range(ls):
    noSubsequence += (nCr(k+ls,i)%M)*pow(25,k+ls-i,M)
    noSubsequence %= M
subsequence = str(total - noSubsequence)
print(subsequence+'\n')

Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from sys import stdin,stdout
      | ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <string>
#include <set>

using namespace std;

const int mod = (int)1e9 + 7;

// a^n % mod
long long modpow(long long a, long long n, long long mod) {
	long long ret = 1;

	while (n > 0) {
		if (n & 1) {
			ret = ret * a % mod;
		}

		a = a * a % mod;
		n >>= 1;
	}

	return ret;
}

// aの逆元
long long modinv(long long a, long long mod) {
	assert(gcd(a, mod) == 1);
	// TODO assert(modが素数)
	return modpow(a, mod - 2, mod);
}


class Combination {
public:
	vector<long long> fact, ifact;
	long long mod;
public:
	Combination(int n, int mod) : fact(n+1), ifact(n+1), mod(mod) {
		fact[0] = 1;
		for (int i = 1; i <= n; i++) {
			fact[i] = fact[i-1] * i % mod;
		}
		ifact[n] = modinv(fact[n], mod);
		for (int i = n; i > 0; i--) {
			ifact[i-1] = ifact[i] * i % mod;
		}
	};
	// ~Combination();

	// nCk
	long long comb(int n, int k) {
		assert(n >= 0);
		assert(0 <= k && k <= n);
		return fact[n] * ifact[k] % mod * ifact[n-k] % mod;
	}

	// nPk
	long long perm(int n, int k) {
		assert(n >= 0);
		assert(0 <= k && k <= n);
		return fact[n] * ifact[n - k] % mod;
	}

	// nHk n種類から重複を許してk個
	long long h(int n, int k) {
		return comb(n - k + 1, k);
	}
};

int main() {
	int k, n;
	string s;
	cin >> k >> s;

	n = s.size();
	Combination com(n+k, mod);

	long long sum = 0;
	for (int i = 0; i <= k; i++) {
		sum += modpow(25, i, mod) * modpow(26, k - i, mod) * com.comb(i + n - 1, n - 1);
		sum %= mod;
	}

	cout << sum << endl;
	return 0;
}


Compiler output:
a.cc: In function 'long long int modinv(long long int, long long int)':
a.cc:32:9: error: 'assert' was not declared in this scope
   32 |         assert(gcd(a, mod) == 1);
      |         ^~~~~~
a.cc:9:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
    8 | #include <set>
  +++ |+#include <cassert>
    9 | 
a.cc: In member function 'long long int Combination::comb(int, int)':
a.cc:57:17: error: 'assert' was not declared in this scope
   57 |                 assert(n >= 0);
      |                 ^~~~~~
a.cc:57:17: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
a.cc: In member function 'long long int Combination::perm(int, int)':
a.cc:64:17: error: 'assert' was not declared in this scope
   64 |                 assert(n >= 0);
      |                 ^~~~~~
a.cc:64:17: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
Language: C++

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

const int N=4000005;
const long long int mod=1e9+7;
long long int f[N],inv[N],p[N],ans=1;

long long int modpow(long long int x, long long int n){
    long res=1;
    for(; n>0; n>>=1) {
        if (n&1) res=res*x%mod;
        x=x*x%mod;
    }
    return res;
}

int main(){
    string s;
    cin >> s;
    int n=s.length()
	f[0]=p[0]=1;
	int k;
    cin >> k;
    n+=k;
	for(int i=1;i<=n;i++) f[i]=f[i-1]*i%mod;
	inv[n]=modpow(f[n],mod-2);//逆元はmod-2乗すればいいことが知られている
	for(int i=n;i>=1;i--) inv[i-1]=inv[i]*i%mod;
	for(int i=1;i<=n;i++) p[i]=p[i-1]*25%mod,ans=ans*26%mod;
	for(int i=0;i<k;i++){
		ans=(ans-f[n]*inv[i]%mod*inv[n-i]%mod*p[n-i]%mod+mod)%mod;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: expected ',' or ';' before 'f'
   21 |         f[0]=p[0]=1;
      |         ^
Language: C++

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

const int N=4000005;
const long long int mod=1e9+7;
long long int f[N],inv[N],p[N],ans=1;

long long int modpow(long long int x, long long int n){
    long res=1;
    for(; n>0; n>>=1) {
        if (n&1) res=res*x%mod;
        x=x*x%mod;
    }
    return res;
}

int main(){
    string s;
    cin >> s;
    int n=s.length()
	f[0]=p[0]=1;
	int k;
    cin >> k;
    n+=k;
	for(int i=1;i<=n;i++) f[i]=f[i-1]*i%mod;
	inv[n]=modpow(f[n],mod-2);//逆元はmod-2乗すればいいことが知られている
	for(int i=n;i>=1;i--) inv[i-1]=inv[i]*i%MOD;
	for(int i=1;i<=n;i++) p[i]=p[i-1]*25%MOD,ans=ans*26%MOD;
	for(int i=0;i<k;i++){
		ans=(ans-f[n]*inv[i]%MOD*inv[n-i]%MOD*p[n-i]%MOD+MOD)%MOD;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: expected ',' or ';' before 'f'
   21 |         f[0]=p[0]=1;
      |         ^
a.cc:27:49: error: 'MOD' was not declared in this scope
   27 |         for(int i=n;i>=1;i--) inv[i-1]=inv[i]*i%MOD;
      |                                                 ^~~
a.cc:28:46: error: 'MOD' was not declared in this scope
   28 |         for(int i=1;i<=n;i++) p[i]=p[i-1]*25%MOD,ans=ans*26%MOD;
      |                                              ^~~
a.cc:30:38: error: 'MOD' was not declared in this scope
   30 |                 ans=(ans-f[n]*inv[i]%MOD*inv[n-i]%MOD*p[n-i]%MOD+MOD)%MOD;
      |                                      ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

constexpr long long MOD = 1e9+7;

// MOD考慮べき乗関数 計算量O(log(N))
template<typename type>
inline type ModPow(type a, type b)
{
	type ret=1;
	while(b>0){
		if(b&0x1) ret=ret*a%MOD;
		a=a*a%MOD;
		b>>=1;
	}
	return ret;
}

// メモ化MOD考慮Combination関数使用準備関数 計算量O(N)
vector<long long> fac, finv, inv;
inline void ModCombiSetup(int size)
{
	fac.resize(size+1);
	finv.resize(size+1);
	inv.resize(size+1);
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for(long long i=2;i<size;i++){
		fac[i]=fac[i-1]*i%MOD;
		inv[i]=MOD-inv[MOD%i]*(MOD/i)%MOD;
		finv[i]=finv[i-1]*inv[i]%MOD;
	}
}

// メモ化MOD考慮Combination関数 計算量O(1)
inline long long ModCombi(long long n, long long r)
{
	if(n==0 && r==0) return 1;
	if(n<r || n<0) return 0;
	return fac[n]*(finv[r]*finv[n-r]%MOD)%MOD;
}

int main()
{
    int k;
    string s;
    cin >> k;
    cin >> s;

    long long ans=0;
    long long word_length = s.length()+k;
    ModCombiSetup(word_length);

    for(long long i=s.length();i<=word_length;i++){
        long long t = ModCombi(i-1,s.length()-1);
        t = t * ModPow(25ll,(long long)i-s.length()) % MOD;
        t = t * ModPow(26ll,(long long)word_length-i) % MOD;
        ans = (ans % MOD + t % MOD) % MOD;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:23: error: no matching function for call to 'ModPow(long long int, long long unsigned int)'
   58 |         t = t * ModPow(25ll,(long long)i-s.length()) % MOD;
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:13: note: candidate: 'template<class type> type ModPow(type, type)'
    9 | inline type ModPow(type a, type b)
      |             ^~~~~~
a.cc:9:13: note:   template argument deduction/substitution failed:
a.cc:58:23: note:   deduced conflicting types for parameter 'type' ('long long int' and 'long long unsigned int')
   58 |         t = t * ModPow(25ll,(long long)i-s.length()) % MOD;
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

const long long int mod=1e9+7;
long long int modpow(long long int x, long long int n){
    long res=1;
    for(; n>0; n>>=1) {
        if (n&1) res=res*x%mod;
        x=x*x%mod;
    }
    return res;
}
long long modinv(long long a) {
    return modpow(a, mod - 2);
}

long long int nCr(long long int n, long long int r){
    long res=1;
    for(long int i=0; i<r; ++i) res=res*(n-i)%mod;
    for(long int i=1; i<=r; ++i) res=res*modpow(i, mod-2)%mod;
    return res;
}
int main(){
    long long int k;
    cin >> k;
    string s;
    cin >> s;
    long long int n=s.length();
    long long int def=modpow(25LL,k);
    long long int tmp = (def*nCr(k+n-1LL,n-1LL))%mod;
    long long int ans = tmp;
    long long int inv=modinv(25LL,mod);
    for(long long int i=1;i<=k;i++){
        tmp *= 26LL;
        tmp %= mod;
        tmp *= inv;
        tmp %= mod;       
        tmp *= modinv(k+n-i,mod);
        tmp %= mod;
        if(i<k)tmp *= (k-i);
        tmp %= mod;
        ans += tmp;
        ans %= mod;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:29: error: too many arguments to function 'long long int modinv(long long int)'
   32 |     long long int inv=modinv(25LL,mod);
      |                       ~~~~~~^~~~~~~~~~
a.cc:13:11: note: declared here
   13 | long long modinv(long long a) {
      |           ^~~~~~
a.cc:38:22: error: too many arguments to function 'long long int modinv(long long int)'
   38 |         tmp *= modinv(k+n-i,mod);
      |                ~~~~~~^~~~~~~~~~~
a.cc:13:11: note: declared here
   13 | long long modinv(long long a) {
      |           ^~~~~~