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

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

  int main() {
  int N,M;
    cin>>N>>M;
    int s,t;
    
  // 0 ~ nの総和を求める
int sum( N-1) {
  if (N-1 == 0) {
    // sum0のケースを場合分け
    s= 0;
  }
 
  // それ以外のケース
   s = sum(N-1 - 1);  // 1~(n-1)の総和を計算
  s= s + N-1;  // nを足して返す
}
// 0 ~ nの総和を求める
int sum( M-1) {
  if (M-1 == 0) {
    // sum0のケースを場合分け
    t= 0;
  }
 
  // それ以外のケース
   t = sum(M-1 - 1);  // 1~(n-1)の総和を計算
  t= t + M-1;  // nを足して返す
}
 
    if(N==0&&M!=0){
      cout<<t<<endl;
    }
    else if (M==0&&N!=0){
      cout<<s<<endl;
    }
    else if (N==0&&M==0){
      cout<<0<<endl;
    }
    else{
  cout<< (s+t)<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected ',' or ';' before '{' token
   10 | int sum( N-1) {
      |               ^
a.cc:21:5: error: redeclaration of 'int sum'
   21 | int sum( M-1) {
      |     ^~~
a.cc:10:5: note: 'int sum' previously declared here
   10 | int sum( N-1) {
      |     ^~~
Language: C++

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

  int main() {
  int N,M;
    cin>>N>>M;
    int s,t;
    
  // 0 ~ nの総和を求める
int sum( N-1) {
  if (N-1 == 0) {
    // sum0のケースを場合分け
    s= 0;
  }
 
  // それ以外のケース
   s = sum(N-1 - 1);  // 1~(n-1)の総和を計算
  s= s + N-1;  // nを足して返す
// 0 ~ nの総和を求める
int sum( M-1) {
  if (M-1 == 0) {
    // sum0のケースを場合分け
    t= 0;
  }
 
  // それ以外のケース
   t = sum(M-1 - 1);  // 1~(n-1)の総和を計算
  t= t + M-1;  // nを足して返す
 
    if(N==0&&M!=0){
      cout<<t<<endl;
    }
    else if (M==0&&N!=0){
      cout<<s<<endl;
    }
    else if (N==0&&M==0){
      cout<<0<<endl;
    }
    else{
  cout<< (s+t)<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected ',' or ';' before '{' token
   10 | int sum( N-1) {
      |               ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:4:14: note: to match this '{'
    4 |   int main() {
      |              ^
Language: C++

#include <stdio.h> 
int main(){  int L;  scanf("%d",&L);
           5printf("%.12f\n",(double)L*L*L/27);  }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: unable to find numeric literal operator 'operator""printf'
    3 |            5printf("%.12f\n",(double)L*L*L/27);  }
      |            ^~~~~~~
Language: C++

    int main() {
      int L;
      cin >> L;
      double l;
      l=L/3.000000000);
      cout << l*l*l << endl;
         
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:7: error: 'cin' was not declared in this scope
    3 |       cin >> L;
      |       ^~~
a.cc:5:22: error: expected ';' before ')' token
    5 |       l=L/3.000000000);
      |                      ^
      |                      ;
a.cc:6:7: error: 'cout' was not declared in this scope
    6 |       cout << l*l*l << endl;
      |       ^~~~
a.cc:6:24: error: 'endl' was not declared in this scope
    6 |       cout << l*l*l << endl;
      |                        ^~~~
Language: C++

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

  int main() {
  int N,M;
    cin>>N>>M;
    int s,t;
    
  int sum N-1() {
   s = sum N-2();
  return s + N-1;  // (0~2の総和) + 3 = 6
}
    int sum M-1(){
      t=sum M-2();
      return t+M-1;
    }
    if(N==0&&M!=0){
      cout<<t<<endl;
    }
    else if (M==0&&N!=0){
      cout<<s<<endl;
    }
    else if (N==0&&M==0){
      cout<<0<<endl;
    }
    else{
  cout<< (s+t)<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected initializer before 'N'
    9 |   int sum N-1() {
      |           ^
a.cc:13:13: error: expected initializer before 'M'
   13 |     int sum M-1(){
      |             ^
Language: C++

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

  int main() {
  int N,M;
    cin>>N>>M;
    
  int sum(N-1)() {
  int s = sum(N-2)();
  return s + N-1;  // (0~2の総和) + 3 = 6
}
    int sum(M-1)(){
      int t=sum(M-2)();
      return t+M-1;
    }
    if(N==0&&M!=0){
      cout<<t<<endl;
    }
    else if (M==0&&N!=0){
      cout<<s<<endl;
    }
    else if (N==0&&M==0){
      cout<<0<<endl;
    }
    else{
  cout<< (s+t)<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ',' or ';' before '(' token
    8 |   int sum(N-1)() {
      |               ^
a.cc:12:9: error: redeclaration of 'int sum'
   12 |     int sum(M-1)(){
      |         ^~~
a.cc:8:7: note: 'int sum' previously declared here
    8 |   int sum(N-1)() {
      |       ^~~
a.cc:17:13: error: 't' was not declared in this scope
   17 |       cout<<t<<endl;
      |             ^
a.cc:20:13: error: 's' was not declared in this scope
   20 |       cout<<s<<endl;
      |             ^
a.cc:26:11: error: 's' was not declared in this scope
   26 |   cout<< (s+t)<<endl;
      |           ^
a.cc:26:13: error: 't' was not declared in this scope
   26 |   cout<< (s+t)<<endl;
      |             ^
Language: C++

#include <stdio.h>
 
main( )
{
  int	i,j,x,max;
//  double max,y,z;
  
  max = 0;
  
  scanf("%d",&x);
  
  for( i=1; i<x; i++ ){
    for( j=1; j<x; j++ ){
      y = i * j * (x-i-j);
  	  if( max < y ){
        max = y;
      }
    }
  }
  printf("%d",max);
  
}

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:14:7: error: 'y' was not declared in this scope
   14 |       y = i * j * (x-i-j);
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
  long long i;
  cin>>s;
  long long n=s.length(),st=0,end=n-1,c=0;
  while(st<end)
  {
    if(s[st]==s[end])
    {
      st++;
      end--;
    }
    else
    {
      c++;
      break;
  }
  }
  if(c==0)
  {
    end=(n-1)/2-1,st=0,c=0;
    while(st<end)
  	{
      if(s[st]==s[end])
      {
        st++;
        end--;
      }
      else
      {
        c++;
        break;
    }
     if(c==0)
     {
       st=(n+3)/2-1,end=n-1;
      while(st<end)
      {
        if(s[st]==s[end])
        {
          st++;
          end--;
        }
        else
        {
          c++;
          break;
      }
       if(c==0)
       {
         printf("YES\n");
         return 0;
       }
       else
       {
         printf("No\n");
         return 0;
       }
     }
      else
      {
        printf("No\n");
        return 0;
      }
  }
    else
    {
      printf("No\n");
      return 0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:7: error: expected '}' before 'else'
   63 |       else
      |       ^~~~
a.cc:38:6: note: to match this '{'
   38 |      {
      |      ^
a.cc:69:5: error: expected '}' before 'else'
   69 |     else
      |     ^~~~
a.cc:23:3: note: to match this '{'
   23 |   {
      |   ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
int main()
{
 
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll n,s;
  cin>>n>>s;
  ll arr[n],i,ans,sum1=0,sum[n],j;
  for(i=0;i<n;i++)
  {
      cin>>arr[i];
  }
  for(i=0;i<n;i++)
  {
      sum1=sum1+arr[i];
      sum[i]=sum1;
  }
  for(i=0;i<n;i++)
  {
      for(j=i;j<n;j++)
      {
          if(sum[j]-sum[i]+arr[i]==s)
          ans=(ans+1)%998244353
 .
      }
  }
  cout<<ans<<'\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:7: error: expected unqualified-id before '}' token
   29 |       }
      |       ^
Language: C++

#include<iostream>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{ ios_base::sync_with_stdio(0);
  cin.tie(0);
   cout.tie(0);
  char s[100];
   cin>>s;
   char s1[]="sort(s+0,s+strlen(s))";
 if(strcmp(s,s1){
   cout<<"Yes";}
    cout<<"No";
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '{' token
   12 |  if(strcmp(s,s1){
      |                 ^
      |                 ;
a.cc:14:15: error: expected ')' before ';' token
   14 |     cout<<"No";
      |               ^
      |               )
a.cc:12:4: note: to match this '('
   12 |  if(strcmp(s,s1){
      |    ^
Language: C

#include <stdio.h>
#include <conio.h>
void main()
{

    int i,N,M,p,q,ans;

    scanf("%d %d", &N, &M);
  	if((N+M)<=2 || N<0 || M>=100)
    {
      printf("0");
    }
	else
    {
      p = (N*(N-1))/2;
  	q = (M*(M-1))/2;

  	ans = p + q;
  	
    printf("%d",ans);
    }

}

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

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

int main()
{
	int i,x,m,n;
	int a[100];	
	int b[100];
	
    for(i=a[0];i<=a[100];i++)
    {
	    i=0;
		if(a[n]==' '){
	    break;
	    }
	    else{
	    a[n]==i;
        break;}
    }
    for(x=b[0];x<=b[100];x++)
    {
        x=0;
		if(b[n]==' '){
	    break;
	    }
	    else{
	    b[n]==x;
        break;}
    }
    int s=i+x;
    if(s%2==0)
    m++;
    if(s%2==1)
    m+0;
	cout<<m;
    }   
    return 0;
}

Compiler output:
a.cc:37:5: error: expected unqualified-id before 'return'
   37 |     return 0;
      |     ^~~~~~
a.cc:38:1: error: expected declaration before '}' token
   38 | }
      | ^
Language: C

#include <stdio.h>

int main(){
	int n, m, npar, nimpar;
	scanf("%d%d", &n, &m);
	for(int i=1; i<n; ++i)
			npar+=1;

	for(int j=1, j<m; ++j)
		nimpar+=1

	printf("%d\n", npar+nimpar);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    9 |         for(int j=1, j<m; ++j)
      |                       ^
main.c:9:30: error: expected ';' before ')' token
    9 |         for(int j=1, j<m; ++j)
      |                              ^
      |                              ;
main.c:10:26: error: expected ';' before 'printf'
   10 |                 nimpar+=1
      |                          ^
      |                          ;
   11 | 
   12 |         printf("%d\n", npar+nimpar);
      |         ~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <decimal/decimal>

using namespace std;

int main(void){
    int L;
    cin >> L;
    long double k;
    k = Decimal(L * L * L);
    cout << k/27.0 <<endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'Decimal' was not declared in this scope
   11 |     k = Decimal(L * L * L);
      |         ^~~~~~~
Language: C++

#include<stdio.h>
#include<string.h>
bool f(char* s,int i,int j){
	int t=j/2;//1 2 3
	for(int k=i;k<=t;k++){
		if(s[k]!=s[j-k+1])return 0;
	}
	return 1;
}
int main(){
	char s[1000];
	scanf("%s",s+1)
	int N=strlen(s)-1;
	printf("%d\n",f(s,1,(N-1)/2)&&f(s,(N+3)/2,N)&&f(s,1,N));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before 'int'
   12 |         scanf("%s",s+1)
      |                        ^
      |                        ;
   13 |         int N=strlen(s)-1;
      |         ~~~             
a.cc:14:30: error: 'N' was not declared in this scope
   14 |         printf("%d\n",f(s,1,(N-1)/2)&&f(s,(N+3)/2,N)&&f(s,1,N));
      |                              ^
Language: C

#include <stdio.h>

int main(){
	int n, m, npar, nimpar;
	scanf("%d%d", &n, &m);
	for(int i=1; i<n; ++i)
			npar+=1;

	for(int j=1, j<m; ++j)
		nimpar+=1

	printf("%d\n", npar+nimpares);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    9 |         for(int j=1, j<m; ++j)
      |                       ^
main.c:9:30: error: expected ';' before ')' token
    9 |         for(int j=1, j<m; ++j)
      |                              ^
      |                              ;
main.c:10:26: error: expected ';' before 'printf'
   10 |                 nimpar+=1
      |                          ^
      |                          ;
   11 | 
   12 |         printf("%d\n", npar+nimpares);
      |         ~~~~~~
Language: C

#include <stdio.h>

int main(){
	int n, m;
	scanf("%d%d", &n, &m);
	for(int i=1; i<n; ++i)
			npar+=1;

	for(int j=1, j<m; ++j)
		nimpares+=1

	printf("%d\n", npar+nimpares);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:25: error: 'npar' undeclared (first use in this function)
    7 |                         npar+=1;
      |                         ^~~~
main.c:7:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    9 |         for(int j=1, j<m; ++j)
      |                       ^
main.c:9:30: error: expected ';' before ')' token
    9 |         for(int j=1, j<m; ++j)
      |                              ^
      |                              ;
main.c:10:17: error: 'nimpares' undeclared (first use in this function)
   10 |                 nimpares+=1
      |                 ^~~~~~~~
main.c:10:28: error: expected ';' before 'printf'
   10 |                 nimpares+=1
      |                            ^
      |                            ;
   11 | 
   12 |         printf("%d\n", npar+nimpares);
      |         ~~~~~~
Language: C++

#include<stdio.h>
int main(){
	int N;//even
	int M;//odd
	unsigned sum;
	scanf("%d%d",&N,&M));
	sum=(N*N+M*M-M-N)>>1;
	printf("%d\n",sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:28: error: expected ';' before ')' token
    6 |         scanf("%d%d",&N,&M));
      |                            ^
      |                            ;
Language: C

#include<stdio.h>
int main()
{
  int N,M;
  
  scanf("%d %d", N, M);
  printf("%d\n", N(N-1)/2 + (M*(M-1)/2 );
  
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:18: error: called object 'N' is not a function or function pointer
    7 |   printf("%d\n", N(N-1)/2 + (M*(M-1)/2 );
      |                  ^
main.c:4:7: note: declared here
    4 |   int N,M;
      |       ^
main.c:7:41: error: expected ')' before ';' token
    7 |   printf("%d\n", N(N-1)/2 + (M*(M-1)/2 );
      |         ~                               ^
      |                                         )
main.c:9:10: error: expected ';' before '}' token
    9 | return 0;
      |          ^
      |          ;
   10 | }
      | ~
Language: C

#include<stdio.h>
int main()
{
  int N,M;
  
  scanf("%d %d", N, M);
  printf("%d\n", (N(N-1)/2 + (M*(M-1)/2 );
  
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: called object 'N' is not a function or function pointer
    7 |   printf("%d\n", (N(N-1)/2 + (M*(M-1)/2 );
      |                   ^
main.c:4:7: note: declared here
    4 |   int N,M;
      |       ^
main.c:7:42: error: expected ')' before ';' token
    7 |   printf("%d\n", (N(N-1)/2 + (M*(M-1)/2 );
      |                  ~                       ^
      |                                          )
main.c:9:10: error: expected ')' before '}' token
    9 | return 0;
      |          ^
      |          )
   10 | }
      | ~         
main.c:7:9: note: to match this '('
    7 |   printf("%d\n", (N(N-1)/2 + (M*(M-1)/2 );
      |         ^
main.c:9:10: error: expected ';' before '}' token
    9 | return 0;
      |          ^
      |          ;
   10 | }
      | ~
Language: C

#include<stdio.h>
int main()
{
  int N,M;
  
  scanf("%d %d", N, M);
  printf("%d\n", (N(N-1)/2 + (M*(M-1))/2 );
  
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:19: error: called object 'N' is not a function or function pointer
    7 |   printf("%d\n", (N(N-1)/2 + (M*(M-1))/2 );
      |                   ^
main.c:4:7: note: declared here
    4 |   int N,M;
      |       ^
main.c:7:43: error: expected ')' before ';' token
    7 |   printf("%d\n", (N(N-1)/2 + (M*(M-1))/2 );
      |         ~                                 ^
      |                                           )
main.c:9:10: error: expected ';' before '}' token
    9 | return 0;
      |          ^
      |          ;
   10 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int n, m, cnt, a[100];
cin>>n>>m;
    for (int i =0; i<n; i++) {
a[i]=i*2;
}
    for (int j =n; j<n+m; j++) {
a[j]=j*2+1;
}
    for (int k=0; k<n+m; k++)
    {
        for (int l=k+1; l<n+m;l++)
        {
            if((a[k]+a[l])%2!==0){
continue;}else{
cnt++;
}; 
        }
    }
cout<<cnt<<"\n";
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: expected primary-expression before '=' token
   20 |             if((a[k]+a[l])%2!==0){
      |                               ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int n, m, cnt, a[100];
cin>>n>>m;
    for (int i =0; i<n; i++) {
a[i]=i*2;
}
    for (int j =n; j<n+m; j++) {
a[j]=j*2+1;
}
    for (int k=0; k<n+m; k++)
    {
        for (int l=k+1; l<n+m;l++)
        {
            if((a[k]+a[l])%2===0){
cnt++;}else{
continue;
}; 
        }
    }
cout<<cnt<<"\n";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: expected primary-expression before '=' token
   20 |             if((a[k]+a[l])%2===0){
      |                               ^
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;
return ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 | return ;
      | ^~~~~~
Language: C

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

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: Java


import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        Scanner scn  = new Scanner(System.in);
        System.out.println(even_pairs(scn.nextInt(),scn.nextInt()));



    }
    static long even_pairs(int n, int m){
        return combinationOfTwo(n) + combinationOfTwo(m);
    }
    static  long factorial (int n){
       long fact = 1;
       
       if(n == 0){
           return 1;
       }
       if(n < 0){
           return  factorial(-n);
       }
       for (int i = 2; i<=n; i++){
           fact*= i;
       }
       return  fact;
    }
    static long  combinationOfTwo(int n){
        return factorial(n)/(factorial(n-2)*factorial(2));

    }
}
// 2 4 6 8 10 12


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

#include<stdio.h>
#include<conio.h>
int main()
{
  long int n,m;
  scanf("%ld %ld",&n,&m);
  printf("%ld",(n*(n-1)+m*(m-1))/2);
  return 0;
}

Compiler output:
main.c:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.lang.*;
public class Solution{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int a[]=new int[100];
    a[0]=0;
    a[1]=0;
    a[2]=3;
   
    int l=3;
    for(int i=3;i<100;i++){
      a[i]=a[i-1]+l;
      l=l+1;
    }
    if(n==1&&m==1){
      System.out.println("0");
    }
    else if(n==2&&m==1||n==1&&m==2){
      System.out.println("1");
    }
    else{
      int p=0,q=0;
      if(n>2){
        p=a[n-1];
    }
      if(m>2){
        q=a[m-1];
      }
      int k=0;
      k=p+q;
      System.out.println(k);
  }
    
}}


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: C

#include <stdio.h>
int main(){
  
int N;
int M;
int sum;
scanf("%d", &N);
scanf("%d", &M);
if(N=1 && M=1){
sum=0;
  printf("%d",sum);
}else if(N=0 && M%2=1){
sum=0;
  printf("%d",sum);
}else if(N=0 && M%2=0){
  for(int i=0; i<N-1; i++){
   M*=M-1;
  }
  sum=M/2;
   printf("%d",sum);
}else if(M=0){
  for(int i=0; i<N-1; i++){
  N*=N-1;
  }
  sum=N/2;
   printf("%d",sum);
}else{
for(int i=0; i<N-1; i++){
  N*=N-1;
  M*=M-1;
}
sum = N/2 + M/2;
printf("%d", sum);
}

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:12: error: lvalue required as left operand of assignment
    9 | if(N=1 && M=1){
      |            ^
main.c:12:20: error: lvalue required as left operand of assignment
   12 | }else if(N=0 && M%2=1){
      |                    ^
main.c:15:20: error: lvalue required as left operand of assignment
   15 | }else if(N=0 && M%2=0){
      |                    ^
Language: Java

import java.util.Scanner;

public class Solution{

    public static void main(String[] args) {
        Scanner scn  = new Scanner(System.in);
        System.out.println(even_pairs(scn.nextInt(),scn.nextInt()));



    }
    static long even_pairs(int n, int m){
        return combinationOfTwo(n) + combinationOfTwo(m);
    }
    static  long factorial (int n){
       long fact = 1;
       for (int i = 2; i<=n; i++){
           fact*= i;
       }
       return  fact;
    }
    static long  combinationOfTwo(int n){
        return factorial(n)/(factorial(n-2)*factorial(2));

    }
}


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: C

#include <stdio.h>
int main(){
  
int N;
int M;
int sum;
scanf("%d", &N);
scanf("%d", &M);
if(N=1 && M=1){
sum=0;
  print("%d",sum);
}else if(N=0 && M%2=1){
sum=0;
  print("%d",sum);
}else if(N=0 && M%2=0){
  for(int i=0; i<N-1; i++){
   M*=M-1;
  }
  sum=M/2;
   print("%d",sum);
}else if(M=0){
  for(int i=0; i<N-1; i++){
  N*=N-1;
  }
  sum=N/2;
   print("%d",sum);
}else{
for(int i=0; i<N-1; i++){
  N*=N-1;
  M*=M-1;
}
sum = N/2 + M/2;
printf("%d", sum);
}

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:12: error: lvalue required as left operand of assignment
    9 | if(N=1 && M=1){
      |            ^
main.c:11:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |   print("%d",sum);
      |   ^~~~~
      |   printf
main.c:12:20: error: lvalue required as left operand of assignment
   12 | }else if(N=0 && M%2=1){
      |                    ^
main.c:15:20: error: lvalue required as left operand of assignment
   15 | }else if(N=0 && M%2=0){
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M,r;
  
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
    r=2;
     
  cout << combination(N,r)+combination(M,r) << endl;
  }
  else if(N>=2 && M<2){
    r=2;
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    r=2;
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M<2) {
    
    cout << 0 << endl;}
  }
     


Compiler output:
/usr/bin/ld: /tmp/ccuaabCN.o: in function `main':
a.cc:(.text+0x53): undefined reference to `combination(int, int)'
/usr/bin/ld: a.cc:(.text+0x64): undefined reference to `combination(int, int)'
/usr/bin/ld: a.cc:(.text+0xb4): undefined reference to `combination(int, int)'
/usr/bin/ld: a.cc:(.text+0x102): undefined reference to `combination(int, int)'
collect2: error: ld returned 1 exit status
Language: C++

/*
Author:Jenil Mehta
Not yet serious but trying to be serious :)
Coding is lub
*/
 
#include <iostream>
#include <sstream>
#include <cstdio>
#include <climits>
#include <cmath>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <functional>
typedef long long int ll;
ll power(ll a, ll n) {ll p = 1;while (n > 0) {if(n%2) {p = p * a;} n >>= 1; a *= a;} return p;}
ll power(ll a, ll n, ll mod) {ll p = 1;while (n > 0) {if(n%2) {p = p * a; p %= mod;} n >>= 1; a *= a; a %= mod;} return p % mod;}
using namespace std;
ll a[1002];
ll b[1002];
int dp[3000 + 5][3000 + 5];
 
int main() {
   /*
   Jab Bhi Koi Ladaki Dekhun Meraa Dil Divaanaa Bole
Ole Ole Ole, Ole Ole Ole
Gaao Taraanaa Yaaraa Jhum Jhum Ke Haule Haule
Ole Ole Ole, Ole Ole Ole
Mujhako Lubhaati Hai Javaaniya Masti Lutaati Zidagaani Yahaan
Maane Na Kahanaa Paagal Mast Pavan Saa Dil Ye Dole
Ole Ole Ole, Ole Ole Ole
Ole Ole Ole, Ole Ole Ole
Jab Bhi Koi Ladaki Dekhun Meraa Dil Divaanaa Bole
Ole Ole Ole, Ole Ole Ole
Gaao Taraanaa Yaaraa Jhum Jhum Ke Haule Haule
Ole Ole Ole, Ole Ole Ole
   */
    ll n,m;
    cin>>n>>m;
    ll ans;
    ans=(n-1)*n/2+(m-1)*m/2;
    cout<<ans<<endl;
    
}
}

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

#include <stdio.h>
int main(){
  
int N;
int M;
int sum;
scanf("%d", &N);
scanf("%d", &M);
if((N=1 && M=1){
sum=0;
  print("%d",sum);
}else if(N=0 && M%2=1){
sum=0;
  print("%d",sum);
}else if(N=0 && M%2=0){
  for(int i=0; i<N-1; i++){
   M*=M-1;
  }
  sum=M/2;
   print("%d",sum);
}else if(M=0){
  for(int i=0; i<N-1; i++){
  N*=N-1;
  }
  sum=N/2;
   print("%d",sum);
}else{
for(int i=0; i<N-1; i++){
  N*=N-1;
  M*=M-1;
}
sum = N/2 + M/2;
printf("%d", sum);
}

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:13: error: lvalue required as left operand of assignment
    9 | if((N=1 && M=1){
      |             ^
main.c:9:16: error: expected ')' before '{' token
    9 | if((N=1 && M=1){
      |   ~            ^
      |                )
main.c:37:1: error: expected expression before '}' token
   37 | }
      | ^
Language: C++

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

int main()
{
	int i,x,m,n;
	int a[100];	
	int b[100];
	
    for(i=a[0];i<=a[100];i++)
    {
	    if(a[n]==' '){
	    return 0;
	    cout<<m;}
	    else{
	    scanf("%d", &i);
        break;}
    }
    for(x=b[0];x<=b[100];x++)
    {
        if(b[n]==' '){
	    return 0;
	    cout<<m;}
	    else{
	    scanf("%d", &x);
        break;}
    }
    int s=i+x;
    if(s%2==0)
    m++;
    else
    m+0;
	cout<<m;
    }   
    return 0;
}

Compiler output:
a.cc:35:5: error: expected unqualified-id before 'return'
   35 |     return 0;
      |     ^~~~~~
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M,r;
  
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
    r=2;
     
  cout << combination(N,r)+combination(N,r) << endl;
  }
  else if(N>=2 && M<2){
    r=2;
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    r=2;
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M>=2) {
    
    cout << 0 << endl;}
  }
     


Compiler output:
/usr/bin/ld: /tmp/ccnZ92iP.o: in function `main':
a.cc:(.text+0x53): undefined reference to `combination(int, int)'
/usr/bin/ld: a.cc:(.text+0x64): undefined reference to `combination(int, int)'
/usr/bin/ld: a.cc:(.text+0xb4): undefined reference to `combination(int, int)'
/usr/bin/ld: a.cc:(.text+0x102): undefined reference to `combination(int, int)'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M,r;
  
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
    r=2;
     
  cout << combination(N,r)+combination(N,r) << endl;
  }
  else if(N>=2 && M<2){
    r=2;
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    r=2
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M>=2) {
    
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: expected ';' before 'cout'
   21 |     r=2
      |        ^
      |        ;
......
   24 |     cout << combination(M,r) << endl;}
      |     ~~~~
Language: Java

import java.util.Scanner;


public static void main(String[] xyz)
{
    
              Scanner sc=new Scanner(System.in);
              String s=sc.next();
              int l=s.length();
              int mid=(l-1)/2;
              for(int i=0;i<mid;i++)
              {
                  if(s.charAt(i)==s.charAt(mid-1-i))
                    continue;
                  else
                   {
                     System.out.println("NA");
                     return ;
                     }
               }
            String s2=s.substring(0,mid);
            String s3=s.substring(mid+1,l);
                     if(s2.equals(s3))
                     {
                    	 System.out.println("yes");
                    	 
                     }
                     else
                     {
                    	 System.out.println("NO");
                     }
     }
 


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

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

long long fact(int n)
{
    if (n==0) return 1;
    if (n > 0) return n * fact(n-1);
}

long long comb(int n, int r)
{
    return fact(n) / (fact(r) * fact(n-r));
}

int main()
{
    int n, m;
    cin >>  n >> m;
    int c = 0
    c += comb(n, 2);
    c += comb(m, 2);
    cout << c << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: expected ',' or ';' before 'c'
   20 |     c += comb(n, 2);
      |     ^
a.cc: In function 'long long int fact(int)':
a.cc:8:1: warning: control reaches end of non-void function [-Wreturn-type]
    8 | }
      | ^
Language: C

#include <stdio.h>
int main()
{
char a[256],b[256];
int i,j,s;

scanf("%s",a);
for(i=0;a[i]!=0x00;i++)
{
j=i;
}
for(i=0;i<j;i++)
{
    b[r]=a[n-1-i];
}
r[j]=0;

printf("%s",a);
printf("%s",b);

s=0;
for(i=0;i<j-1;i++)
{
if(a[i]!=b[i] {s++})    
}
if(s)
{

if(s)
{
printf("Yes\n");
else
{
  printf("No\n");
}

}
}
}

Compiler output:
main.c: In function 'main':
main.c:14:7: error: 'r' undeclared (first use in this function)
   14 |     b[r]=a[n-1-i];
      |       ^
main.c:14:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:12: error: 'n' undeclared (first use in this function)
   14 |     b[r]=a[n-1-i];
      |            ^
main.c:24:14: error: expected ')' before '{' token
   24 | if(a[i]!=b[i] {s++})
      |   ~          ^~
      |              )
main.c:25:1: error: expected expression before '}' token
   25 | }
      | ^
main.c:32:1: error: expected '}' before 'else'
   32 | else
      | ^~~~
main.c: At top level:
main.c:39:1: error: expected identifier or '(' before '}' token
   39 | }
      | ^
Language: Java

import java.util.Scanner;

public class quest
{
public static void main(String[] xyz)
{
    
              Scanner sc=new Scanner(System.in);
              String s=sc.next();
              int l=s.length();
              int mid=(l-1)/2;
              for(int i=0;i<mid;i++)
              {
                  if(s.charAt(i)==s.charAt(mid-1-i))
                    continue;
                  else
                   {
                     System.out.println("NA");
                     return ;
                     }
               }
            String s2=s.substring(0,mid);
            String s3=s.substring(mid+1,l);
                     if(s2.equals(s3))
                     {
                    	 System.out.println("yes");
                    	 
                     }
                     else
                     {
                    	 System.out.println("NO");
                     }
     }
 }


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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M;
  
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
    r=2;
     
  cout << combination(N,r)+combination(N,r) << endl;
  }
  else if(N>=2 && M<2){
    r=2;
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    r=2
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M>=2) {
    
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'r' was not declared in this scope
   11 |     r=2;
      |     ^
a.cc:16:5: error: 'r' was not declared in this scope
   16 |     r=2;
      |     ^
a.cc:21:5: error: 'r' was not declared in this scope
   21 |     r=2
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M;
  r=2;
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
     
  cout << combination(N,r)+combination(N,r) << endl;
  }
  else if(N>=2 && M<2){
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M>=2) {
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'r' was not declared in this scope
    7 |   r=2;
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M;
  r==2;
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
     
  cout << combination(N,r)+combination(N,r) << endl;
  }
  else if(N>=2 && M<2){
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M>=2) {
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'r' was not declared in this scope
    7 |   r==2;
      |   ^
Language: C

#include<stdio.h>
int main()
{
  int N,M,A,B;
  scanf("%d %d", N, M);
  A = (N*N - N)/2
  B = (M*M - M)/2
  printf("%d\n", A + B );
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:18: error: expected ';' before 'B'
    6 |   A = (N*N - N)/2
      |                  ^
      |                  ;
    7 |   B = (M*M - M)/2
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M;
  r==2;
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
     
  cout << combination(N,r)+combination(N,r) << endl;
  }
  else if(N>=2 && M<2){
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M>=2) {
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'r' was not declared in this scope
    7 |   r==2;
      |   ^
Language: Java


import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        Scanner scn  = new Scanner(System.in);
        System.out.println(even_pairs(scn.nextInt(),scn.nextInt()));
    }
    static int even_pairs(int n, int m){
        return combinationOfTwo(n) + combinationOfTwo(m);
    }
    static  int factorial (int n){
        int nn =n;
        if(n == 0){
            return 1;
        }
        for(int i = 1; i < n; i++){
            nn *= i;
        }
        return  nn;
    }
    static int  combinationOfTwo(int n){
        return factorial(n)/(factorial(n-2)*factorial(2));

    }
}
// 2 4 6 8 10 12 


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

#include <stdio.h>
int even(int);

int main(){
  int n,m;
  scanf("%d %d",&n,&m);
  if(m>2){
    printf("%d",even()+m);
  }
  else if(m==1 && n==1)
  {
    printf("%d",0);
  }
  else if(n==0){
    printf("%d",m);
  }
  else{
    printf(" ");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: too few arguments to function 'even'
    8 |     printf("%d",even()+m);
      |                 ^~~~
main.c:2:5: note: declared here
    2 | int even(int);
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int combination(int N,int r);
  int combination(int M,int r);
  int N,M;
  r=2;
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
     
  cout << combination(N,r)+combination(N,r) << endl;
  }
  else if(N>=2 && M<2){
    
    
    cout << combination(N,r) << endl;}
  else if (N<2 && M>=2) {
    
    
    cout << combination(M,r) << endl;}
  else if (N<2 && M>=2) {
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'r' was not declared in this scope
    7 |   r=2;
      |   ^
Language: C

#include <stdio.h>
int even(int);

int main(){
  int n,m;
  scanf("%d %d",&n,&m);
  if(m>2){
    printf("%d",even()+m);
  }
  else if(m=1 && n=1)
  {
    printf("%d",0);
  }
  else if(n=0){
    printf("%d",m);
  }
  else{
    printf(" ");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: too few arguments to function 'even'
    8 |     printf("%d",even()+m);
      |                 ^~~~
main.c:2:5: note: declared here
    2 | int even(int);
      |     ^~~~
main.c:10:19: error: lvalue required as left operand of assignment
   10 |   else if(m=1 && n=1)
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int combination(int N,int 2);
  int combination(int M,int 2);
  int N,M;
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
     
  cout << combination(N,2)+combination(N,2) << endl;
  }
  else if(N>=2 && M<2){
    
    
    cout << combination(N,2) << endl;}
  else if (N<2 && M>=2) {
    
    
    cout << combination(M,2) << endl;}
  else if (N<2 && M>=2) {
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:4:29: error: expected ',' or '...' before numeric constant
    4 |   int combination(int N,int 2);
      |                             ^
a.cc:5:29: error: expected ',' or '...' before numeric constant
    5 |   int combination(int M,int 2);
      |                             ^
Language: C++

#include<iostream>
#include<cstdio>
#include <string.h>
using namespace std;

int main() {
    int a, b, c, d, e, f, g, h;
    cin >> a >> b;
    if (a ==0 || b ==0) {
        cout << 0;
    }
    else {
        if (a = 1 || b = 1) {
            cout << 0;
        }
        else {
            d = a * (a - 1);
            f = d / 2;
            e = b * (b - 1);
            g = e / 2;
            h = f + g;
            cout << h;
        }
    }
}

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

#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int combination(int N,2);
  int combination(int M,2);
  int N,M;
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
     
  cout << combination(N,2)+combination(N,2) << endl;
  }
  else if(N>=2 && M<2){
    
    
    cout << combination(N,2) << endl;}
  else if (N<2 && M>=2) {
    
    
    cout << combination(M,) << endl;}
  else if (N<2 && M>=2) {
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:4:25: error: expected identifier before numeric constant
    4 |   int combination(int N,2);
      |                         ^
a.cc:4:25: error: expected ',' or '...' before numeric constant
a.cc:5:25: error: expected identifier before numeric constant
    5 |   int combination(int M,2);
      |                         ^
a.cc:5:25: error: expected ',' or '...' before numeric constant
a.cc:20:27: error: expected primary-expression before ')' token
   20 |     cout << combination(M,) << endl;}
      |                           ^
Language: Java

import java.util.*;
import java.lang.*;
class Solution{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int m=sc.nextInt();
    int a[]=new int[100];
    a[0]=0;
    a[1]=0;
   
    int l=3;
    for(int i=2;i<100;i++){
      a[i]=a[i-1]+l;
      l=l+1;
    }
    if(n==1&&m==1){
      System.out.println("0");
    }
    else if(n==2&&m==1||n==1&&m==2){
      System.out.println("1");
    }
    else{
      int p=0,q=0;
      if(n>2){
        p=a[n-1];
    }
      if(m>2){
        q=a[m-1];
      }
      int k=0;
      k=p+q;
      System.out.println(k);
  }
    
}

Compiler output:
Main.java:36: error: reached end of file while parsing
}
 ^
1 error
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
int factorial(int n) { //階乗
  int ans = 0;
  int ansa = 1;
  int answ = 1;
  for(int i = 1; i <= n; i++) {
    ansa *= i;
  }
   for(int i = 1; i <= n-2; i++) {
    answ *= i;
  }
  
  ans = ansa /(2 * answ); 
  return ans;
}
    int main() {
      int N = 0; //偶数の数
      int M = 0; //奇数の数
      int count1 = 0;
      int count2 = 0;
      cin >> N >> M;
      
      if(N != 0 && N != 1 && N != 2){
      count1 = factorial(N)
       }
      
      else if(N == 2){
        count1 = 1;
      }
      
      else{
        count1 = 0;
      }
      
      if(M != 0 && M != 1 && M != 2){
        count2 = factorial(M)
      }
      
      else if(M == 2){
        count2 = 1;
      }
      
      else{
        count2 = 0;
      }
      
      cout << count1 + count2 << endl;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:26:28: error: expected ';' before '}' token
   26 |       count1 = factorial(N)
      |                            ^
      |                            ;
   27 |        }
      |        ~                    
a.cc:38:30: error: expected ';' before '}' token
   38 |         count2 = factorial(M)
      |                              ^
      |                              ;
   39 |       }
      |       ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
signed main(){
  int n,m,sum=0;
  cin>>n>>m;
  for(int i=1;i<n;i++){
    sum+=i;
  }
  for(int j=1;j<m;j++){
    sum+=i;
  }
  cout<<sum<<"\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'i' was not declared in this scope
   10 |     sum+=i;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int combination(int a,int b);
  int combination(int c,int b);
  int N,M;
  cin >> N >> M;
  
  if(N>=2 && M>=2) {
    a==N;
    b==2;
    c==M;  
  cout << combination(a,b)+combination(c,b) << endl;
  }
  else if(N>=2 && M<2){
    a==N;
    b==2;
    
    cout << combination(a,b) << endl;}
  else if (N<2 && M>=2) {
    
    b==2;
    c==M;
    cout << combination(c,b) << endl;}
  else if (N<2 && M>=2) {
    cout << 0 << endl;}
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'a' was not declared in this scope
   10 |     a==N;
      |     ^
a.cc:11:5: error: 'b' was not declared in this scope
   11 |     b==2;
      |     ^
a.cc:12:5: error: 'c' was not declared in this scope
   12 |     c==M;
      |     ^
a.cc:16:5: error: 'a' was not declared in this scope
   16 |     a==N;
      |     ^
a.cc:17:5: error: 'b' was not declared in this scope
   17 |     b==2;
      |     ^
a.cc:22:5: error: 'b' was not declared in this scope
   22 |     b==2;
      |     ^
a.cc:23:5: error: 'c' was not declared in this scope
   23 |     c==M;
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int p,q,r;
  int N,M;
  while(
    pritf("N Mを入力してください"),
    scanf("%d%d", &N,&M)==2)
    {
    
    
  
  if(N>=2 && M>=2) {
    n==N;
    q==M;
    r==2;
    
   
  printf(combination(n,r)+combination(q,r));
    
  }
  else if(N>=2 && M<2){
    p==N;
    r==2;
    
    printf(combination(p,r));
  else if (N<2 && M>=2) {
    
    r==2;
    q==M;
    printf( combination(q,r) );
  else if (N<2 && M>=2) {
    printf(0);
    return 0;
  }
     


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'pritf' was not declared in this scope; did you mean 'printf'?
    7 |     pritf("N Mを入力してください"),
      |     ^~~~~
      |     printf
a.cc:14:5: error: 'n' was not declared in this scope
   14 |     n==N;
      |     ^
a.cc:19:10: error: 'combination' was not declared in this scope
   19 |   printf(combination(n,r)+combination(q,r));
      |          ^~~~~~~~~~~
a.cc:26:12: error: 'combination' was not declared in this scope
   26 |     printf(combination(p,r));
      |            ^~~~~~~~~~~
a.cc:27:3: error: expected '}' before 'else'
   27 |   else if (N<2 && M>=2) {
      |   ^~~~
a.cc:22:23: note: to match this '{'
   22 |   else if(N>=2 && M<2){
      |                       ^
a.cc:31:13: error: 'combination' was not declared in this scope
   31 |     printf( combination(q,r) );
      |             ^~~~~~~~~~~
a.cc:32:3: error: expected '}' before 'else'
   32 |   else if (N<2 && M>=2) {
      |   ^~~~
a.cc:27:25: note: to match this '{'
   27 |   else if (N<2 && M>=2) {
      |                         ^
a.cc:35:4: error: expected '}' at end of input
   35 |   }
      |    ^
a.cc:9:5: note: to match this '{'
    9 |     {
      |     ^
a.cc:35:4: error: expected '}' at end of input
   35 |   }
      |    ^
a.cc:3:16: note: to match this '{'
    3 | int main(void) {
      |                ^
Language: C++

N=int(input())
A=list(map(int,input().split()))
for (int k=0;k<=N;k++){
	s=0
	for (int i=0;i<=N;i++){
		for (int j=i+1;j<=N;g++){
			if (i!=k and j!=k){
				if (A[i]==A[j]){
					s=s+1
                }
            }
        }
	print(s)
}

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N=int(input())
      | ^
a.cc:3:14: error: 'k' does not name a type
    3 | for (int k=0;k<=N;k++){
      |              ^
a.cc:3:19: error: 'k' does not name a type
    3 | for (int k=0;k<=N;k++){
      |                   ^
Language: C++

#include<bits/stdc++.h>
typedef long long int ll;
int combination(int n,int k)
{
  ll ans=1;
  for(int i=0;i<k;++i)
  {
    ans*=(n-i);
    ans/=(i+1);
    return ans;
  }
  int main()
  {
    int N,M;
    ll res;
    cin>>N>>M;
    if(N>=2 && M>=2)
    res=combination(N,2)+combination(M,2);
    else if(N>=2 && M<2)
      res=combinatiom(N,2);
    else if(M>=2 && N<2)
      res=combination(M,2);
    else if(M<2 && N<2)
      res=0;
    cout<<res;
    return 0;
  }
      
    
    

Compiler output:
a.cc: In function 'int combination(int, int)':
a.cc:12:11: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   12 |   int main()
      |           ^~
a.cc:12:11: note: remove parentheses to default-initialize a variable
   12 |   int main()
      |           ^~
      |           --
a.cc:12:11: note: or replace parentheses with braces to value-initialize a variable
a.cc:13:3: error: a function-definition is not allowed here before '{' token
   13 |   {
      |   ^
a.cc:27:4: error: expected '}' at end of input
   27 |   }
      |    ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
a.cc:27:4: warning: control reaches end of non-void function [-Wreturn-type]
   27 |   }
      |    ^
Language: C++

/*
我的心脏怦怦跳，监管者就在附近
name:
Algorithm:
writer:Lxs(cdx)
place:
nothing is impossible
*/
#pragma GCC optimize(3,"Ofast","inline")
#include<bits/stdc++.h>
#include<string>
#include<iostream>
#include<cmath>
#include<set>
#include<stack>
#include<queue>
#include<unistd.h>
#include<stdio.h>
#include<cstring>
#define random(a,b) (rand()%(b-a+1)+a)
using namespace std;
bool prime(int x){
	 int i;
	 if(x<2) return 0;
	 for(i=2;i*i<=x;i++){
		if(x%i==0){return 0;}
	 }
	 return 1;
}
int n,a[10101],b[10101],s;
void dfs(int b,int e,int p){
	int i;
	if(p>2){
		if(b[a[1]]+b[a[2]]%2==0){
			s++;
		}
	}
	else{
		for(i=b;i<=e;i++){
			a[p]=i;
			dfs(i+1,n,p+1);
		}
	}
}
int main()
{
	int a1,b1;
	cin>>a1>>b1;
	for(int i=1;i<=a1;i++){
		b[i]=0;
	}
	for(int i=a1+1;i<=a1+1+b1;i++){
		b[i]=1;
	}
	dfs(1,a1+b1,1);
	cout<<s<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'void dfs(int, int, int)':
a.cc:34:21: error: invalid types 'int[int]' for array subscript
   34 |                 if(b[a[1]]+b[a[2]]%2==0){
      |                     ^
a.cc:34:29: error: invalid types 'int[int]' for array subscript
   34 |                 if(b[a[1]]+b[a[2]]%2==0){
      |                             ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected nested-name-specifier before 'fa'
    9 |         using fa(10);
      |               ^~