criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>

using namespace std;

int main() {
  int n;
  cin >> n;
  string s[n];
  int m[n][26] = {};
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    for (int j = 0; s[i][j] != '\0'; j++) {
      m[i][s[i][j] - 'a']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    int cn = 50;
    for (int j = 0; j < n; j++) {
      cn = min(cn, s[j][i]);
    }
    cout << string(cn, i + 'a');
  }
  cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   19 |       cn = min(cn, s[j][i]);
      |            ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:19:15: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   19 |       cn = min(cn, s[j][i]);
      |            ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Sample {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	Scanner scan = new Scanner(System.in);
	int n = scan.nextInt();
	 List<Character> a = new ArrayList<Character>(51);
	List<String> list = new ArrayList<String>();
    for(int i=0;i<n;i++){
    	list.add(scan.next());
    }
    List<Character > b =new ArrayList<Character > () ;
	List<Character > c = new ArrayList<Character >  () ;
	b= cha(list.get(0));
	 Collections.sort(b);
	 if(n==1){
		 for(char t:b){
	    	System.out.print(t);
		 }
	    }else{
	c = cha(list.get(1));
	 	Collections.sort(c);
	 b.retainAll(c);
	 a=b;
    for(int i=0;i<n-1;i++){
    	List<Character > d =new ArrayList<Character > () ;
    	List<Character > e = new ArrayList<Character >  () ;
    	d= cha(list.get(i));
    	e = cha(list.get(i+1));
    	Collections.sort(d);
    	Collections.sort(e);
    	 d.retainAll(e);
    	 a.retainAll(d);
      }
    for(char g:a){
    System.out.print(g);
    }
}
}
	public static List<Character > cha(String s){
		List<Character > a = new ArrayList<Character >();
		for(int i=0;i<s.length();i++){
			a.add(s.charAt(i));
		}
		return a;
	}
}

Compiler output:
Main.java:5: error: class Sample is public, should be declared in a file named Sample.java
public class Sample {
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Sample {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
	Scanner scan = new Scanner(System.in);
	int n = scan.nextInt();
	 List<Character> a = new ArrayList<Character>(50);
	List<String> list = new ArrayList<String>();
    for(int i=0;i<n;i++){
    	list.add(scan.next());
    }
    List<Character > b =new ArrayList<Character > () ;
	List<Character > c = new ArrayList<Character >  () ;
	b= cha(list.get(0));
	c = cha(list.get(1));
	 b.retainAll(c);
	 Collections.sort(b);
 	Collections.sort(c);
	 a=b;
    for(int i=0;i<n-1;i++){
    	List<Character > d =new ArrayList<Character > () ;
    	List<Character > e = new ArrayList<Character >  () ;
    	d= cha(list.get(i));
    	e = cha(list.get(i+1));
    	Collections.sort(d);
    	Collections.sort(e);
    	 d.retainAll(e);
    	 a.retainAll(d);
      }
    for(char g:a){
    System.out.print(g);
    }
	}
	public static List<Character > cha(String s){
		List<Character > a = new ArrayList<Character >();
		for(int i=0;i<s.length();i++){
			a.add(s.charAt(i));
		}
		return a;
	}
}

Compiler output:
Main.java:5: error: class Sample is public, should be declared in a file named Sample.java
public class Sample {
       ^
1 error
Language: C++

#include <iostream>
#include <sstream>
#include <vector>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <float.h>
#include <queue>
#include <set>
#include <map>
#include <fstream>
#include <cstdlib>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <stack>
#include <functional>
       
using namespace std;
       
#define endl '\n'
#define MOD 1000000007
#define INF 1ll<<30
 
// #define MAX 100010
 
#define eps 1e-11
#define bit_max 1ll<<32
#define _USE_MATH_DEFINES
 
// long long binpow(long long a,long long b)
// {
//     if (b == 1) return a;
//     long long res = binpow(a, b/2)%MOD;
//     if (b % 2) return (res*((res*a)%MOD))%MOD;
//     else return (res * res)%MOD;
// }
 
// long long int fact(long long int a)
// {
//     if(a==0||a==1)
//         return 1;
//     long long int ans = 1;
//     for(int i=a;i>=1;i--)
//         ans = (ans * i);
//     return ans;
// }
 
// long long int ivmod(long long int a)
// {
//     return binpow(a,MOD-2);
// }
 
// long long int ncr(long long int a,long long int b)
// {
//     long long int pans=1;
//     for(int i =a;i>max(b,a-b);i--)
//         pans=pans*i;
//     long long int div = fact(min(b,a-b));
//     // cout<<ans<<"            "<<div<<endl;
//     pans = pans/div;
//     return pans;
// }


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // #ifndef ONLINE_JUDGE
        // freopen("input.txt","r",stdin);
        // freopen("output.txt","w",stdout);
    // #endif
    int n;
    cin>>n;
    map<char,int> mm;
    for(int i=0;i<n;i++)
    {
        string a;
        cin>>a;
        if(i==0)
        {
            for(int j=0;j<a.length();j++)
            {
                mm[a[j]]++;
            }
        }
        else
        {
            map<char,int> mmt;
            for(int j=0;j<a.length();j++)
            {
                mmt[a[j]]++;
            }
            map<char,int>::iterator itt = mmt.begin();
            for(map<char,int>::iterator it = mm.begin();it!=mm.end();it++)
            {
                it->second = min(it->second,itt->second)
                itt++;
            }
        }
    }
    char arr[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
    int c = 0;
    for(map<char,int>::iterator it = mm.begin();it!=mm.end();it++)
    {
        int temp = it->second;
        for(int i=0;i<temp;i++)
        {
            cout<<arr[c];
        }
        c++;
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:102:57: error: expected ';' before 'itt'
  102 |                 it->second = min(it->second,itt->second)
      |                                                         ^
      |                                                         ;
  103 |                 itt++;
      |                 ~~~
Language: C++

#include <iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include <queue>
#include<algorithm>
typedef long long int ll;
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define EREP(i,n) for (int i=1;i<=(n);i++)
#define EVEL 1
#ifndef EVEL
#define DEB(X) cout << #X << ":" <<X<<" " ;
#define TF(f) f ? cout<<"true  " : cout<<"false ";
#define END cout<<"\n";
#else
#define DEB(X) {X=X;}
#define TF(f) {f=f;}
#define END {}
#endif
const ll MOD = 1000000007;
    ll N,sum=0,c;
    std::vector<std::string> S;
      string saw;
    string as="",ans="";
    int m[30];
    int yui[30];
int main(){
    ios_base::sync_with_stdio(false);
    cin>>N;
    REP(i,N){
        string s;

        cin>>s;
        for(auto x:s){
DEB((int)x-(int)'a')
            yui[(int)x-(int)'a']++;
DEB(yui[(int)x-(int)'a'])END
        }
        REP(j,(int)'z'-(int)'a'+1){
            if(i==0){
                m[j]=yui[j];
            }else{
DEB(j)DEB(m[j])DEB(yui[j])END
                m[j]=min(yui[j],m[j]);
            }
if(m[j]==0&&yui[j]==0)break;
        }
REP(k,30)yui[k]=0;
    }
DEB(m[0])DEB(m[1])DEB(m[2])END
    REP(i,(int)'z'-(int)'a'+1){
        REP(j,m[i]){
            cout<<(char)(i+(int)'a');
        }
    }
    cout<<endl;
    //cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:11: error: lvalue required as left operand of assignment
   40 | DEB((int)x-(int)'a')
      |     ~~~~~~^~~~~~~~~
a.cc:21:17: note: in definition of macro 'DEB'
   21 | #define DEB(X) {X=X;}
      |                 ^
Language: Java

package AtCoder;

public class DubiousDocument {
    public static void main(String[] args) {
        String count = System.console().readLine();
        int iCount = Integer.parseInt(count);
        int[] alphabetTable = new int[26];
        for (int i = 0; i < 26; i++) {
            alphabetTable[i] = 1000;
        }
        for (int i = 0; i < iCount; i++) {
            String tempStr = System.console().readLine();
            for (int j = 0; j < 26; j++) {
                alphabetTable[j] = Math.min(CountChar(tempStr, (char) (0x61 + j)), alphabetTable[j]);
            }
        }
        for (int i = 0; i < 26; i++) {
            for (int j = 0; j < alphabetTable[i]; j++) {
                System.out.print((char) (0x61 + i));
            }
        }
        System.out.println("");
    }

    private static int CountChar(String input, char needle) {
        int count = 0;
        int now = 0;
        int index;
        while ((index = input.indexOf(needle, now)) >= 0) {
            count++;
            now = index;
        }
        return count;
    }

}


Compiler output:
Main.java:3: error: class DubiousDocument is public, should be declared in a file named DubiousDocument.java
public class DubiousDocument {
       ^
1 error
Language: C++

#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n;
    cin >> n;

    //初期条件
    int x[27] = {};
    string str;
    cin >> str;
    for (int i = 0; i < str.size(); ++i){
        x[str[i]-'a']++;
    }

    //比較
    for (int i = 1; i < n; ++i){
        string str2;
        cin >> str2;
        int x2[27] = {};
        for (int j = 0; j < 27; ++j){
            x2[str2[j]-'a']++;
        }
        for (int j = 0; j < 27; ++j){
            x[j] = min(x[j], x2[j]);
        }
    }

    //出力
    for (int i = 0; i < 27; ++i){
        for (int j = 0; j < x[i]; ++j){
            cout << (char)('a'+i);
        }
    }
    cout << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> n;
      |     ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <algorithm>
  +++ |+#include <iostream>
    4 | 
a.cc:35:13: error: 'cout' was not declared in this scope
   35 |             cout << (char)('a'+i);
      |             ^~~~
a.cc:35:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:38:5: error: 'cout' was not declared in this scope
   38 |     cout << endl;
      |     ^~~~
a.cc:38:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:38:13: error: 'endl' was not declared in this scope
   38 |     cout << endl;
      |             ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include <algorithm>
  +++ |+#include <ostream>
    4 |
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;

int main()
{
    int n;

    cin >> n;
    string buf, ans;
    map<char, int> word_map, tmp_map;
    cin >> buf;
    map<char, int>::iterator it;

    for (int i = 0; i < buf.size(); i++)
    {
        word_map[buf[i]]++;
    }

    for (int i = 1; i < n; i++)
    {
        cin >> buf;
        for (int j = 0; j < buf.size(); j++)
        {
            tmp_map[buf[j]]++;
        }
        for(it = word_map.begin(); it!=word_map.end(); it++ ) {
            if (word[it->first] > tmp[it->first])
                word_map[it-first] = tmp[it-first];
        }
    }
    //cout << "OK" << endl;
    //map<char, int>::iterator it;
    for(it = word_map.begin(); it!=word_map.end(); it++ ) {
      for(int i = 0; i < it->second; i++)
        cout << it->first;
    }
    cout << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'word' was not declared in this scope
   30 |             if (word[it->first] > tmp[it->first])
      |                 ^~~~
a.cc:30:35: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   30 |             if (word[it->first] > tmp[it->first])
      |                                   ^~~
      |                                   tm
a.cc:31:29: error: 'first' was not declared in this scope
   31 |                 word_map[it-first] = tmp[it-first];
      |                             ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <map>
using namespace std;

int main()
{
    int n;

    cin >> n;
    string buf, ans;
    map<char, int> word_map, tmp_map;
    cin >> buf;
    for (int i = 0; i < buf.size(); i++)
    {
        word_map[buf[i]]++;
    }

    for (int i = 1; i < n; i++)
    {
        cin >> buf;
        for (int j = 0; j < buf.size(); j++)
        {
            tmp_map[buf[j]]++;
        }
        for(it = word_map.begin(); it!=word_map.end(); it++ ) {
            if (word[it->first] > tmp[it->first])
                word_map[it-first] = tmp[it-first];
        }
    }
    //cout << "OK" << endl;
    //map<char, int>::iterator it;
    map<char, int>::iterator it;
    for(it = word_map.begin(); it!=word_map.end(); it++ ) {
      for(int i = 0; i < it->second; i++)
        cout << it->first;
    }
    cout << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: 'it' was not declared in this scope; did you mean 'i'?
   27 |         for(it = word_map.begin(); it!=word_map.end(); it++ ) {
      |             ^~
      |             i
a.cc:28:17: error: 'word' was not declared in this scope
   28 |             if (word[it->first] > tmp[it->first])
      |                 ^~~~
a.cc:28:35: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   28 |             if (word[it->first] > tmp[it->first])
      |                                   ^~~
      |                                   tm
a.cc:29:29: error: 'first' was not declared in this scope
   29 |                 word_map[it-first] = tmp[it-first];
      |                             ^~~~~
Language: C

abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz

Compiler output:
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
    1 | abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;

int main()
{
	int i,j,k,n;
	string S[50];
	char T[100],Temp1[100];
	string Temp;
	char A[1000]={};

	cin >> n;

	j=0;
	for(i=0;i<n;i++){
		cin >> T;
		sort(T,T+strlen(T));
		S[i]=T;
	}

	Temp=S[0];
	int l=0;
	for(i=1;i<n;i++){
		j=0;k=0;l=0;
		while((Temp[k]!=0)&&(S[i][j]!=0))
		if(S[i][j]==Temp[k]){
			j++;k++;
			Temp1[l]=S[i][j];
			l++;
		}else if(Temp[k]>S[i][j]){
			j++;
		}else if(Temp[k]<S[i][j]){
			k++;
		}
		Temp=Temp1;
	}


	cout << Temp;
	cin >> n;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:26: error: 'strlen' was not declared in this scope
   22 |                 sort(T,T+strlen(T));
      |                          ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <vector>
  +++ |+#include <cstring>
    5 | #include <string>
Language: C++

#include<stdio.h>
#include<string.h>
main(){
	int l,n,i,j;
	char  b[100],a[100];
	int x[200]={0},h[200]={0};
	scanf("%d",&n);
	getchar();
	gets(a);
	n--;
		for(i=0;i<strlen(a);i++)
		h[a[i]]+=1;
	while(n--){
		gets(b);
  for(i=0;i<strlen(b);i++)
	{
	   x[b[i]]+=1;
	}
   for(i=0;i<strlen(a);i++) 
   {
   	if (x[a[i]]==0&&h[a[i]]!=0) h[a[i]]=0; 
	} 
	memset(x,0,sizeof(x));
}
 for(i=0;i<26;i++){
 
   if (h['a'+i]!=0) 
     for(j=1;j<=h['a'+i];j++)
     {
     	printf("%c",'a'+i);
	 }
}
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

#include <bits/stdc++.h>

using namespace std;

constexpr int mod = 1e9 + 7;

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> x(n), y(m);
  for (int i=0; i<n; ++i) cin >> x.at(i);
  for (int i=0; i<m; ++i) cin >> y.at(i);
  cout << ((((x.back() - x.front()) % mod) * ((y.back() - y.front()) % mod)) % mod) * ((n-1) * (m-1) % mod)) % mod << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:108: error: expected ';' before ')' token
   13 |   cout << ((((x.back() - x.front()) % mod) * ((y.back() - y.front()) % mod)) % mod) * ((n-1) * (m-1) % mod)) % mod << endl;
      |                                                                                                            ^
      |                                                                                                            ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
static const int64_t mod=1000000007;
int main(){
int N,M;
  cin>>N>>M;
  vector<int64_t>x(N);
  for(int i=0;i<N;i++)
    cin>>x.at(i);
  vector<int64_t>y(M);
  for(int i=0;i<M;i++)
    cin>>y.at(i);
  int64_t X=0;
  for(int i=0;i<N;i++){
  int64_t k=(mod+2*i-N+1)%mod;
    k=(k*X.at(i))%mod;
    X=(X+k)%mod;
  } int64_t Y=0;
  for(int i=0;i<M;i++){
  int64_t k=(mod+2*i-M+1)%mod;
    k=(k*Y.at(i))%mod;
    Y=(X+k)%mod;
  }int64_t ans=(X*Y)%mod;
  cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: request for member 'at' in 'X', which is of non-class type 'int64_t' {aka 'long int'}
   16 |     k=(k*X.at(i))%mod;
      |            ^~
a.cc:21:12: error: request for member 'at' in 'Y', which is of non-class type 'int64_t' {aka 'long int'}
   21 |     k=(k*Y.at(i))%mod;
      |            ^~
Language: C++

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
    

fac = [-1] * (10**7+1)
inv = [-1] * (10**7+1)
finv = [-1] * (10**7+1)

fac[0] = fac[1] = 1
inv[1] = 1
finv[0] = finv[1] = 1

def main():
    n, m = LI()
    x = sorted(LI())
    y = sorted(LI())
    ans = 0
    for i in range(len(x)):
        k = i + 1
        ans += (k - 1 - n + k) * x[i]
    ysum = 0
    for j in range(len(y)):
        k = j + 1
        ysum += (k - 1 - m + k) * y[j]
    ans *= ysum
    ans %= mod
    print(ans)

main()



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int n, m;

const long long MOD = 1000000007;

long long C(long long a) {
    return a * (a - 1) / 2;
}

int main() {
   cin >> n >> m;
  
        long long ansn = 0;
        long long resn = 0; cin >> resn;
        for (int i = 0; i < n-1; ++i) {
            long long tmp = C(n) - C(i+1) - C(n-1-i);
            long long x; cin >> x;
            ansn += (x - resn) * tmp % MOD;
            ansn %= MOD;
            resn = x;
        }
        long long ansm = 0;
      
        long long resm = 0; cin >> resm;
      
        for (int i = 0; i < m-1; ++i) {
          
            long long tmp = C(m) - C(i+1) - C(m-1-i);
            long long y; cin >> y;
            ansm += (y - resm) * tmp % MOD;
            ansm %= MOD;
            resm = y;
        }
        cout << (ansn * ansm) % MOD << endl;
    }
}




Compiler output:
a.cc:40:1: error: expected declaration before '}' token
   40 | }
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(){
    int mod=10^9+7;
    int n,m;
    int xi[2]={0,0};
    int yi[2]={0,0};
    int xf=0,yf=0;
    std::cin>>n>>m;
    while(cin>>l){
        xi[xf]=l;
        xf=1;
    }
    while(cin>>l){
        yi[yf]=l;
        yf=1;
    }
    return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'l' was not declared in this scope
   10 |     while(cin>>l){
      |                ^
a.cc:14:16: error: 'l' was not declared in this scope
   14 |     while(cin>>l){
      |                ^
a.cc:18:32: error: expected primary-expression before ')' token
   18 |     return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
      |                                ^
a.cc:18:89: error: expected ')' before ';' token
   18 |     return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
      |            ~                                                                            ^
      |                                                                                         )
Language: C++

#include <iostream>
int main(){
    int mod=10^9+7;
    int n,m;
    int xi[2]={0,0};
    int yi[2]={0,0};
    int xf=0,yf=0;
    std::cin>>n>>m;
    while(cin>>l){
        xi[xf]=l;
        xf=1;
    }
    while(cin>>l){
        yi[yf]=l;
        yf=1;
    }
    return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     while(cin>>l){
      |           ^~~
      |           std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:16: error: 'l' was not declared in this scope
    9 |     while(cin>>l){
      |                ^
a.cc:13:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   13 |     while(cin>>l){
      |           ^~~
      |           std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:16: error: 'l' was not declared in this scope
   13 |     while(cin>>l){
      |                ^
a.cc:17:32: error: expected primary-expression before ')' token
   17 |     return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
      |                                ^
a.cc:17:89: error: expected ')' before ';' token
   17 |     return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
      |            ~                                                                            ^
      |                                                                                         )
Language: C++

#include <iostream>
int main(){
    int mod=10^9+7;
    int n,m;
    int xi[2]={0,0};
    int yi[2]={0,0};
    int xf,yf=0,0;
    std::cin>>n>>m;
    while(cin>>l){
        xi[xf]=l;
        xf=1;
    }
    while(cin>>l){
        yi[yf]=l;
        yf=1;
    }
    return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected unqualified-id before numeric constant
    7 |     int xf,yf=0,0;
      |                 ^
a.cc:9:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     while(cin>>l){
      |           ^~~
      |           std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:16: error: 'l' was not declared in this scope
    9 |     while(cin>>l){
      |                ^
a.cc:13:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   13 |     while(cin>>l){
      |           ^~~
      |           std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:16: error: 'l' was not declared in this scope
   13 |     while(cin>>l){
      |                ^
a.cc:17:32: error: expected primary-expression before ')' token
   17 |     return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
      |                                ^
a.cc:17:89: error: expected ')' before ';' token
   17 |     return ((((n-1)%mod)*((m-1%)%mod)%mod)*(((yi[1]-yi[0])%mod)*((xi[1]-xi[0])%mod)%mod);
      |            ~                                                                            ^
      |                                                                                         )
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
ll modpow(ll a, ll p) {
    if(p == 0)
        return 1;
    if(p % 2 == 0) {
        ll halfp = p / 2;
        ll half = modpow(a, halfp);
        return half * half % MOD;
    } else {
        return a * modpow(a, p - 1) % MOD;
    }
}

int main() {
    ll n, m;
    cin >> n >> m;
    //したから
    vector<ll> x(n);
    REP(i, n) { cin >> x[i]; }
    //左から
    vector<ll> y(m);
    REP(i, m) { cin >> y[i]; }
    ll x_sum = 0;
    ll y_sum = 0;
    for(int i = 0; i < n; i++) {
        for(int j = i + 1; j < n; j++) {
            ll x_sum += (x[j] - x[i]) % MOD;
        }
    }
    for(int k = 0; k < m; k++) {
        for(int l = k + 1; l < m; l++) {
            ll y_sum += (y[l] - y[k]) % MOD;
        }
    }
    area += x_sum * y_sum % MOD;
    cout << area % MOD << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:22: error: expected initializer before '+=' token
   58 |             ll x_sum += (x[j] - x[i]) % MOD;
      |                      ^~
a.cc:63:22: error: expected initializer before '+=' token
   63 |             ll y_sum += (y[l] - y[k]) % MOD;
      |                      ^~
a.cc:66:5: error: 'area' was not declared in this scope
   66 |     area += x_sum * y_sum % MOD;
      |     ^~~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>
#include<algorithm>
#include<vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define int64 long long
#define yokuwaruprime (10*10*10*10*10*10*10*10*10+7)
using namespace std;

int main(){
  int n,m
  cin>>n>>m;
  int64 x[n],y[m];
  rep(i,n){
    cin>>x[i];
  }
  rep(i,m){
    cin>>y[i];
  }
  int64 bigX=0,bigY=0;
  rep(i,n){
    bigX+=(2*i-n+1)*x[i];
    bigX%=yokuwaruprime;
  }
  rep(i,m){
    bigY+=(2*i-m+1)*y[i];
    bigY%=yokuwaruprime;
  }
  cout<<(bigX*bigY)%yokuwaruprime<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected initializer before 'cin'
   15 |   cin>>n>>m;
      |   ^~~
a.cc:16:16: error: 'm' was not declared in this scope
   16 |   int64 x[n],y[m];
      |                ^
a.cc:21:10: error: 'y' was not declared in this scope
   21 |     cin>>y[i];
      |          ^
a.cc:29:21: error: 'y' was not declared in this scope
   29 |     bigY+=(2*i-m+1)*y[i];
      |                     ^
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<string>
#include<algorithm>
#include<vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define int64 long long
#define yokuwaruprime (10*10*10*10*10*10*10*10*10+7)
using namespace std;

int main(){
  int n,m
  cin>>n>>m;
  int64 x[n],y[m];
  rep(i,n){
    cin>>x[i];
  }
  rep(i,m){
    cin>>y[i];
  }
  int64 bigX,bigY;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected initializer before 'cin'
   15 |   cin>>n>>m;
      |   ^~~
a.cc:16:16: error: 'm' was not declared in this scope
   16 |   int64 x[n],y[m];
      |                ^
a.cc:21:10: error: 'y' was not declared in this scope
   21 |     cin>>y[i];
      |          ^
Language: Java

import java.util.Scanner;
import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		long[] x=new long[n];
		long[] y=new long[m];
		long mod=1000000007;
		for(int i = 0; i<n; i++){
			x[i]= sc.nextLong();
		}
		for(int i=0; i<m; i++){
			y[i]= sc.nextLong();
		}
		Arrays.sort(x);
		Arrays.sort(y);
		long xsum=0;
		long ysum=0;
		for(long i = 0; i<n; i++){
			xsum+=((x[i]*i)%mod)-((x[i]*(n-1-i))%mod);
			xsum%=mod;
		}
		for(long i = 0; i<m; i++){
			ysum+=((y[i]*i)%mod)-((y[i]*(m-1-i))%mod);
			ysum%=mod;
		}
		System.out.println((xsum*ysum)%mod);
	}
}


Compiler output:
Main.java:22: error: incompatible types: possible lossy conversion from long to int
			xsum+=((x[i]*i)%mod)-((x[i]*(n-1-i))%mod);
			          ^
Main.java:22: error: incompatible types: possible lossy conversion from long to int
			xsum+=((x[i]*i)%mod)-((x[i]*(n-1-i))%mod);
			                         ^
Main.java:26: error: incompatible types: possible lossy conversion from long to int
			ysum+=((y[i]*i)%mod)-((y[i]*(m-1-i))%mod);
			          ^
Main.java:26: error: incompatible types: possible lossy conversion from long to int
			ysum+=((y[i]*i)%mod)-((y[i]*(m-1-i))%mod);
			                         ^
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.StringTokenizer;

public class D58 {
	public static void main(String[] args) {
		SC sc=new SC(System.in);

		int W=sc.nextInt();
		for(long i=0; i<W-1; i++) {
			//pl((i+1)*(W-1-i));
			//pl(2 * i - W + 1);
		}
		int H=sc.nextInt();
		long sum=0;
		long MOD=1000000007;
		long[] X=new long[W];
		long[] Y=new long[H];
		for(int i=0; i<W; i++) {
			X[i]=sc.nextLong();
		}
		for(int i=0; i<H; i++) {
			Y[i]=sc.nextLong();
		}
		long xsum=0;
		long ysum=0;
		for(int i=0; i<W; i++) {
			xsum+=(2*i+1-W)*X[i];
			xsum%=MOD;
		}
		for(int i=0; i<H; i++) {
			xsum+=(2*i+1-H)*Y[i];
			xsum%=MOD;
		}
		pl((xsum*ysum)%MOD);
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
}


Compiler output:
Main.java:8: error: class D58 is public, should be declared in a file named D58.java
public class D58 {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll n,m;
cin>>n>>m;
ll x=0,y=0,aj=n*(-1)+1;
for(int i=0;i<n;i++){
cin>>a;
x+=a*j;
j+=2;
}
x%=1000000007;
j=m*(-1)+1;
for(int i=0;i<m;i++){
cin>>a;
y+=a*j;
j+=2;
}
y%=1000000007;
cout<<x*y%1000000007;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'a' was not declared in this scope
    9 | cin>>a;
      |      ^
a.cc:10:6: error: 'j' was not declared in this scope
   10 | x+=a*j;
      |      ^
a.cc:14:1: error: 'j' was not declared in this scope; did you mean 'aj'?
   14 | j=m*(-1)+1;
      | ^
      | aj
a.cc:16:6: error: 'a' was not declared in this scope
   16 | cin>>a;
      |      ^
Language: Java

import java.util.*;

class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] a = new long[n];
        long[] x = new long[n];
        long[] b = new long[m];
        long[] y = new long[m];
        long MOD = (long) (Math.pow(10, 9) + 7);

        a[0] = sc.nextLong();
        for(int i = 1; i < n; i++){
            a[i] = sc.nextLong();
            x[i] = a[i] - a[i-1];
            x[i] %= MOD;
        }

        b[0] = sc.nextLong();
        for(int i = 1; i < m; i++){
            b[i] = sc.nextLong();
            y[i] = b[i] - b[i-1];
            y[i] %= MOD;
        }

        long ans = 0;

/*        long x_sum = 0;

        for(int i = 1; i < n; i++){
            long xx = (n - i) * ( i );    
            xx %= MOD;
            x[i] *= xx;
            x[i] %= MOD;
            x_sum += x[i];
            x_sum %= MOD;
        }

        long y_sum = 0;

        for(int i = 1; i < m; i++){
            long yy = (m - i) * ( i );    
            yy %= MOD;
            y[i] *= yy;
            y[i] %= MOD;
            y_sum += y[i];
            y_sum %= MOD;
        }*/

        long a_sum = 0;
        for(int i = 0; i < n; i++){
            a_sum += ( i * 2 - n + 1 ) * a[i];
            a_sum %= MOD;
        }

        long b_sum = 0;
        for(int i = 0; i < m; i++){
            b_sum +=  i * 2 - m + 1 ) * b[i];
            b_sum %= MOD;
        }

 //       ans = x_sum * y_sum;
        ans = a_sum * b_sum;
        ans %= MOD;
        System.out.println(ans);
    }
}

Compiler output:
Main.java:62: error: ';' expected
            b_sum +=  i * 2 - m + 1 ) * b[i];
                                   ^
Main.java:62: error: not a statement
            b_sum +=  i * 2 - m + 1 ) * b[i];
                                         ^
2 errors
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
long long n,m,x[100001],y[100001];
int main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++) cin>>x[i];
	for(int j=1;j<=m;j++) cin>>y[i];
	long long h=0,w=0;
	for(int l=1,r=n;l<r;++l,--r) w=(w+(x[r]-x[l])*(r-l)%mod)%mod;
	for(int i=1,r=m;l<r;++l,--r) h=(h+(y[r]-y[l])*(r-l)%mod)%mod;
	cout<<h*w%mod;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:38: error: 'i' was not declared in this scope
    9 |         for(int j=1;j<=m;j++) cin>>y[i];
      |                                      ^
a.cc:11:61: error: 'mod' was not declared in this scope
   11 |         for(int l=1,r=n;l<r;++l,--r) w=(w+(x[r]-x[l])*(r-l)%mod)%mod;
      |                                                             ^~~
a.cc:12:25: error: 'l' was not declared in this scope
   12 |         for(int i=1,r=m;l<r;++l,--r) h=(h+(y[r]-y[l])*(r-l)%mod)%mod;
      |                         ^
a.cc:12:61: error: 'mod' was not declared in this scope
   12 |         for(int i=1,r=m;l<r;++l,--r) h=(h+(y[r]-y[l])*(r-l)%mod)%mod;
      |                                                             ^~~
a.cc:13:19: error: 'mod' was not declared in this scope
   13 |         cout<<h*w%mod;
      |                   ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <climits>
#include <algorithm>
#include <set>
#include <unordered_map>
#include <queue>
#include <iomanip>
#include <map>

#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define ll long long
#define P pair<int, int>

using namespace std;
int mod = 1000000007;

ll n, m;
int main() {
  cin >> n >> m;

  vector<ll> x(n);
  vector<ll> y(m);
  rep(i, n) {
    cin >> x.at(i);
  }
  rep(i, m) {
    cin >> y.at(i);
  }

  n--;
  m--;
  ll sumx = 0;
  ll sumy = 0;
  for(ll i=0; i<n; i++) {
    ll mul = ((n-i)*(i+1))%mod;
    sumx += (x.at(i+1)-x.at(i)*mul%mod;
    sumx %= mod;
  }
  for(ll i=0; i<m; i++) {
    ll mul = ((m-i)*(i+1))%mod;
    sumy += (y.at(i+1)-y.at(i))*mul%mod;
    sumy %= mod;
  }
  cout << (sumx*sumy)%mod << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:39: error: expected ')' before ';' token
   38 |     sumx += (x.at(i+1)-x.at(i)*mul%mod;
      |             ~                         ^
      |                                       )
Language: C

#include <stdio.h>

int main(void)
{
    int n,m;
    scanf("%d %d",&n,&m);
    
    int x[n],y[m];
    int i;
    for(i=0;i<n;i++){
        scanf("%d",&x[i]);
    }
    for(i=0;i<m;i++){
        scanf("%d",&y[i]);
    }
    
    int s=0,t=0;
    for(i=0;i<n;i++){
        s = s+(2*i-n+1)*x[i];
    }
    for(i=0;i<m;i++){
        t = t+(2*i-m+1)*y[i];
    }
    s=s%1000000007;
    t=t%1000000007;
    int u;
    u=(s*t)%1000000007;
        printf("%d",u);
    return 0;
   

Compiler output:
main.c: In function 'main':
main.c:29:5: error: expected declaration or statement at end of input
   29 |     return 0;
      |     ^~~~~~
Language: C

int main(void)
{
    int n,m;
    scanf("%d %d",&n,&m);
    
    int x[n],y[m];
    int i;
    for(i=0;i<n;i++){
        scanf("%d",&x[i]);
    }
    for(i=0;i<m;i++){
        scanf("%d",&y[i]);
    }
    
    int s=0,t=0;
    for(i=0;i<n;i++){
        s = s+(2*i-n+1)*x[i];
    }
    for(i=0;i<m;i++){
        t = t+(2*i-m+1)*y[i];
    }
    int u;
    u=(s*t)%1000000007
        printf("%d",u);
    return 0;
   
}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |     scanf("%d %d",&n,&m);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |     scanf("%d %d",&n,&m);
      |     ^~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:23:23: error: expected ';' before 'printf'
   23 |     u=(s*t)%1000000007
      |                       ^
      |                       ;
   24 |         printf("%d",u);
      |         ~~~~~~
Language: Java

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define rrep(i,n) for(int i=n-1; i>=0; i--)

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef long double lb;

const int INF=1<<27;
const int MOD=(int)1e9+7;

int main(void)
{
    int n, m;
    ll x[100010];
    ll y[100010];
    cin >> n >> m;
    rep(i,n) cin >> x[i];
    rep(i,m) cin >> y[i];
    ll sum_x = 0;
    ll sum_y = 0;
    rep(i,n){
        sum_x += (2*(i+1) - n - 1) * x[i];
        sum_x %= MOD;
    }
    rep(i,m){
        sum_y += (2*(i+1) - m - 1) * y[i];
        sum_y %= MOD;
    }
    ll ans = (sum_x * sum_y) % MOD;
    cout << ans << endl;
    return 0;
}



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:2: error: illegal character: '#'
#define rep(i,n) for(int i=0; i<n; i++)
^
Main.java:2: error: class, interface, enum, or record expected
#define rep(i,n) for(int i=0; i<n; i++)
                              ^
Main.java:2: error: class, interface, enum, or record expected
#define rep(i,n) for(int i=0; i<n; i++)
                                   ^
Main.java:3: error: illegal character: '#'
#define rrep(i,n) for(int i=n-1; i>=0; i--)
^
Main.java:3: error: class, interface, enum, or record expected
#define rrep(i,n) for(int i=n-1; i>=0; i--)
                                 ^
Main.java:3: error: class, interface, enum, or record expected
#define rrep(i,n) for(int i=n-1; i>=0; i--)
                                       ^
Main.java:7: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:8: error: class, interface, enum, or record expected
typedef vector<int> vi;
^
Main.java:9: error: class, interface, enum, or record expected
typedef pair<int,int> pi;
^
Main.java:10: error: class, interface, enum, or record expected
typedef long double lb;
^
Main.java:12: error: class, interface, enum, or record expected
const int INF=1<<27;
^
Main.java:13: error: class, interface, enum, or record expected
const int MOD=(int)1e9+7;
^
Main.java:20: error: not a statement
    cin >> n >> m;
             ^
Main.java:21: error: not a statement
    rep(i,n) cin >> x[i];
                 ^
Main.java:22: error: not a statement
    rep(i,m) cin >> y[i];
                 ^
Main.java:34: error: not a statement
    cout << ans << endl;
                ^
Main.java:15: error: unnamed classes are a preview feature and are disabled by default.
int main(void)
^
  (use --enable-preview to enable unnamed classes)
Main.java:15: error: <identifier> expected
int main(void)
             ^
Main.java:18: error: ']' expected
    ll x[100010];
         ^
Main.java:19: error: ']' expected
    ll y[100010];
         ^
Main.java:21: error: ';' expected
    rep(i,n) cin >> x[i];
            ^
Main.java:22: error: ';' expected
    rep(i,m) cin >> y[i];
            ^
Main.java:25: error: ';' expected
    rep(i,n){
            ^
Main.java:29: error: ';' expected
    rep(i,m){
            ^
26 errors
Language: Java

import java.util.*;
public class D {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        long[] x = new long[n];
        long[] y = new long[m];

        for(int i = 0; i < n; i++) {
            x[i] = sc.nextLong();
        }
        for(int j = 0; j < m; j++) {
            y[j] = sc.nextLong();
        }

        long widthSum = 0, heightSum = 0;
        for(int i = 0; i < n; i++) {
            widthSum += i * x[i] - (n - 1 - i) * x[i]; 
        }
        for(int j = 0; j < m; j++) {
            heightSum += j * y[j] - (m - 1 - j) * y[j];
        }

        long res = (widthSum * heightSum) % (1000000000 + 7);
        System.out.println(res);
    }
}


Compiler output:
Main.java:2: error: class D is public, should be declared in a file named D.java
public class D {
       ^
1 error
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long MOD = 1000000007;
    long n = sc.nextLong();
    long m = sc.nextLong();
    long[] x = new long[n];
    long[] y = new long[m];
    for(int i = 0; i < n; i++) {
      x[i] = sc.nextLong();
    }
    for(int i = 0; i < m; i++) {
      y[i] = sc.nextLong();
    }
    long prod1 = 0;
    long prod2 = 0;
    for(int i = 1; i <= n; i++) {
      prod1 = (prod1 + ((2 * i - n - 1) * x[i - 1])) % MOD;
    }
    for(int i = 1; i <= m; i++) {
      prod2 = (prod2 + ((2 * i - m - 1) * y[i - 1])) % MOD;
    }
    System.out.println((prod1 * prod2) % MOD);
  }
}

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from long to int
    long[] x = new long[n];
                        ^
Main.java:10: error: incompatible types: possible lossy conversion from long to int
    long[] y = new long[m];
                        ^
2 errors
Language: C

#include <stdio.h>

typedef long long ll;

int main(void)
{
  ll int n,m;
  scanf("%lld %lld",&n,&m);
  ll int i,j,xtotal=0,ytotal=0;
  ll int x[n],y[m];
  for (i=0;i<n;i++) {
    scanf("%lld",&x[i]);
    xtotal += (i-1)*x[i] + (n-i)*x[i]);
  }
  for (i=0;i<m;i++) {
    scanf("%lld",&y[i]);
    ytotal += (i-1)*y[i] + (n-i)*y[i]);
  }

  xtotal = xtotal*ytotal;
  printf("%lld\n",xtotal%(1000000000+7));
}


Compiler output:
main.c: In function 'main':
main.c:7:6: error: two or more data types in declaration specifiers
    7 |   ll int n,m;
      |      ^~~
main.c:9:6: error: two or more data types in declaration specifiers
    9 |   ll int i,j,xtotal=0,ytotal=0;
      |      ^~~
main.c:10:6: error: two or more data types in declaration specifiers
   10 |   ll int x[n],y[m];
      |      ^~~
main.c:13:38: error: expected ';' before ')' token
   13 |     xtotal += (i-1)*x[i] + (n-i)*x[i]);
      |                                      ^
      |                                      ;
main.c:13:38: error: expected statement before ')' token
main.c:17:38: error: expected ';' before ')' token
   17 |     ytotal += (i-1)*y[i] + (n-i)*y[i]);
      |                                      ^
      |                                      ;
main.c:17:38: error: expected statement before ')' token
Language: C++

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

#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)

const int mod = 1e9+7;

int n,m;
int x[1000100],y[1000100];

int powmod(int n,int p,int m){
  if(p==0)return 1;
  if(p%2==0){
    int t=powmod(n,p/2,m);
    return t*t%m;
  }
  return n*powmod(n,p-1,m);
}
int ans;
int memo[3000000000];
int memo2[3000000000];
signed main(){
  cin>>n>>m;
  rep(i,n){
    cin>>x[i];
  }
  rep(i,m){
    cin>>y[i];
  }

  int tmp=0;
  int tmp2=0;

  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){

      memo[tmp++]=(x[j]-x[i])%mod;

    }
  }

  for(int k=0;k<m-1;k++){
    for(int l=k+1;l<m;l++){
      memo2[tmp2++]=(y[l]-y[k])%mod;
    }
  }

  for(int i=0;i<tmp;i++){
    for(int j=0;j<tmp2;j++){
      ans+=(memo[i]*memo2[j])%mod;
    }
  }
  cout<<ans%mod<<endl;

}


Compiler output:
/tmp/cc6AmtsX.o: in function `main':
a.cc:(.text+0x2c4): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/cc6AmtsX.o
a.cc:(.text+0x339): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/cc6AmtsX.o
collect2: error: ld returned 1 exit status