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

#include <iostream>
usign namespace std;

int main()
{

  	int a, b; cin >> a >> b;

  	a = ((a-1)*a)/2;
  	b = ((b-1)*b)/2;
  
	cout << a + b;
	return 0;
}

Compiler output:
a.cc:2:1: error: 'usign' does not name a type
    2 | usign namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:7:19: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         int a, b; cin >> a >> b;
      |                   ^~~
      |                   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:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |         cout << a + b;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main(){
 long long double L ;
  cin >> L ;
  cout << pow((L/3),3) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'long long' specified with 'double'
    5 |  long long double L ;
      |       ^~~~
Language: Java

java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt(); //偶数の個数
    int M = sc.nextInt(); //奇数の個数
    //偶数になるのは奇数+奇数もしくは偶数+偶数
    //奇数+奇数の場合N_C_2
    int count_1 = N*(N-1)/2;
    //偶数+偶数の場合M_C_2
    int count_2 = M*(M-1)/2;
    
    System.out.println( count_1 + count_2);
    
    
  }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
java.util.*;
^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
   int nn,nm;
   cin>>nn>>nm;
   cout<<(mm*(mm-1)/2+nn*(nn-1)/2)<<endl;;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'mm' was not declared in this scope; did you mean 'nm'?
    7 |    cout<<(mm*(mm-1)/2+nn*(nn-1)/2)<<endl;;
      |           ^~
      |           nm
Language: C++

#include <iostream>
using namespace std;
longlong temp=1;
long long factorial( int n){
  temp=1;
  for (int i=1;i<=n;i++)
  {
  	temp=temp*i;
  }
  return temp;
}
int main(){
  int n1,n2;
  cin >>n1>>n2;
  long long f1=factorial(n1)/(2*factorial(n1-2));
  long long f2=factorial(n2)/(2*factorial(n2-2));
  cout <<f1+f2;
                        
 
}

Compiler output:
a.cc:3:1: error: 'longlong' does not name a type
    3 | longlong temp=1;
      | ^~~~~~~~
a.cc: In function 'long long int factorial(int)':
a.cc:5:3: error: 'temp' was not declared in this scope; did you mean 'tm'?
    5 |   temp=1;
      |   ^~~~
      |   tm
Language: C++

#include <iostream>
using namespace std;
int temp=1;
int factorial( int n){
  temp=1;
  for (int i=1;i<=n;i++)
  {
  	temp=temp*i;
  }
  return temp;
}
int main(){
  int n1,n2;
  cin n1>>n2;
  int f1=factorial(n1)/(2*factorial(n1-2);
  int f2=factorial(n2)/(2*factorial(n2-2);
  cout <<f1+f2;
                        
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected ';' before 'n1'
   14 |   cin n1>>n2;
      |      ^~~
      |      ;
a.cc:15:42: error: expected ')' before ';' token
   15 |   int f1=factorial(n1)/(2*factorial(n1-2);
      |                        ~                 ^
      |                                          )
a.cc:16:42: error: expected ')' before ';' token
   16 |   int f2=factorial(n2)/(2*factorial(n2-2);
      |                        ~                 ^
      |                                          )
Language: C++

#include <iostream>
using namespace std;
int temp=1;
int factorial( int n){
  temp=1;
  for (int i=1;i<=n;i++)
  {
  	temp=temp*i;
  }
  returen temp;
}
int main(){
  int n1,n2;
  cin n1>>n2;
  int f1=factorial(n1)/(2*factorial(n1-2);
  int f2=factorial(n2)/(2*factorial(n2-2);
  cout <<f1+f2;
                        

}

Compiler output:
a.cc: In function 'int factorial(int)':
a.cc:10:3: error: 'returen' was not declared in this scope
   10 |   returen temp;
      |   ^~~~~~~
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
a.cc: In function 'int main()':
a.cc:14:6: error: expected ';' before 'n1'
   14 |   cin n1>>n2;
      |      ^~~
      |      ;
a.cc:15:42: error: expected ')' before ';' token
   15 |   int f1=factorial(n1)/(2*factorial(n1-2);
      |                        ~                 ^
      |                                          )
a.cc:16:42: error: expected ')' before ';' token
   16 |   int f2=factorial(n2)/(2*factorial(n2-2);
      |                        ~                 ^
      |                                          )
Language: C++

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

int main(){
  int N, M;
  cin >> N >> M;
  
  int ans = N(N-1)/2 + M(M-1)/2;
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'N' cannot be used as a function
    8 |   int ans = N(N-1)/2 + M(M-1)/2;
      |             ~^~~~~
a.cc:8:25: error: 'M' cannot be used as a function
    8 |   int ans = N(N-1)/2 + M(M-1)/2;
      |                        ~^~~~~
Language: C++

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

int main(){
  int N, M;
  cin >> N >> M;
  
  int ans = N(N-1)/2 + M(M-1)/2
  
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'N' cannot be used as a function
    8 |   int ans = N(N-1)/2 + M(M-1)/2
      |             ~^~~~~
a.cc:8:25: error: 'M' cannot be used as a function
    8 |   int ans = N(N-1)/2 + M(M-1)/2
      |                        ~^~~~~
Language: C++

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

int main(){
  int N, M;
  cin >> N >> M;
  
  cout << N(N-1)/2 + M(M-1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'N' cannot be used as a function
    8 |   cout << N(N-1)/2 + M(M-1)/2 << endl;
      |           ~^~~~~
a.cc:8:23: error: 'M' cannot be used as a function
    8 |   cout << N(N-1)/2 + M(M-1)/2 << endl;
      |                      ~^~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#define rep(i,n) for(int i=0;, i < n; i++)
using namespace std;
using ln = long long;

int main()
{
    ln n,m,sum=0;
    cin >> n >> m;



    for(int i=n-1;i>;i--)
        sum += i; 

    for(int i=m-1;i>0;i--)
       sum += i;

    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: expected primary-expression before ';' token
   15 |     for(int i=n-1;i>;i--)
      |                     ^
Language: C++

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

int main() {
  int n, m;
  cin n >> m;
  cout << n*max(0, n-1)/2 + m*max(0, m-1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'n'
    6 |   cin n >> m;
      |      ^~
      |      ;
Language: Java

import java.util.*;
		public class diamond{
			public static void main(String [] args) {
					Scanner sc = new Scanner(System.in);
					int n = sc.nextInt();
					int m = sc.nextInt();
					int count = combinations(n) + combinations(m);
					System.out.println(count);
			}

			private static int combinations(int n) {
				// TODO Auto-generated method stub
				if(n >= 2) {
					int prod = 1;
					prod = ((n-1)*n)/2;
					return prod;
				}
				return 0;
			}

		 }

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

#include<stdio.h>
int main()
{
    int n,m;
    scanf("%d%d",&n,&m);
    int fact(int);
    n=fact(n)/(fact(n-2)*2);
    m=fact(m)/(fact(m-2)*2);
    printf("%d",(a+b));
    return 0;
}
int fact(int n)
{int f=1;
    for(int i=1;i<=n;i++)
    f=f*i;
    return f;
}

Compiler output:
main.c: In function 'main':
main.c:9:18: error: 'a' undeclared (first use in this function)
    9 |     printf("%d",(a+b));
      |                  ^
main.c:9:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:20: error: 'b' undeclared (first use in this function)
    9 |     printf("%d",(a+b));
      |                    ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  cin >> m >> n;
  cout << n*(n-1)/2 + m*(m-1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 |   cin >> m >> n;
      |          ^
      |          tm
a.cc:5:15: error: 'n' was not declared in this scope
    5 |   cin >> m >> n;
      |               ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  cin >> m >> n;
  cout << n*(n-1)/2 + m*(m-1)/2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 |   cin >> m >> n;
      |          ^
      |          tm
a.cc:5:15: error: 'n' was not declared in this scope
    5 |   cin >> m >> n;
      |               ^
a.cc:6:41: error: expected '}' at end of input
    6 |   cout << n*(n-1)/2 + m*(m-1)/2 << endl;
      |                                         ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define _GLIBCXX_DEBUG
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
const ll INF = 9223372036854775807;

int main() {
  int n,m;cin >> n >> m;
  int Ans = 0;
  Ans += n*(n-1)/2;
  Ans += m*(m-1)/2;
  coun << Ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'coun' was not declared in this scope
   14 |   coun << Ans << endl;
      |   ^~~~
Language: Java

//Atcoder160A 配列の比較
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		 String S = sc.next();
      	 int N=S.length;
      for(int i=0;i<(N-1)/2;i++){
        if(S.charAt(i) == S.charAt(N-1-i)&&S.charAt(i) == S.charAt((N-1)/2-1-i)&&S.charAt(N-i) == S.charAt((N-1)/2+1+i)){
        System.out.println("Yes");}
      	else{
        System.out.println("No");}}
	}
}


Compiler output:
Main.java:8: error: cannot find symbol
      	 int N=S.length;
      	        ^
  symbol:   variable length
  location: variable S of type String
1 error
Language: C++

#Include <bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n>>m;
  int x = ((n-1)*n)/2;
  int y = ((m-1)*m)/2;
  cout<<x+y<<endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #Include; did you mean #include?
    1 | #Include <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>n>>m;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #Include <bits/stdc++.h>
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout<<x+y<<endl;
      |   ^~~~
a.cc:8:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:14: error: 'endl' was not declared in this scope
    8 |   cout<<x+y<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #Include <bits/stdc++.h>
Language: C++

#include <iotsream>
using namespace std;

int xc2(int x){
	if(x<2)
		return 0;
	else return (x*(x-1))/2;
}

int main(){
	int n,m;
	cin>>n>>m;
	cout<<xc2(n)+xc2(m)<<endl;
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: iotsream: No such file or directory
    1 | #include <iotsream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iotsream>

int xc2(int x){
	if(x<2)
		return 0;
	else return (x*(x-1))/2;
}

int main(){
	int n,m;
	cin>>n>>m;
	coout<<xc2(n)+xc2(m)<<endl;
}

Compiler output:
a.cc:1:10: fatal error: iotsream: No such file or directory
    1 | #include <iotsream>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Solution {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {

        solve();
    }

    private static void solve() {

        int n = scanner.nextInt();
        int m = scanner.nextInt();

        int result = (n * (n - 1)) / 2 + m * (m - 1) / 2;

        System.out.println(result);

    }
}

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

import java.util.Scanner;

public class Pairs {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {

        solve();
    }

    private static void solve() {

        int n = scanner.nextInt();
        int m = scanner.nextInt();

        int result = (n * (n - 1)) / 2 + m * (m - 1) / 2;

        System.out.println(result);

    }
}

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,m;
  cin >> n >> m;
  
  m = m/2
    
  cout << n*m << endl;  
  
  return 0;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'cout'
    7 |   m = m/2
      |          ^
      |          ;
    8 | 
    9 |   cout << n*m << endl;
      |   ~~~~
Language: C++

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

int main(){
  int n, m; cin>>n >>m;
  cout<<n(n+1)/2 + m(m+1)/2<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'n' cannot be used as a function
    6 |   cout<<n(n+1)/2 + m(m+1)/2<<endl;
      |         ~^~~~~
a.cc:6:21: error: 'm' cannot be used as a function
    6 |   cout<<n(n+1)/2 + m(m+1)/2<<endl;
      |                    ~^~~~~
Language: C++

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

int main() {
  int N,M;
  cin>>N>>M;
  cout<<N(N-1)/2+M(M-1)/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'N' cannot be used as a function
    7 |   cout<<N(N-1)/2+M(M-1)/2<<endl;
      |         ~^~~~~
a.cc:7:19: error: 'M' cannot be used as a function
    7 |   cout<<N(N-1)/2+M(M-1)/2<<endl;
      |                  ~^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
void Comp(int N, int *a, int *count){
	for(int m = 0; m < N; m++)
		count[a[m]-1]++;
}
double Total(int N, int *a, int *count){
	double ans = 0;
	for(int j=0; j<N; j++)
			ans += (count[j] * (count[j]-1)) / 2;
	return ans;
}
int Except(int count){
	if(count==0)
		return 0;
	else
		return count-1;
}
int main(){
	int N;
	scanf("%d", &N);
	int *a = malloc(sizeof(int) * N);
	int *count = malloc(sizeof(int) * N);
	for(int i=0; i<N; i++){
		scanf("%d", &a[i]);
		count[i] = 0; 
	}
	Comp(N, a, count);
	double total = Total(N, a, count);
	for(int i=0; i<N; i++)
		printf("%d\n", total - Except(count[i]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:56: error: expected ')' before ';' token
   31 |                 printf("%d\n", total - Except(count[i]);
      |                       ~                                ^
      |                                                        )
main.c:32:18: error: expected ';' before '}' token
   32 |         return 0;
      |                  ^
      |                  ;
   33 | }
      | ~
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    
    int N = new Scanner(System.in).nextInt();
    int M = new Scanner(System.in).nextInt();
    
    System.out.println(N*(N-1)/2 + M(M-1)/2 );
    
  }
}

    

Compiler output:
Main.java:9: error: cannot find symbol
    System.out.println(N*(N-1)/2 + M(M-1)/2 );
                                   ^
  symbol:   method M(int)
  location: class Main
1 error
Language: C

#include<stdio.h>
#include<stdlib.h>
void Comp(int N, int *a, int *count){
	for(int m = 0; m < N; m++)
		count[a[m]-1]++;
}
int Ans(int N, int target, int *a){
	int ans = 0;
	for(int j=0; j<N; j++)
		if(j != a[target]-1)
			ans += (count[j] * (count[j]-1)) / 2;
	return ans;
}
int main(){
	int N;
	scanf("%d", &N);
	int *a = malloc(sizeof(int) * N);
	int *count = malloc(sizeof(int) * N);
	for(int i=0; i<N; i++){
		scanf("%d", &a[i]);
		count[i] = 0; 
	}
	Comp(N, a, count);
	for(int j=0; j<N; j++)
		printf("%d\n", Ans(N, j, a));
	return 0;
}

Compiler output:
main.c: In function 'Ans':
main.c:11:33: error: 'count' undeclared (first use in this function)
   11 |                         ans += (count[j] * (count[j]-1)) / 2;
      |                                 ^~~~~
main.c:11:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int iskaibun(int N, char *str){
	char *reverse;
	int count = 0;
	for(int i=0; i < N; i++)
		reverse[i] = str[N-i-1];
	for(int i=0; i < N; i++){
		if(str[i] == reverse[i])
			count++;
	}
	if(count == N)
		return 1;
	else
		return 0;
}
int wordlength(char *str){
	int l = 0;
	while(str[l] != '\0')
		l++;
	return l;
}
int main(){
	char str[];
	scanf("%s", &str);
	char *sub_str1, *sub_str2;
	int len = wordlength(str);
	for(int i=0; i < (len-1)/2; i++)
		sub_str1[i] = str[i];
	for(int i=(len+3)/2-1; i < len; i++)
		sub_str1[i-(len+3)/2-1] = str[i];
	if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:14: error: array size missing in 'str'
   23 |         char str[];
      |              ^~~
main.c:31:21: error: 'N' undeclared (first use in this function)
   31 |         if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
      |                     ^
main.c:31:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int iskaibun(int N, char *str){
	char *reverse;
	int count = 0;
	for(int i=0; i < N; i++)
		reverse[i] = str[N-i-1];
	for(int i=0; i < N; i++){
		if(str[i] == reverse[i])
			count++;
	}
	if(count == N)
		return 1;
	else
		return 0;
}
int wordlength(char *str){
	int l = 0;
	while(str[l] != '0')
		l++;
	return l;
}
int main(){
	char str[];
	scanf("%s", &str);
	char *sub_str1, *sub_str2;
	int len = wordlength(str);
	for(int i=0; i < (len-1)/2; i++)
		sub_str1[i] = str[i];
	for(int i=(len+3)/2-1; i < len; i++)
		sub_str1[i-(len+3)/2-1] = str[i];
	if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:14: error: array size missing in 'str'
   23 |         char str[];
      |              ^~~
main.c:31:21: error: 'N' undeclared (first use in this function)
   31 |         if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
      |                     ^
main.c:31:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int iskaibun(int N, char *str){
	char *reverse;
	int count = 0;
	for(int i=0; i < N; i++)
		reverse[i] = str[N-i-1];
	for(int i=0; i < N; i++){
		if(str[i] == reverse[i])
			count++;
	}
	if(count == N)
		return 1;
	else
		return 0;
}
int wordlength(char *str){
	int l = 0;
	while(str[l] != '0')
		l++;
	return l;
}
int main(){
	char *str;
	scanf("%s", str);
	char *sub_str1, *sub_str2;
	int len = wordlength(str);
	for(int i=0; i < (len-1)/2; i++)
		sub_str1[i] = str[i];
	for(int i=(len+3)/2-1; i < len; i++)
		sub_str1[i-(len+3)/2-1] = str[i];
	if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:21: error: 'N' undeclared (first use in this function)
   31 |         if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
      |                     ^
main.c:31:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int iskaibun(int N, char *str){
	char *reverse;
	int count = 0;
	for(int i=0; i < N; i++)
		reverse[i] = str[N-i-1];
	for(int i=0; i < N; i++){
		if(str[i] == reverse[i])
			count++;
	}
	if(count == N)
		return 1;
	else
		return 0;
}
int wordlength(char *str){
	int i = 0;
	while(str[i] != '0'){
		count++;
		i++;
	}
}
int main(){
	char *str;
	scanf("%s", str);
	char *sub_str1, *sub_str2;
	int len = wordlength(str);
	for(int i=0; i < (len-1)/2; i++)
		sub_str1[i] = str[i];
	for(int i=(len+3)/2-1; i < len; i++)
		sub_str1[i-(len+3)/2-1] = str[i];
	if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
main.c: In function 'wordlength':
main.c:19:17: error: 'count' undeclared (first use in this function)
   19 |                 count++;
      |                 ^~~~~
main.c:19:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:32:21: error: 'N' undeclared (first use in this function)
   32 |         if(iskaibun(N, str)*iskaibun((N-1)/2, sub_str1)*iskaibun((N-1)/2, sub_str2)==1)
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N,M;
  cin >> N >> M;
  cout << N * (N - 1) / 2 + m * (M - 1) / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: 'm' was not declared in this scope
    7 |   cout << N * (N - 1) / 2 + m * (M - 1) / 2 << endl;
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  int a, b, c, d ;
  for (int i = 1; i < N + 1; i++)
    a *= i;
  for (int i = N; i < 0; i--){
    if (N >= 1)
      b = 0;
    else
      b *= i;
  }
  int x = b / a
  for (int j = 1; j < M + 1; j++)
    c *= j;
  for (int j = M; j < 0; j--){
    if (M >= 1)
      d = 0;
    else
      d *= j;
  }
  int y = d / c
  cout << x + y << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: expected ',' or ';' before 'for'
   16 |   for (int j = 1; j < M + 1; j++)
      |   ^~~
a.cc:16:19: error: 'j' was not declared in this scope
   16 |   for (int j = 1; j < M + 1; j++)
      |                   ^
a.cc:25:3: error: expected ',' or ';' before 'cout'
   25 |   cout << x + y << endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  int i = 1
  while (i < N + 1){
    i++;
    a = a* i;
  }
  for (int i = N; i < 0; i--)
    b = b* i;
  for (int j = 1; j < M + 1; j++)
    c = c* j;
  for (int j = M; j < 0; j--)
    d = d* j;
  cout << b / a + d / c << endl;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'while'
    7 |   while (i < N + 1){
      |   ^~~~~
a.cc:12:5: error: 'b' was not declared in this scope
   12 |     b = b* i;
      |     ^
a.cc:14:5: error: 'c' was not declared in this scope
   14 |     c = c* j;
      |     ^
a.cc:16:5: error: 'd' was not declared in this scope
   16 |     d = d* j;
      |     ^
a.cc:17:11: error: 'b' was not declared in this scope
   17 |   cout << b / a + d / c << endl;
      |           ^
a.cc:17:15: error: 'a' was not declared in this scope
   17 |   cout << b / a + d / c << endl;
      |               ^
a.cc:17:19: error: 'd' was not declared in this scope
   17 |   cout << b / a + d / c << endl;
      |                   ^
a.cc:17:23: error: 'c' was not declared in this scope
   17 |   cout << b / a + d / c << endl;
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < N; i++)
    int a = a* i;
  for (int i = N; i < N; i--)
    int b = b* i;
  for (int j = 0; j < M; j++)
    int c = c* j;
  for (int j = M; j < M; j--)
    int d = d* j;
  cout << a * c / b / d << endl;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'a' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |           ^
a.cc:14:15: error: 'c' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |               ^
a.cc:14:19: error: 'b' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |                   ^
a.cc:14:23: error: 'd' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < N; i++)
    int a = a* i;
  for (int i = N; i < N; i--)
    int b = b* i;
  for (int j = 0; j < M; J++)
    int c = c* j;
  for (int j = M; j < M; J--)
    int d = d* j;
  cout << a * c / b / d << endl;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: 'J' was not declared in this scope
   10 |   for (int j = 0; j < M; J++)
      |                          ^
a.cc:12:26: error: 'J' was not declared in this scope
   12 |   for (int j = M; j < M; J--)
      |                          ^
a.cc:14:11: error: 'a' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |           ^
a.cc:14:15: error: 'c' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |               ^
a.cc:14:19: error: 'b' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |                   ^
a.cc:14:23: error: 'd' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  for (int i = 0, i < N, i++)
    int a = a* i;
  for (int i = N, i < N, i--)
    int b = b* i;
  for (int j = 0, j < M, J++)
    int c = c* j;
  for (int j = M, j < M, J--)
    int d = d* j;
  cout << a * c / b / d << endl;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: expected ';' before '<' token
    6 |   for (int i = 0, i < N, i++)
      |                    ^~
      |                    ;
a.cc:6:21: error: expected primary-expression before '<' token
    6 |   for (int i = 0, i < N, i++)
      |                     ^
a.cc:6:29: error: expected ';' before ')' token
    6 |   for (int i = 0, i < N, i++)
      |                             ^
      |                             ;
a.cc:8:20: error: expected ';' before '<' token
    8 |   for (int i = N, i < N, i--)
      |                    ^~
      |                    ;
a.cc:8:21: error: expected primary-expression before '<' token
    8 |   for (int i = N, i < N, i--)
      |                     ^
a.cc:8:29: error: expected ';' before ')' token
    8 |   for (int i = N, i < N, i--)
      |                             ^
      |                             ;
a.cc:10:20: error: expected ';' before '<' token
   10 |   for (int j = 0, j < M, J++)
      |                    ^~
      |                    ;
a.cc:10:21: error: expected primary-expression before '<' token
   10 |   for (int j = 0, j < M, J++)
      |                     ^
a.cc:10:26: error: 'J' was not declared in this scope
   10 |   for (int j = 0, j < M, J++)
      |                          ^
a.cc:10:29: error: expected ';' before ')' token
   10 |   for (int j = 0, j < M, J++)
      |                             ^
      |                             ;
a.cc:12:20: error: expected ';' before '<' token
   12 |   for (int j = M, j < M, J--)
      |                    ^~
      |                    ;
a.cc:12:21: error: expected primary-expression before '<' token
   12 |   for (int j = M, j < M, J--)
      |                     ^
a.cc:12:26: error: 'J' was not declared in this scope
   12 |   for (int j = M, j < M, J--)
      |                          ^
a.cc:12:29: error: expected ';' before ')' token
   12 |   for (int j = M, j < M, J--)
      |                             ^
      |                             ;
a.cc:14:11: error: 'a' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |           ^
a.cc:14:15: error: 'c' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |               ^
a.cc:14:19: error: 'b' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |                   ^
a.cc:14:23: error: 'd' was not declared in this scope
   14 |   cout << a * c / b / d << endl;
      |                       ^
Language: Java

public static void main(String[] args) {
	        Scanner stdIn=new Scanner(System.in);
	 
	        int M=stdIn.nextInt();
	        int N=stdIn.nextInt();
	 
	        System.out.println(M*(M-1)/2+N*(N-1)/2);
	 }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

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

int main() {
  int N,M;
  scanf("N = %d,M = %d",N,M);
  int plus = N;
  int pto = M;
  int ans = 0
  for(int i=0;i<N;i++) {
    plus--;
    ans += plus;
  }
  for(int i=0;i<M;i++) {
    pto --;
    ans += pto;
  }
  printf("%d\n",ans);
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'for'
   10 |   for(int i=0;i<N;i++) {
      |   ^~~
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<N;i++) {
      |               ^
Language: C++

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

int main(){
  int N,M;
  cin >> N >> M ;
  if(N < 2){
    cout << M*(M-1)/2 << endl;
  }
  if(M < 2){
    cout << N*(N-1)/2 << endl;
  }
  if(N=1 && M=1){
    cout << 0 << endl;
  }
  else{
    cout << M*(M-1)/2+N*(N-1)/2 << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: lvalue required as left operand of assignment
   13 |   if(N=1 && M=1){
      |        ~~^~~~
Language: C++

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

int main(){
	int n, m;	cin >> n >> m;
	if(n == 0)	cout << m*(m-1) << endl;	return 0;
  	if(m == 0)	cout << n*(n-1) << endl;	return 0;
  	if(n == 1)	cout << m*(m-1) << endl;	return 0;
  	if(m == 1)	cout << n*(n-1) << endl;	return 0;
  	if(n == 1 && m == 1)	cout << 0 << endl;	return 0;
  	else	cout << n*(n-1) + m*(m-1) + n*m << endl;	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else    cout << n*(n-1) + m*(m-1) + n*m << endl;        return 0;
      |         ^~~~
Language: C++

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

int main(){
	int n, m;	cin >> n >> m;
	if(n == 0)	cout << m*(m-1) << endl	return 0;
  	if(m == 0)	cout << n*(n-1) << endl	return 0;
  	if(n == 1)	cout << m*(m-1) << endl	return 0;
  	if(m == 1)	cout << n*(n-1) << endl	return 0;
  	if(n == 1 && m == 1)	cout << 0 << endl	return 0;
  	else	cout << n*(n-1) + m*(m-1) + n*m << endl	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:48: error: expected ';' before 'return'
    6 |         if(n == 0)      cout << m*(m-1) << endl return 0;
      |                                                ^~~~~~~
      |                                                ;
a.cc:7:48: error: expected ';' before 'return'
    7 |         if(m == 0)      cout << n*(n-1) << endl return 0;
      |                                                ^~~~~~~
      |                                                ;
a.cc:8:48: error: expected ';' before 'return'
    8 |         if(n == 1)      cout << m*(m-1) << endl return 0;
      |                                                ^~~~~~~
      |                                                ;
a.cc:9:48: error: expected ';' before 'return'
    9 |         if(m == 1)      cout << n*(n-1) << endl return 0;
      |                                                ^~~~~~~
      |                                                ;
a.cc:10:56: error: expected ';' before 'return'
   10 |         if(n == 1 && m == 1)    cout << 0 << endl       return 0;
      |                                                  ^~~~~~~~~~~~~
      |                                                        ;
a.cc:11:56: error: expected ';' before 'return'
   11 |         else    cout << n*(n-1) + m*(m-1) + n*m << endl return 0;
      |                                                        ^~~~~~~
      |                                                        ;
Language: C++

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

void reverseStr(string& str) { 
    int n = str.length(); 
    for (int i = 0; i < n / 2; i++) 
        swap(str[i], str[n - i - 1]); 
} 

void PalindromeCheck(string& str) {
	

}

void main() {
  string str;
  cin >> str;
  
  if (PailndromeCheck(str) == 1)
 
}

Compiler output:
a.cc:15:1: error: '::main' must return 'int'
   15 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:7: error: 'PailndromeCheck' was not declared in this scope; did you mean 'PalindromeCheck'?
   19 |   if (PailndromeCheck(str) == 1)
      |       ^~~~~~~~~~~~~~~
      |       PalindromeCheck
a.cc:21:1: error: expected primary-expression before '}' token
   21 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  int n,m,a;
  scanf("%d %d",&n,&m);
  a=n(n-1)/2+m(m-1)/2;
  printf("%d\n",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:5: error: called object 'n' is not a function or function pointer
    5 |   a=n(n-1)/2+m(m-1)/2;
      |     ^
main.c:3:7: note: declared here
    3 |   int n,m,a;
      |       ^
main.c:5:14: error: called object 'm' is not a function or function pointer
    5 |   a=n(n-1)/2+m(m-1)/2;
      |              ^
main.c:3:9: note: declared here
    3 |   int n,m,a;
      |         ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

int e[100];
int o[100];

int main()
{
	int n, m;
	cin >> n >> m;
	int sol = 0;
	for (int i = 0, i < n; ++i)
	{
		cin >> e[i] >> o[i];
		if ((e[i] + o[i]) % 2 == 0)
			sol++;
	}
	cout << sol;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before '<' token
   14 |         for (int i = 0, i < n; ++i)
      |                          ^~
      |                          ;
a.cc:14:27: error: expected primary-expression before '<' token
   14 |         for (int i = 0, i < n; ++i)
      |                           ^
Language: C++

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

int main() {
  int N;
  int M;
  cin >> N >> M;
  int x = (N ** 2 + M ** 2 - N - M) / 2;
  cin >> x;
  cout << x << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: invalid type argument of unary '*' (have 'int')
    8 |   int x = (N ** 2 + M ** 2 - N - M) / 2;
      |               ^~~
a.cc:8:24: error: invalid type argument of unary '*' (have 'int')
    8 |   int x = (N ** 2 + M ** 2 - N - M) / 2;
      |                        ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin>>n>>m;
  cout<<(n*(n-1))/2 + (m*(m-1))/2
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: expected ';' before '}' token
    6 |   cout<<(n*(n-1))/2 + (m*(m-1))/2
      |                                  ^
      |                                  ;
    7 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int fact(int n)
{
  return (n==1||n==0)?1:n*fact(n-1);
}
int main()
{
  int n,m;
  cin>>n>>m;
  int count1,count2=;
  if(n>=2)
  {
    count1=fact(n)/fact(2)*fact(n-2);
  }
  if(m>=2)
  {
    count2=fact(m)/fact(2)*fact(m-2);
  }
  cout<<count1+count2<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected primary-expression before ';' token
   11 |   int count1,count2=;
      |                     ^
Language: C++

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

int main() {
  int n, m, ans;
  cin >> n >> m;
  ans = n*(n-1)/2 + m*(m-1)/2
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected ';' before 'cout'
    8 |   ans = n*(n-1)/2 + m*(m-1)/2
      |                              ^
      |                              ;
    9 |   cout << ans << endl;
      |   ~~~~
Language: C++

#include<bits/sydc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n>>m;
  int c=n*(n-1)/2+m*(m-1)/2;
  cout<<c;
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/sydc++.h: No such file or directory
    1 | #include<bits/sydc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		Scanner cin = new Scanner(System.in);
		
		int N = cin.nextInt();
		int M = cin.nextInt();
		
		
		int ans = N*(N-1)/2+M*(M-1)/2;
		

		System.out.println(ans);
	}

}


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

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cout.precision(10);
    cout<<fixed;
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
#endif
	int n, m;
	cin>>n>>m;
	cout<<<n*(n-1)/2+m*(m-1)/2<<"\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected primary-expression before '<' token
   16 |         cout<<<n*(n-1)/2+m*(m-1)/2<<"\n";
      |               ^
a.cc:16:35: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   16 |         cout<<<n*(n-1)/2+m*(m-1)/2<<"\n";
      |                ~~~~~~~~~~~~~~~~~~~^~~~~~
      |                         |           |
      |                         int         const char [2]
Language: Java

import java.util.Scanner;
/**
 * @author yamato
 *
 */
public class a159 {

	/**
	 * @param args
	 */
	public static int C(int a, int b) {
		b = Math.min(a-b,b);
		if (b==0)return 1;
		int i;
		int up = 1;
		for(i=0;i<b;i++) {
			up *= a-i;
		}
		int down = 1;
		for(i=1;i<=b;i++) {
			down *= i;
		}
		return up/down;
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int m = scanner.nextInt();
		int ans = (C(n,2))+C(m,2);
		
		System.out.println(ans);
		
	}

}

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

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
typedef pair<int, int> P;
typedef vector<vector<int>> Matrix;
static const int INF = 2000000000;



int main(){
  int a, b;
  cin >> a >> b;
  int ans = a*(a-1)/2 + b*(b-1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:35: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |   int ans = a*(a-1)/2 + b*(b-1)/2 << endl;
      |             ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
int main (){
  double L;
  cin >> L;
  cout << L*L*L/27.000000000000000000 << endl;
}


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:3: error: 'cin' was not declared in this scope
    5 |   cin >> L;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << L*L*L/27.000000000000000000 << endl;
      |   ^~~~
a.cc:6:42: error: 'endl' was not declared in this scope
    6 |   cout << L*L*L/27.000000000000000000 << endl;
      |                                          ^~~~
Language: C++

include <bits/stdc++.h>
using namespace std;
int main (){
  double L;
  cin >> L;
  cout << L*L*L/27.000000000000000000 << endl;
}

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:3: error: 'cin' was not declared in this scope
    5 |   cin >> L;
      |   ^~~
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << L*L*L/27.000000000000000000 << endl;
      |   ^~~~
a.cc:6:42: error: 'endl' was not declared in this scope
    6 |   cout << L*L*L/27.000000000000000000 << endl;
      |                                          ^~~~
Language: C++

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

int main () {
int N,M,sum = 0;
cin >> N >> M;
if (N == 1) {
sum += 0
}
else {
sum += N*(N - 1) / 2
}
  if (M == 1) {
sum += 0
}
else {
sum += M*(M - 1) / 2
}
  cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ';' before '}' token
    8 | sum += 0
      |         ^
      |         ;
    9 | }
      | ~        
a.cc:11:21: error: expected ';' before '}' token
   11 | sum += N*(N - 1) / 2
      |                     ^
      |                     ;
   12 | }
      | ~                    
a.cc:14:9: error: expected ';' before '}' token
   14 | sum += 0
      |         ^
      |         ;
   15 | }
      | ~        
a.cc:17:21: error: expected ';' before '}' token
   17 | sum += M*(M - 1) / 2
      |                     ^
      |                     ;
   18 | }
      | ~
Language: Java

class Main {
    int fact(int n){
        return n == 1 ? 1 : n * fact( n-1 );
    }
    int selection(int n){
        if(n==0 || n==1)
            return 0;
        else{
            int k=fact(n);
            int l=fact(n-2);
            int m=fact(2);
            int p=k/(l*m);

            return p;
        }
    }
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N=sc.nextInt();
        int M=sc.nextInt();
        Main ob1=new Main();
//        ob1.selection(N);
        System.out.println(ob1.selection(N) + ob1.selection(M));
    }
}


Compiler output:
Main.java:19: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:19: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

class Main {
    int fact(int n){
        return n == 1 ? 1 : n * fact( n-1 );
    }
    int selection(int n){
        if(n==0 || n==1)
            return 0;
        else{
            int k=fact(n);
            int l=fact(n-2);
            int m=fact(2);
            int p=k/(l*m);

            return p;
        }
    }
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N=sc.nextInt();
        int M=sc.nextInt();
        Main ob1=new Main();
//        ob1.selection(N);
        System.out.println(ob1.selection(N) + ob1.selection(M));
    }
}


Compiler output:
a.cc:17:11: error: expected ':' before 'static'
   17 |     public static void main(String[] args) {
      |           ^~~~~~~
      |           :
a.cc:17:29: error: 'String' has not been declared
   17 |     public static void main(String[] args) {
      |                             ^~~~~~
a.cc:17:38: error: expected ',' or '...' before 'args'
   17 |     public static void main(String[] args) {
      |                                      ^~~~
a.cc:26:2: error: expected ';' after class definition
   26 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:19:9: error: 'Scanner' was not declared in this scope
   19 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:20:15: error: 'sc' was not declared in this scope
   20 |         int N=sc.nextInt();
      |               ^~
a.cc:22:18: error: conversion from 'Main*' to non-scalar type 'Main' requested
   22 |         Main ob1=new Main();
      |                  ^~~~~~~~~~
a.cc:24:9: error: 'System' was not declared in this scope
   24 |         System.out.println(ob1.selection(N) + ob1.selection(M));
      |         ^~~~~~
Language: C++

import java.util.Arrays;
import java.util.Scanner;


public class Main {
    int fact(int n){
        return n == 1 ? 1 : n * fact( n-1 );
    }
    int selection(int n){
        if(n==0 || n==1)
            return 0;
        else{
            int k=fact(n);
            int l=fact(n-2);
            int m=fact(2);
            int p=k/(l*m);

            return p;
        }
    }
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int N=sc.nextInt();
        int M=sc.nextInt();
        Main ob1=new Main();
//        ob1.selection(N);
        System.out.println(ob1.selection(N) + ob1.selection(M));
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: C

#include <iostream>
using namespace std;
int main() {
    int n,m;
    cin>>n>>m;
    int sum=0;
    if(n>1)
        sum+=n*(n-1);
    if(m>1)
        sum+=m*(m-1);
    cout<<sum/2;


  
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

 #include<iostream>
2 using namespace std;
3
4 int main(){
5 double N,M;
6 cin>>N>>M;
7
8 cout<<N*(N-1)/2+M*(M-1)/2<<endl;
9 }

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 using namespace std;
      | ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3
      | ^
Language: C

#include<stdio.h>

int main(){
 int N,M;
 scanf("%d%d",N,M)

 printf("%d",N*(N-1)/2+M*(M-1)/2);
 return 0;
 }

Compiler output:
main.c: In function 'main':
main.c:5:19: error: expected ';' before 'printf'
    5 |  scanf("%d%d",N,M)
      |                   ^
      |                   ;
    6 | 
    7 |  printf("%d",N*(N-1)/2+M*(M-1)/2);
      |  ~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char str[100];
  char *start_str = str;
  int len=0;
  scanf("%s",str);
  while(*start_str=="\0"){
    len++;
    start_str++;
  }
  int i;
  //S is palindrome
  for(i=0;i<len/2:i++){
    if(str[i]!=str[99-i]){
      printf("No")
      return 0;
    }
  }
  int front = (len-1)/2;
  for(i=0;i<front;i++){
    if(str[i]!=str[front-i]){
      printf("No")
      return 0;
    }
  }
  int rear = (len+3)/2;
  for(i=rear;i<len;i++){
    if(str[i]!=str[len-(i-rear)]){
      printf("No")
      return 0;
    }
  }
  printf("Yes")
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:19: warning: comparison between pointer and integer
    8 |   while(*start_str=="\0"){
      |                   ^~
main.c:14:18: error: expected ';' before ':' token
   14 |   for(i=0;i<len/2:i++){
      |                  ^
      |                  ;
main.c:16:19: error: expected ';' before 'return'
   16 |       printf("No")
      |                   ^
      |                   ;
   17 |       return 0;
      |       ~~~~~~       
main.c:23:19: error: expected ';' before 'return'
   23 |       printf("No")
      |                   ^
      |                   ;
   24 |       return 0;
      |       ~~~~~~       
main.c:30:19: error: expected ';' before 'return'
   30 |       printf("No")
      |                   ^
      |                   ;
   31 |       return 0;
      |       ~~~~~~       
main.c:34:16: error: expected ';' before 'return'
   34 |   printf("Yes")
      |                ^
      |                ;
   35 |   return 0;
      |   ~~~~~~