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

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


Compiler output:
main.c: In function 'main':
main.c:8:23: error: expected ';' before '}' token
    8 |     printf("%d",d+s);1
      |                       ^
      |                       ;
    9 | }
      | ~
Language: C++

#include<iostream>
#inlcude<cmath>
int fact(int n)
{
    int res = 1;
    for (int i = 2; i <= n; i++)
        res = res * i;
    return res;
}

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

int main(){
    int n, m;
    cin >> n >> m;
    cout << nCr(n,2)+nCr(m,2) << le;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<cmath>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:19:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   19 |     cin >> n >> m;
      |     ^~~
      |     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:20:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |     cout << nCr(n,2)+nCr(m,2) << le;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:34: error: 'le' was not declared in this scope
   20 |     cout << nCr(n,2)+nCr(m,2) << le;
      |                                  ^~
Language: C++

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

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

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

import java.util.Scanner;

public class MyClass {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(), m = in.nextInt();
      int ans = (n*n-n+m*m-m)/2;
      System.out.println(ans);
    }
}

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

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define F(i,a,n) for(int i=a; i<n; i++)

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:10:40: error: expected ')' before ';' token
   10 |   printf("%d\n",(n*(n-1))/2+(m*(m-1)/2);
      |         ~                              ^
      |                                        )
main.c:11:12: error: expected ';' before '}' token
   11 |   return 0;
      |            ^
      |            ;
   12 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int 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:22: error: 'M' cannot be used as a function
    8 |   cout << N*(N-1)/2+M(M-1)/2 << endl;
      |                     ~^~~~~
Language: C++

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i,n)        for(int i=0; i<(int)(n); ++i)
int main() {
  int a,b,c=0,d=0;
  cin>>a>>b;4
    rep(i,a){
    c+=i;
  } 
  rep(i,b){
    d+=i;
  }
  cout<<c+d;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'for'
    7 |   cin>>a>>b;4
      |              ^
      |              ;
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i,a){
      |         ^
a.cc:4:38: note: in definition of macro 'rep'
    4 | #define rep(i,n)        for(int i=0; i<(int)(n); ++i)
      |                                      ^
Language: C++

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

void comb(vector<vector <long long int> > &v){
  for(int i = 0;i <v.size(); i++){
    v[i][0]=1;
    v[i][i]=1;
  }
  for(int k = 1;k <v.size();k++){
    for(int j = 1;j<k;j++){
      v[k][j]=(v[k-1][j-1]+v[k-1][j]);
    }
  }
}

int main(){
    int N, M;
    cin >> N >> M;
    int a = comb(N, 2), b = comb(M, 2);
    cout << a + b << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: invalid initialization of reference of type 'std::vector<std::vector<long long int> >&' from expression of type 'int'
   19 |     int a = comb(N, 2), b = comb(M, 2);
      |                  ^
a.cc:4:44: note: in passing argument 1 of 'void comb(std::vector<std::vector<long long int> >&)'
    4 | void comb(vector<vector <long long int> > &v){
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
a.cc:20:17: error: 'b' was not declared in this scope
   20 |     cout << a + b << endl;
      |                 ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected ';' before ':' token
   15 |     count += 0:
      |               ^
      |               ;
Language: C++

#include<bits/stdc++.h>
//author::@whohet-->Het Patel
using namespace std;
unsigned long long int fact(unsigned long long int n); 
  
unsigned long long int nCr(unsigned long long int n, unsigned long long int r) 
{ 
    return fact(n) / (fact(r) * fact(n - r)); 
} 
  
// Returns factorial of n 
unsigned long long int fact(int n) 
{ 
    unsigned long long  int res = 1; 
    for (unsigned long long int i = 2; i <= n; i++) 
        res = res * i; 
    return res; 
} 
int main()
{
	unsigned long long int n,m;
	cin>>n>>m;
	cout<<nCr(n,2)+nCr(m,2)<<endl;
	
	return 0;
}


Compiler output:
/usr/bin/ld: /tmp/cc6c2U6p.o: in function `nCr(unsigned long long, unsigned long long)':
a.cc:(.text+0x1b): undefined reference to `fact(unsigned long long)'
/usr/bin/ld: a.cc:(.text+0x2a): undefined reference to `fact(unsigned long long)'
/usr/bin/ld: a.cc:(.text+0x3d): undefined reference to `fact(unsigned long long)'
collect2: error: ld returned 1 exit status
Language: C

from math import factorial
def ncr(n, r):
    return factorial(n) // factorial(r) // factorial(n - r)

n,m = map(int, input().split())

# n = int(input())

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

if m < 2 :
    if n < 2:
        print(0)
    else:
        print(ncr(n,2))
else:
    if n < 2:
        print(ncr(m,2))
    else:
        print(ncr(n,2)+ncr(m,2))



Compiler output:
main.c:1:1: error: unknown type name 'from'
    1 | from math import factorial
      | ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    1 | from math import factorial
      |           ^~~~~~
main.c:1:11: error: unknown type name 'import'
main.c:7:3: error: invalid preprocessing directive #n
    7 | # n = int(input())
      |   ^
main.c:9:3: error: invalid preprocessing directive #a
    9 | # a = list(map(int, input().split()))
      |   ^
Language: C++

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

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


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

#include<bits/stdc++.h>
int fact(int n)
{
    int res = 1;
    for (int i = 2; i <= n; i++)
        res = res * i;
    return res;
}

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

int main(){
    int n, m;
    cin >> n >> m;
    cout << nCr(n,2)+nCr(m,2) << le;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   18 |     cin >> n >> m;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |     cout << nCr(n,2)+nCr(m,2) << le;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:34: error: 'le' was not declared in this scope
   19 |     cout << nCr(n,2)+nCr(m,2) << le;
      |                                  ^~
Language: C++

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main() {
  int a,b,c=0,d=0;
  cin>>a>>b;4
    rep(i,a){
    c+=i;
  } 
  rep(i,b){
    d+=i;
  }
  cout<<c+d;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before 'for'
    7 |   cin>>a>>b;4
      |              ^
      |              ;
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i,a){
      |         ^
a.cc:4:39: note: in definition of macro 'rep'
    4 | #define rep(i, n)        for(int i=0; i<(int)(n); ++i)
      |                                       ^
Language: Java

import java.util.Scanner;
public class  Main

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);

		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		
		
		//偶＋偶
		//奇＋奇
		
		int cnt = 0;
		
		cnt += (n*(n-1))/2;
		cnt += (m*(m-1))/2;

		System.out.println(cnt);


	}

}


Compiler output:
Main.java:2: error: '{' expected
public class  Main
                  ^
Main.java:4: 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)
Main.java:24: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

int combi(int n, int k) {
  if (n == k || k == 0 || n==0)
    return 1;
  else {
    return combi(n - 1, k - 1) + combi(n - 1, k);
  }
}
int main() {

  int N,M;
  cin>>N>>M;
  //vector<int> A(N);
  //for(int i=0; i<N; i++){cin>>A[i];}
  //vector<vector<int>> A(N,vector<int>(M));
  //for(int i=0; i<N; i++){for(int j=0; j<M; j++){cin>>A[i][j];}}
  //sort(A.begin(),A.end());
  //for (int i = 0; i < N; i++) { maximum = max(maximum , A[i]);}
  //for (int i = 0; i < N; i++) { minimum = min(minimum , A[i]);}
  cout << combi(N,2)+combi(M,2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin>>N>>M;
      |   ^~~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << combi(N,2)+combi(M,2) << endl;
      |   ^~~~
a.cc:19:36: error: 'endl' was not declared in this scope
   19 |   cout << combi(N,2)+combi(M,2) << endl;
      |                                    ^~~~
Language: C++

#include <bits/sdtc++.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:1:10: fatal error: bits/sdtc++.h: No such file or directory
    1 | #include <bits/sdtc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int n, m;

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

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

n, m = map(int, input().split())
if m == 0:
    print(n*(n-1)//2)
elif n == 0:
    print(m*(m-1)//2)
else:
    print((m*(m-1) + n*(n-1))//2)

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll n,m;
      |   ^~
a.cc:6:9: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |    cin>>n>>m;
      |         ^
      |         yn
a.cc:6:12: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |    cin>>n>>m;
      |            ^
      |            tm
a.cc:7:5: error: expected ';' before 'val'
    7 |   ll val  = (n*(n-1))/2+(m*(m-1))/2;
      |     ^~~~
      |     ;
a.cc:8:9: error: 'val' was not declared in this scope
    8 |   cout<<val<<endl;
      |         ^~~
Language: Java

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <array>
using namespace std;

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



Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <cstdio>
^
Main.java:3: error: illegal character: '#'
#include <vector>
^
Main.java:4: error: illegal character: '#'
#include <algorithm>
^
Main.java:5: error: illegal character: '#'
#include <array>
^
Main.java:10: error: not a statement
    cin >> n >> m;
             ^
Main.java:18: error: not a statement
    cout << ans <<endl;
                ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
8 errors
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep2(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define FOR(i) for(cin>>i;i>0;i--)
#define elif else if
#define pb push_back
#define ll long long
#define mp make_pair
#define all(x) x.begin(),x.end()
#define re(x) {cout<<x<<endl;return 0;}
//#define x first
//#define y second

using namespace std;
int n,m;
int main()
{
	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:19:26: error: 'm' cannot be used as a function
   19 |         cout<<n*(n-1)/2+m(m-1)/2<<endl;
      |                         ~^~~~~
Language: C++

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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

#define INF             1e9
#define INFL            8e18
#define XX              first
#define YY              second
#define PB              push_back
#define MP              make_pair

#define NEWLINE         cerr << "\n";
#define HOISE           cerr << "hoise " << __LINE__ << "\n"
#define PAUSE           system("pause")
#define DEBUG(x)        cerr << #x << " = " << x << "\n"
#define READ            freopen("D:\\moidda CPP\\alu.txt", "r", stdin)
#define WRITE           freopen("D:\\moidda CPP\\vorta.txt", "w", stdout)
#define FASTIO          ios_base::sync_with_stdio(false);cin.tie(NULL)
#define MASK(x)         for(int i = 0; i < 8; i++){ if(x&(1<<i)){ cout << i << " "; } } cout << endl;

typedef long long ll;
typedef pair<int, int > pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pff;

const int MAX = 3e5 + 2;
const int MAXLOG = log2(MAX) + 2;
const int MAXN = 1e6 + 2;
const int MOD = 998244353;
const double PY = acos(-1.0);
const double EPS = 1E-9;


int32_t main()
{
//#ifndef ONLINE_JUDGE
//    READ;
//    WRITE;
//#endif

    FASTIO;

    int n, m;
    cin >> n >> m;

    ll x = 1LL*(n*(n-1))/2 + 1LL*(m*(m-1))/2
    cout << x;

    return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:51:5: error: expected ',' or ';' before 'cout'
   51 |     cout << x;
      |     ^~~~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include<iostream>
#include<algorithm>//next_permutation
#include <conio.h>
#include <cmath>

using namespace std;

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


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>n>>m;
      |   ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<ans;
      |   ^~~~
Language: Java

import java.util.*;

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

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

    int ans = (N * N + M * M - N - M) / 2;

    System.out.println(ans);
  }
}


Compiler output:
Main.java:10: error: cannot find symbol
    int ans = (N * N + M * M - N - M) / 2;
               ^
  symbol:   variable N
  location: class Main
Main.java:10: error: cannot find symbol
    int ans = (N * N + M * M - N - M) / 2;
                   ^
  symbol:   variable N
  location: class Main
Main.java:10: error: cannot find symbol
    int ans = (N * N + M * M - N - M) / 2;
                       ^
  symbol:   variable M
  location: class Main
Main.java:10: error: cannot find symbol
    int ans = (N * N + M * M - N - M) / 2;
                           ^
  symbol:   variable M
  location: class Main
Main.java:10: error: cannot find symbol
    int ans = (N * N + M * M - N - M) / 2;
                               ^
  symbol:   variable N
  location: class Main
Main.java:10: error: cannot find symbol
    int ans = (N * N + M * M - N - M) / 2;
                                   ^
  symbol:   variable M
  location: class Main
6 errors
Language: C++

ll p=998244353;
ll fac[2000001]; 
ll power(ll x, ll y, ll p=998244353 ) 
{ 
    ll res = 1;    
  
    x = x % p; 
  
    while (y > 0) 
    { 
        
        if (y & 1) 
            res = (res*x) % p; 
  
     
        y = y>>1; // y = y/2 
        x = (x*x) % p; 
    } 
    return res; 
} 
  

ll modInverse(ll n, ll p=998244353 ) 
{ 
    return power(n, p-2, p); 
} 
ll ncr(ll n,ll r, ll p=998244353 ) 
{ 
   // Base case 
   if (r==0||r==n) 
      return 1; 
      
  
    // Fill factorial array so that we 
    // can find all factorial of r, n 
    // and n-r 
    return (fac[n]* modInverse(fac[r], p) % p * 
            modInverse(fac[n-r], p) % p) % p; 
}

void fillfac()
{

 fac[0] = 1; 
    for (ll i=1 ; i<2000001; i++) 
        fac[i] = fac[i-1]*i%p; 
}
int main()
{
  fillfac();
  int n,m;
  cin>n>>m;
  cout<< ncr(n,2)+ncr(m,2)<<endl;
}

Compiler output:
a.cc:1:1: error: 'll' does not name a type
    1 | ll p=998244353;
      | ^~
a.cc:2:1: error: 'll' does not name a type
    2 | ll fac[2000001];
      | ^~
a.cc:3:1: error: 'll' does not name a type
    3 | ll power(ll x, ll y, ll p=998244353 )
      | ^~
a.cc:23:1: error: 'll' does not name a type
   23 | ll modInverse(ll n, ll p=998244353 )
      | ^~
a.cc:27:1: error: 'll' does not name a type
   27 | ll ncr(ll n,ll r, ll p=998244353 )
      | ^~
a.cc: In function 'void fillfac()':
a.cc:44:2: error: 'fac' was not declared in this scope
   44 |  fac[0] = 1;
      |  ^~~
a.cc:45:10: error: 'll' was not declared in this scope
   45 |     for (ll i=1 ; i<2000001; i++)
      |          ^~
a.cc:45:19: error: 'i' was not declared in this scope
   45 |     for (ll i=1 ; i<2000001; i++)
      |                   ^
a.cc:46:29: error: 'p' was not declared in this scope
   46 |         fac[i] = fac[i-1]*i%p;
      |                             ^
a.cc: In function 'int main()':
a.cc:52:3: error: 'cin' was not declared in this scope
   52 |   cin>n>>m;
      |   ^~~
a.cc:53:3: error: 'cout' was not declared in this scope
   53 |   cout<< ncr(n,2)+ncr(m,2)<<endl;
      |   ^~~~
a.cc:53:10: error: 'ncr' was not declared in this scope
   53 |   cout<< ncr(n,2)+ncr(m,2)<<endl;
      |          ^~~
a.cc:53:29: error: 'endl' was not declared in this scope
   53 |   cout<< ncr(n,2)+ncr(m,2)<<endl;
      |                             ^~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <cmath>
#include <utility>
#include <map>
#include <unordered_map>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
typedef long long int ll;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected primary-expression before '{' token
   19 |   cout<<{N*(N-1)+M*(M-1)}/2<<endl;
      |         ^
a.cc:19:26: error: expected primary-expression before '/' token
   19 |   cout<<{N*(N-1)+M*(M-1)}/2<<endl;
      |                          ^
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
int n,m;
  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:9:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   ans=n*(n-1)/2+m*(m-1)/2;
      |   ^~~
      |   abs
Language: Java


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Solution{
    public static void main(String[] args){
        try{
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

                String[] ss=br.readLine().split(" ");
               int n=Integer.parseInt(ss[0]);
               int m=Integer.parseInt(ss[1]);
               System.out.println((n*(n-1))/2 + m*(m-1)/2);



        }catch(Exception e){
            System.out.println("kkkk");
        }
    }
    static class pair{
        int a,b;
        public pair(int a,int b){
            this.a=a;
            this.b=b;
        }
    }
}

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

import java.awt.*;
import java.io.*;
import java.util.*;

public class Abc {
    public static void main(String[] args) throws Exception {
        FastReader sc = new FastReader();
        int n=sc.nextInt(),m=sc.nextInt();
        int x=n+m;
        System.out.println((n*(n-1)/2)+(m*(m-1)/2));
    }
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define intput(i) cout << i << endl
#define ll long long
#define stringput(s) cout << (string)(s) << endl

ll com(int n,int r){
  if(r == 0) return 1;
  else return (n-r+1)*com(n,r-1)/r;
}


int main(){
  cout << com(N,2) + com(M,2) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'N' was not declared in this scope
   15 |   cout << com(N,2) + com(M,2) << endl;
      |               ^
a.cc:15:26: error: 'M' was not declared in this scope
   15 |   cout << com(N,2) + com(M,2) << endl;
      |                          ^
Language: C++

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

void solve() 
{
 int n,m;cin>>n>>m;
 cout<<n*(n-1)/2+m*(m-1)/2<<e
}

int main()
{
    cin.tie(0);
	ios::sync_with_stdio(false);
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:10:29: error: 'e' was not declared in this scope
   10 |  cout<<n*(n-1)/2+m*(m-1)/2<<e
      |                             ^
Language: C++

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

#define rep(i, N) for (int i = 0; i < N; i++)
#define rep1(i, N) for (int i = 1; i <= N; i++)
const int intinf = numeric_limits<int>::max();

using ll = long long int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

#define MOD 1000000007

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

int main()
{
    solve();
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define rep(i, N) for (int i = 0; i < N; i++)
#define rep1(i, N) for (int i = 1; i <= N; i++)
const int intinf = numeric_limits<int>::max();

using ll = long long int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

#define MOD 1000000007

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

int main()
{
    solve();
    return 0;
}


Compiler output:
a.cc:31:11: error: redefinition of 'const int intinf'
   31 | const int intinf = numeric_limits<int>::max();
      |           ^~~~~~
a.cc:6:11: note: 'const int intinf' previously defined here
    6 | const int intinf = numeric_limits<int>::max();
      |           ^~~~~~
a.cc:39:6: error: redefinition of 'void solve()'
   39 | void solve()
      |      ^~~~~
a.cc:14:6: note: 'void solve()' previously defined here
   14 | void solve()
      |      ^~~~~
a.cc:46:5: error: redefinition of 'int main()'
   46 | int main()
      |     ^~~~
a.cc:21:5: note: 'int main()' previously defined here
   21 | int main()
      |     ^~~~
Language: C++

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

#define sfor(i,a,n) for(int i=a;i<n;i++)
#define efor(i,a,n) for(int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define t int tc; cin>>tc; while(tc--)
#define ll long long
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define fordobule(alphavec,n,m) for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) cout << alphavec[i][j] << " \n"[j == (m-1)];
#define sortreverse(krdesort) sort(begin(krdesort), end(krdesort), [] (int a, int b) { return a > b; });
const ll mod=1000000007;
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
template <class T> inline void writeInt( T x, char end = 0 );
inline void writeChar( int x ); 
inline void writeWord( const char *s );

/*█▀▀▄░░░░░░░░░░░▄▀▀█
░█░░░▀▄░▄▄▄▄▄░▄▀░░░█
░░▀▄░░░▀░░░░░▀░░░▄▀
░░░░▌░▄▄░░░▄▄░▐▀▀
░░░▐░░█▄░░░▄█░░▌▄▄▀▀▀▀█
░░░▌▄▄▀▀░▄░▀▀▄▄▐░░░░░░█
▄▀▀▐▀▀░▄▄▄▄▄░▀▀▌▄▄▄░░░█
█░░░▀▄░█░░░█░▄▀░░░░█▀▀▀
░▀▄░░▀░░▀▀▀░░▀░░░▄█▀
░░░█░░░░░░░░░░░▄▀▄░▀▄
░░░█░░░░░░░░░▄▀█░░█░░█
░░░█░░░░░░░░░░░█▄█░░▄▀
░░░█░░░░░░░░░░░████▀
░░░▀█▄▄▄▀▀▀▀▄▄▄█▀*/


long long int read_int(){
	char r;
	bool start=false,neg=false;
	long long int ret=0;
	while(true){
		r=getchar();
		if((r-'0'<0 || r-'0'>9) && r!='-' && !start){
			continue;
		}
		if((r-'0'<0 || r-'0'>9) && r!='-' && start){
			break;
		}
		if(start)ret*=10;
		start=true;
		if(r=='-')neg=true;
		else ret+=r-'0';
	}
	if(!neg)
		return ret;
	else
		return -ret;
}

int solve(){
    
    return 0;
}
int32_t main(){
    static const int _ = []() {
        ios::sync_with_stdio(false);
        cin.tie(NULL);
        cout.tie(NULL);
        return 0;
    }();
    int n;
    vector<int> vec;
    //idhar dekho idhar
    int n,m;
    cin>>n>>m;
    if(n>1){
        ans= n*(n-1)/2;
    }
    if(m>1){
        ans+=(m*(m-1))/2;
    }
    
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:78:9: error: redeclaration of 'int n'
   78 |     int n,m;
      |         ^
a.cc:75:9: note: 'int n' previously declared here
   75 |     int n;
      |         ^
a.cc:81:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   81 |         ans= n*(n-1)/2;
      |         ^~~
      |         abs
a.cc:84:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   84 |         ans+=(m*(m-1))/2;
      |         ^~~
      |         abs
a.cc:87:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   87 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

v#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)

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

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> n >> m;
      |     ^~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << ans << endl;
      |     ^~~~
a.cc:12:20: error: 'endl' was not declared in this scope
   12 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <queue>
#include <stack>
#include <deque>
#include <algorithm>
#include <functional>
#include <cmath>
#include <map>
#include <iomanip>
using namespace std;

int main()
{
    int numa, numb;
    cin >> numa >> numb;
    cout << (numa*(numa-1))/2+(numb*(numb-1))/2 << endl;
    return 0;
}#include <iostream>
#include <string>
#include <vector>
#include <array>
#include <queue>
#include <stack>
#include <deque>
#include <algorithm>
#include <functional>
#include <cmath>
#include <map>
#include <iomanip>
using namespace std;

int main()
{
    int numa, numb;
    cin >> numa >> numb;
    cout << (numa*(numa-1))/2+(numb*(numb-1))/2 << endl;
    return 0;
}

Compiler output:
a.cc:21:2: error: stray '#' in program
   21 | }#include <iostream>
      |  ^
a.cc:21:3: error: 'include' does not name a type
   21 | }#include <iostream>
      |   ^~~~~~~
a.cc:35:5: error: redefinition of 'int main()'
   35 | int main()
      |     ^~~~
a.cc:15:5: note: 'int main()' previously defined here
   15 | int main()
      |     ^~~~
Language: C++

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Akash
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ATheNumberOfEvenPairs solver = new ATheNumberOfEvenPairs();
        solver.solve(1, in, out);
        out.close();
    }

    static class ATheNumberOfEvenPairs {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int result = (n * (n - 1) / 2) + (m * (m - 1) / 2);
            out.println(result);
        }

    }
}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.OutputStream;
      | ^~~~~~
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.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStream;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.Scanner;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:13:1: error: expected unqualified-id before 'public'
   13 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef pair <int,int> ii;
typedef long long LL;
#define pb push_back
const int INF = 2147483647;
const int N = 500005;

int n, m, res;

int main() {
scanf("%d %d", &n, &m);
res = n * (n - 1) / 2 + m * (m - 1) / 2;
printf("%d\n", res);
return 0;
}



#include <bits/stdc++.h>
using namespace std;
typedef vector<int> VI;
typedef pair <int,int> ii;
typedef long long LL;
#define pb push_back
const int INF = 2147483647;
const int N = 500005;

int n, m, res;

int main() {
scanf("%d %d", &n, &m);
res = n * (n - 1) / 2 + m * (m - 1) / 2;
printf("%d\n", res);
return 0;
}

Compiler output:
a.cc:27:11: error: redefinition of 'const int INF'
   27 | const int INF = 2147483647;
      |           ^~~
a.cc:7:11: note: 'const int INF' previously defined here
    7 | const int INF = 2147483647;
      |           ^~~
a.cc:28:11: error: redefinition of 'const int N'
   28 | const int N = 500005;
      |           ^
a.cc:8:11: note: 'const int N' previously defined here
    8 | const int N = 500005;
      |           ^
a.cc:30:5: error: redefinition of 'int n'
   30 | int n, m, res;
      |     ^
a.cc:10:5: note: 'int n' previously declared here
   10 | int n, m, res;
      |     ^
a.cc:30:8: error: redefinition of 'int m'
   30 | int n, m, res;
      |        ^
a.cc:10:8: note: 'int m' previously declared here
   10 | int n, m, res;
      |        ^
a.cc:30:11: error: redefinition of 'int res'
   30 | int n, m, res;
      |           ^~~
a.cc:10:11: note: 'int res' previously declared here
   10 | int n, m, res;
      |           ^~~
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main() {
      |     ^~~~
a.cc:12:5: note: 'int main()' previously defined here
   12 | int main() {
      |     ^~~~
Language: C++

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        System.out.println(n*(n-1)/2 + m*(m-1)/2);
        sc.close();

    }

}


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

// A.

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

using namespace std;

int main(int argc, char* argv[]) {
	int n, m;
	cin >> n >> m;
	int ans = (n * (n - 1) + m * (m - 1)) / 2;
	cout << ans << endl;
	return 0;
}


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

#include<bits/stdc++>h>
using namespace std;
signed main(){
  int n,m;
  cin>>n>>m;
  cout<<n+m/2<<"\n";
}

Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++>h>
      |                       ^
a.cc:1:9: fatal error: bits/stdc++>: No such file or directory
    1 | #include<bits/stdc++>h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<ll> vl ;
typedef pair<ll,ll> pl;
 
#define mp make_pair
#define pb push_back
#define fir first
#define sec second
#define rep(i,N) for(int i=0; i < (int)N; i++)
#define all(v) (v).begin(),(v).end()
//#define max(a,b) (a>b ? a : b)
//#define min(a,b) (a<b ? a : b)
 
const int MOD = 998244353;
const int INF = 100000002;
const double PI =4*atan(1);
const double eps = 1e-7;
const long long oo = 1e18;


int main(){
  int n,m;
  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:27:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |   ans = n*(n-1)/2 + m*(m-1)/2;
      |   ^~~
      |   abs
Language: C++

#define _GLIBCXX_DEBUG
#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:9:52: error: expected ';' before ')' token
    9 |   cout << ((n * (n - 1)) / 2) + ((m * (m - 1)) / 2)) << endl;
      |                                                    ^
      |                                                    ;
Language: C++

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define int long long
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
signed main()
{
     ios_base::sync_with_stdio(false);
     cin.tie(NULL);  
   
 #ifndef ONLINE_JUDGE
    if(fopen("INPUT.txt","r"))
    {
    freopen ("INPUT.txt" , "r" , stdin);
    freopen ("OUTPUT.txt" , "w" , stdout);
    }
 #endif
 
// -------------------------------------Code starts here---------------------------------------------------------------------     

    int n,m;
    cin>>n>>m;
    int ans=0;
    ans+=((n-1)*n)/2;    
    ans+=((m-1)*m)/2;    
    coout<<ans;

// -------------------------------------Code ends here------------------------------------------------------------------
     clock_t clk;
 	clk = clock();
 
    clk = clock() - clk;
 	cerr << fixed << setprecision(6) << "Time: " << ((double)clk)/CLOCKS_PER_SEC << "\n";
 	return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'coout' was not declared in this scope
   30 |     coout<<ans;
      |     ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int a,b;
  cin >> a >> b;
  int ans=a*(a-1)/2+b*(b-1)/2;
  cou << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
    8 |   cou << ans << endl;
      |   ^~~
      |   cos
Language: C++

//author:luckYrat(twitter:@luckYrat_)
//<ここに一言>

//せんげん！
#include <iostream>

#include <cmath>
#include <algorithm>
#include <iomanip>

#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <bitset>

#include <cctype>
#include <utility>
#include <climits>


//なまえくーかん！
using namespace std;
using ll = long long;
using P = pair<ll,ll>;

//てーすう！
const int mod = 1000000007;
const int inf = (1<<30)-1;
const ll linf = (1LL<<62LL)-1;
const double EPS = (1e-10);

//でふぁいん！
#define anyfill(n,s) setw(n) << setfill(s)
#define loop(s) for(int i = 0; s > i; i++)
#define rep(i,q) for(int i = 0; (q) > i; i++)
#define repp(i,n,q) for(int i = n; (q) > i; i++)
#define dep(i,q) for(int i = (q); 0 < i; i--)

//みじかく！
#define pb push_back
#define fir first
#define scn second
#define ednl endl

//いぇすのー！
#define YesNo(a) (a?"Yes":"No")
#define YESNO(a) (a?"YES":"NO")
#define yesno(a) (a?"yes":"no")

//きんぼーnほーこー！！
P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}};
P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
/*
確認ポイント
cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる

計算量は変わらないが楽できるシリーズ
min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる
count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる
*/
__attribute__((constructor))
void initial() {
 cin.tie(0);
 ios::sync_with_stdio(false);
}
int main(){
	int n,m;cin>>n>>m;
	cout << n*(n-1)/2+m*(m-1)/2 << endl;
}
z

Compiler output:
a.cc:73:1: error: 'z' does not name a type
   73 | z
      | ^
Language: C++

#include<bits/stdc++.h>
#define re register
#define int long long
using namespace std;
inline int read(){
	re int t=0;re char v=getchar();
	while(v<'0')v=getchar();
	while(v>='0')t=(t<<3)+(t<<1)+v-48,v=getchar();
	return t;
}
int n,a,b;
int main(){
	a=read();b=read();
	printf("%lld",a*(a-1)/2+b*(b-1)/2);
}

Compiler output:
a.cc: In function 'long long int read()':
a.cc:6:16: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    6 |         re int t=0;re char v=getchar();
      |                ^
a.cc:6:28: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    6 |         re int t=0;re char v=getchar();
      |                            ^
At global scope:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define EPS (1e-9)
#define INF (1e17)
#define PI (acos(-1))
//const double PI = acos(-1);
//const double EPS = 1e-15;
//long long INF=(long long)1E17;
#define i_7 (long long)(1e9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}
 
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=std::sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}
 
long long gcd_(long long a, long long b){
  if(a<b){
    std::swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}
 
//using namespace std;
//using namespace boost::multiprecision;
//using namespace __gnu_pbds;
 
int main(){
  using namespace std;
  int n, m;
  cin>>n>>m;
  ans = n * (n - 1) / 2 + m * (m - 1) / 2;
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:73:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   73 |   ans = n * (n - 1) / 2 + m * (m - 1) / 2;
      |   ^~~
      |   abs
Language: C++

#include <iostream>
//#include <iomanip>
#include <string>
#include <vector>
//#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <deque>
//#include <bitset>
//#include <math.h>
using namespace std ;
using ll = long long ;
//using ld = long double ;
using vll = vector<ll> ;
//using vvll = vector<vll> ;
//using vc = vector<char> ;
//using vvc = vector<vc> ;
//using vb = vector<bool> ;
//using vvb = vector<vb> ;
//using pll = pair<ll,ll> ;

//ll mod = 1000000007 ;
//long double pie = acos(-1) ;

string yorn(bool a){if(a) return"Yes" ; return "No" ;}
string YorN(bool a){if(a) return"YES" ; return "NO" ;}
//ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;}
//ll lcm(long long a,long long b){return a/gcd(a,b)*b ;}
//ll sa(long long a,long long b){if(a>b) return a-b ; return b-a ;}
void mysort(vector<long long> &a){sort(a.begin(),a.end()) ;}
void myrev(vector<long long> &a){reverse(a.begin(),a.end()) ;}

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


Compiler output:
a.cc: In function 'void mysort(std::vector<long long int>&)':
a.cc:32:35: error: 'sort' was not declared in this scope; did you mean 'short'?
   32 | void mysort(vector<long long> &a){sort(a.begin(),a.end()) ;}
      |                                   ^~~~
      |                                   short
a.cc: In function 'void myrev(std::vector<long long int>&)':
a.cc:33:34: error: 'reverse' was not declared in this scope
   33 | void myrev(vector<long long> &a){reverse(a.begin(),a.end()) ;}
      |                                  ^~~~~~~
Language: C++

// #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;
using ll = long long int;
using int64 = long long int;
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const int INF = 1LL << 29;
const ll LONGINF = 1LL << 60;
const ll MOD = 1000000007LL;
 
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:43:13: error: 'N' was not declared in this scope
   43 |     cout << N*(N+1)/2 + M*(M+1)/2 << endl;
      |             ^
a.cc:43:25: error: 'M' was not declared in this scope
   43 |     cout << N*(N+1)/2 + M*(M+1)/2 << endl;
      |                         ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  string s;
  cin>>s;
  int n=s.size();
  int count=0;
  for(int i=0;i<n;i++){
    if(s[i]==s[n-1-i]){
      count++;
    }
  }
  if(count==n){
    int x=(n-1)/2;
    for(int i=0;i<x;i++){
      if(s[i]==s[x-1-i]){
        count++;
      }
    }
    int y=(n+3)/2;
    for(int i=0;i<y;i++){
      if(s[i]==s[y-1-i]){
        count++;
      }
    }
    if(count==n+x+y){
      cout<<"Yes";
    }
    else{
      cout<<"No";
    }
  }
  else{
    cout<<"No";
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:37:4: error: expected '}' at end of input
   37 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

bool isPal(string s, int n){
	for(int i=0; i < n/2; i++){
		if(s[i]!=s[n-i-1])
			return false;
	}
	return true;
}

int main() {
	string s;
	cin >> s;
	int n = s.length();
	is(n == 1){
		cout << "Yes" << endl; return 0;
	}	
	string s1 = s.substr(0, n/2);
	string s2 = s.substr(n/2+1, n/2);
	if(isPal(s, n) && isPal(s1, n/2) && isPal(s2, n/2))
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'is' was not declared in this scope; did you mean 's'?
   16 |         is(n == 1){
      |         ^~
      |         s