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

#include<bits/stdc++.h>
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
string a,b;
int main()
{
    cin>>a>>b;
    if(a==b)
    {
        cout<<"Yes\n";
        return 0;
    }
    if(a.size()!=b.size())
    {
        cout<<"No\n";
        return 0;
    }
    int n=a.size()+2;
    while(n--)
    {
        rotate(a.begin(),a.begin()+1,a.end());
        if(a==b)
            cout<<"Yes\n";
    }
    cout<<"No\n"
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: expected ';' before '}' token
   25 |     cout<<"No\n"
      |                 ^
      |                 ;
   26 | }
      | ~
Language: C++


using namespace std;

int main(int argc, const char * argv[]) {
 
    string S,T;
    
    cin>>S>>T;
    
    for(int i=0;i<S.size();i++){
        S+=S.at(S.size());
        S.erase(0,1);
        
        if(S==T){
            cout<<"Yes"<<endl;return 0;
        }
    }
    
cout<<"No"<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string S,T;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | 
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin>>S>>T;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:8:10: error: 'S' was not declared in this scope
    8 |     cin>>S>>T;
      |          ^
a.cc:8:13: error: 'T' was not declared in this scope
    8 |     cin>>S>>T;
      |             ^
a.cc:15:13: error: 'cout' was not declared in this scope
   15 |             cout<<"Yes"<<endl;return 0;
      |             ^~~~
a.cc:15:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:26: error: 'endl' was not declared in this scope
   15 |             cout<<"Yes"<<endl;return 0;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | 
a.cc:19:1: error: 'cout' was not declared in this scope
   19 | cout<<"No"<<endl;
      | ^~~~
a.cc:19:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:13: error: 'endl' was not declared in this scope
   19 | cout<<"No"<<endl;
      |             ^~~~
a.cc:19:13: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  string a,b,c;
  cin >> a;
  cin >> b;
  c=b+b;
  if(s.find(a) != npos){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: 's' was not declared in this scope
   10 |   if(s.find(a) != npos){
      |      ^
a.cc:10:19: error: 'npos' was not declared in this scope
   10 |   if(s.find(a) != npos){
      |                   ^~~~
Language: Java

	public static void stringRotation() {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String t = sc.nextLine();
		for (int i=0; i<s.length(); i++) {
			int j=0;
			int k=i;
			while (s.charAt(k) == t.charAt(j)) {
				k++;
				j++;
				if (k == s.length()) k=0;
				if (j == t.length()) {
					System.out.println("Yes");
					return;
				}
			}
		}
		System.out.println("No");
	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void stringRotation() {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:20: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

a = input()
b = input()
 
if (len(a) != len(b)):
  print("No")
  exit(0)
for i in range(len(a)):
  if a[i:] + a[:i] == b:
    print("Yes")
    exit(0)
print("No")

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

#include <iostream>
#include <string>
using namespace std;
int main(int argc, char* argv[])
{
	string S,T;
	cin>>S;
	cin>>T;
	int sLen=S.length();
	for (int i=0;i<sLen;i++){
		const char *pStr=S.c_str();
		if (!strcmp(pStr,(char*)T.c_str())){
			cout<<"Yes"<<endl;
			return 0;
		}
		char ch[2];
		ch[0]=S[sLen-1];
		ch[1]='\0';
		S.insert(0,ch);
		S[sLen]='\0';
	}
	cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:12:22: error: 'strcmp' was not declared in this scope
   12 |                 if (!strcmp(pStr,(char*)T.c_str())){
      |                      ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

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

int main(){
     string s,t;
     int l,a=0;
     cin>>s>>t;
     l=s.length();
     string u=t+t;
     if(u.find(s)!=std::string::npos){
          a=1;
     }
     if(a==1) cout<<"Yes"<<endl;
     if(a==0) cout<<"No"<<endl;
  
     

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: expected '}' at end of input
   15 |      if(a==0) cout<<"No"<<endl;
      |                                ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;



int main(void){

  string s,t;
  cin >> s >> t;

  int n=s.size();
  bool ans=false;
  for(int i=0;i<=n;i++){
    bool fg=true;
    for(int j=i;j<i+n;j++)
      fg &= (s[j-i]!=t[j])
    ans |= fg;
  }
  if(ans)cout << "Yes" << endl;
  else cout << "No" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:27: error: expected ';' before 'ans'
   19 |       fg &= (s[j-i]!=t[j])
      |                           ^
      |                           ;
   20 |     ans |= fg;
      |     ~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string>
#include<math.h>
#include<stdlib.h>
#include<vector>
#include<queue>
#define rep(index,num) for(int index=0;index<num;index++)
#define scan(argument) cin>>argument
#define prin(argument) cout<<argument<<endl
#define kaigyo cout<<endl
#define eps 1e-15
typedef long long ll;
using namespace std;
int main(){
	char S[101],T[101];
	scanf("%s %s",S,T);
	char initial=S[0];
	int flag;
	rep(j,strlen(S)){
		flag=1;
		rep(i,strlen(S)){
			if(S[i]!=T[(i+j)%strlen(S)]){
				flag=0;
				break;
			}
		}
		if(flag) break;
	}
	if(flag) prin("Yes");
	else prin("No");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:15: error: 'strlen' was not declared in this scope
   21 |         rep(j,strlen(S)){
      |               ^~~~~~
a.cc:9:46: note: in definition of macro 'rep'
    9 | #define rep(index,num) for(int index=0;index<num;index++)
      |                                              ^~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<queue>
  +++ |+#include <cstring>
    9 | #define rep(index,num) for(int index=0;index<num;index++)
Language: C++

#include <iostream>
#include <cstdlib>
using namespace std;

int main(int argc, char *argv[])
{
	int i, len, j;
	int flags = 0;
	char lit;
	
    char str_s[101];
	char str_t[101];

	cin >> str_s;
	cin >> str_t;

	len = strlen(str_s);

	for (i = 0; i < len; i++) {
		if (strcmp(str_s, str_t) == 0) {
			flags = 1;
		    break;
		}
	    lit = str_s[0];
		for (j = 0; j < len - 1; j ++) {
			str_s[j] = str_s[j + 1];
		}
		str_s[len - 1] = lit;
	}

	if (flags == 1)
		cout << "Yes" << "\n";
	else
		cout << "No" << "\n";
	
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:17:15: error: 'strlen' was not declared in this scope
   17 |         len = strlen(str_s);
      |               ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdlib>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc:20:21: error: 'strcmp' was not declared in this scope
   20 |                 if (strcmp(str_s, str_t) == 0) {
      |                     ^~~~~~
a.cc:20:21: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<string.h>
using namespace std;
int main()
{
  char a[100],b[100],temp;
  int j,i,f=0;
  cin>>a>>b;
  n=a.length();
   j = strlen(a) - 1;
    for (i = 0; i < j; i++,j--)
    {
        temp = a[i];
        a[i] = a[j];
        a[j] = temp;
      if(b==a)
      {
        f=1;
        cout<<"Yes";
        
      }
    }
  if(f==0)
  {
    cout<<"No";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'n' was not declared in this scope
    9 |   n=a.length();
      |   ^
a.cc:9:7: error: request for member 'length' in 'a', which is of non-class type 'char [100]'
    9 |   n=a.length();
      |       ^~~~~~
Language: C++

//
//  main.cpp
//  A
//
//  Created by 黄道煜 on 2018/7/21.
//  Copyright © 2018年 黄道煜. All rights reserved.
//

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

char s[105], t[105];

int main()
{
    scanf("%s%s", s, t);
    int len=strlen(s);
    for(int i=0; i<len; i++)
    {
        int flag=1;
        for(int j=0; j<len; j++)
            if(s[j]!=t[(j+i)%len]){flag=0; break;}
        if(flag) {printf("Yes\n"); return 0;}
    }
    printf("No\n");
}


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

#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
    string s,t;
    cin>>s>>t;
    string u;
    char c;
    for(int i=0;i<s.size();i++){
        c=s[0];
        u=s.substr(1,s.size()-1);
        u=u+c;
        s=u;
        if(t==u){
            cout<<"Yes"<<endl;
            return 0;
        }
    }
    cout<<"No"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>s>>t;
      |     ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <cmath>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:16:13: error: 'cout' was not declared in this scope
   16 |             cout<<"Yes"<<endl;
      |             ^~~~
a.cc:16:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:26: error: 'endl' was not declared in this scope
   16 |             cout<<"Yes"<<endl;
      |                          ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include <cmath>
  +++ |+#include <ostream>
    4 | using namespace std;
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout<<"No"<<endl;
      |     ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:17: error: 'endl' was not declared in this scope
   20 |     cout<<"No"<<endl;
      |                 ^~~~
a.cc:20:17: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

def rot(s):
    tmp = s[0]
    s = s[1:]
    s += tmp

    return s


s1 = input()
s2 = input()

for i in range(len(s1)):
    if s1 == s2:
        print("Yes")
        exit(0)

    s2 = rot(s2)

print('No')



Compiler output:
a.cc:19:7: warning: multi-character character constant [-Wmultichar]
   19 | print('No')
      |       ^~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def rot(s):
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string a, b, c;
  cin >> a >> b;
  c = b + b;
  for(int i = 0;i<a.size();++i) {
    if(a==string(b.begin() + i, b.begi() + i + a.size())) {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:35: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'begi'; did you mean 'begin'?
    8 |     if(a==string(b.begin() + i, b.begi() + i + a.size())) {
      |                                   ^~~~
      |                                   begin
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long LL;

void sol()
{
    string s, t;
    cin >> s >> t;
    reverse(s.begin(),s.end());
    
    if(s = t){
        cout <<"Yes";
    }
    else cout << "No";
}

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


Compiler output:
a.cc: In function 'void sol()':
a.cc:13:10: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(t)' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |     if(s = t){
      |        ~~^~~
      |          |
      |          std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
  ll a;
  cin>>a;
  ll b=0;
  for(ll i=0;i<a;i++){
    ll c;
    cin>>c;
    b+=c;
  }
  cout<<c-a<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'c' was not declared in this scope
   13 |   cout<<c-a<<endl;
      |         ^
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
#include <set>
#include <deque>
#include <queue>
#include <list>
using namespace std;
typedef long long ll;
const int mod = 1000000007;

#define for1(n) for (int i = 0 ; i < n ; i++)
#define for2(n) for (int j = 0 ; j < n ; j++)
#define for3(n) for (int k = 0 ; k < n ; k++)
#define for4(n) for (int l = 0 ; l < n ; l++)
#define forl(n) for (ll i = 0 ; i < n ; i++)

int main() {
    ios::sync_with_stdio(false);
    int n, b = 0;
    cin >> n;
    int a[n];
    for1(n) {
		cin >> a[n];
	    b += a[n];
	}
	cout << c - n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: 'c' was not declared in this scope
   33 |         cout << c - n;
      |                 ^
Language: C++

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

int main(){
    
    int n;
    cin >> n;
    vector<int> a(n);
    int ans = 0;
    for(int i=0; i<n; i++){
        cin >> a.at(i);
        ans += a.at(i)-1;
    }
    cout << ans << endl;
}a

Compiler output:
a.cc:15:2: error: 'a' does not name a type
   15 | }a
      |  ^
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " " 
#define LLi long long int

using namespace std;

int imax=2147483647;
long long int llimax=9223372036854775807;

//int型vectorを出力
void PV(vector<int> pvv) {
	rep(i, pvv.size()) cout << pvv[i] SP;
	cout << endl;
}

//LLi型vectorを出力
void PVL(vector<LLi> pvv) {
	rep(i, pvv.size()) cout << pvv[i] SP;
	cout << endl;
}

int main(){

	int n, su=0;

	cin>> n;

	rep(i, n){
		cin>> tmp;
		su+=tmp;
	}

	cout<< su-n <<endl;
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:23: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   32 |                 cin>> tmp;
      |                       ^~~
      |                       tm
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		long n = scn.nextLong();
		long[] a = new long[n];
		for(int i=0; i<a.length; ++i){
			a[i] = scn.nextLong();
		}
		long m = 1;
		for(int i=0; i<a.length; ++i){
			m = m * a[i];
		}
      	m = m - 1;
		long sum = 0;
		for(int i=0; i<a.length; ++i){
			sum = sum + m % a[i];
		}
		System.out.println(sum);
	}
}


Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from long to int
		long[] a = new long[n];
		                    ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		long n = scn.nextLong();
		long[] a = new Long[n];
		for(int i=0; i<a.length; ++i){
			a[i] = scn.nextLong();
		}
		long m = 1;
		for(int i=0; i<a.length; ++i){
			m = m * a[i];
		}
      	m = m - 1;
		long sum = 0;
		for(int i=0; i<a.length; ++i){
			sum = sum + m % a[i];
		}
		System.out.println(sum);
	}
}


Compiler output:
Main.java:7: error: incompatible types: possible lossy conversion from long to int
		long[] a = new Long[n];
		                    ^
Main.java:7: error: incompatible types: Long[] cannot be converted to long[]
		long[] a = new Long[n];
		           ^
2 errors
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] a = new int[n];
		for(int i=0; i<a.length; ++i){
			a[i] = scn.nextInt();
		}
		long m = 1;
		for(int i=0; i<a.length; ++i){
			m = m * a[i];
		}
      	m = m - 1;
		int sum = 0;
		for(int i=0; i<a.length; ++i){
			sum = sum + m % a[i];
		}
		System.out.println(sum);
	}
}

Compiler output:
Main.java:18: error: incompatible types: possible lossy conversion from long to int
			sum = sum + m % a[i];
			          ^
1 error
Language: C

#include<iostream>
using namespace std;
int main()
{
    long long n,s=0,i=0,b;
    cin>>n;
    for(i=0;i<n;i++)
    {cin>>b;
    s+=b;
}cout<<s-n;
}

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

import java.util.Scanner;
public class three100C {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int len = scan.nextInt();
		long[] array = new long[len];
		int count = 0;

		for(int i=0;i<len;i++) {
			array[i] = scan.nextLong();
		}

		for(long x:array) {
			while(true) {
			if(x%2 == 0) {
				x = x/2;
				count++;
			}else {
				break;
			}
			}
		}

		System.out.println(count);
		scan.close();

	}

}


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

/**Author:Sagor*/

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

using namespace std;
#define pri(n)          printf("%d\n",n)
#define prll(n)         printf("%lld\n",n)
#define prd(n)          printf("%lf\n",n)
#define scll(n)         scanf("%lld",&n)
#define sci(n)          scanf("%d",&n)
#define scd(n)          scanf("%lf",&n)
#define pi              acos(-1)//inbuilt M_PI
#define ll              long long
#define pb              push_back
#define vsort(v)        sort(v.begin(),v.end())
#define asort(n)        sort(ar,ar+n)
#define yes             cout<<"Yes\n"
#define no              cout<<"No\n"
#define for1(i,n)       for(i=1;i<=n;i++)
#define for0(i,n)       for(i=0;i<n;i++)
#define mod             1000000007
#define watch(x)        cout << (#x) << " is " << (x) <<"\n";

/** for print with quote \"hello world\"
    1LL is used to convert into long long*/


int main()
{
    /*freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);*/
    /**ios_base::sync_with_stdio(false);
    cin.tie(NULL);/**Dont't use scanf of printf*/
    ll n,sum=0,i,a;
    cin>>n;
    for0(i,n){
        cin>>a;
        sum+=(a-1);
    }
    cout<<sum<<endl;


    return
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:1: error: expected primary-expression before '}' token
   45 | }
      | ^
a.cc:44:11: error: expected ';' before '}' token
   44 |     return
      |           ^
      |           ;
   45 | }
      | ~
Language: C++


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

int main() {
   int N;
   cin >> N;
   vector<int> a(N,0);
   rep(i,N) cin >> a.at(i);
   int max = *max_element( a.begin(), a.end() );
   vector<int> f(max,0);
   rep(m,max){
     rep(j,N) f.at(m) += m % a.at(j);
   }
   cour << *max_element( f.begin(), f.end() ) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:4: error: 'cour' was not declared in this scope
   17 |    cour << *max_element( f.begin(), f.end() ) << endl;
      |    ^~~~
Language: C++

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

int main() {
   int N;
   cin >> N;
   vector<int> a(N,0);
   rep(i,N) cin >> a.at(i);
   int max = max_element( a.begin(), a.end() );
   vector<int> f(max,0);
   rep(m,max){
     rep(j,N) f.at(m) += m % a.at(j);
   }
   cour << max_element( f.begin(), f.end() ) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   11 |    int max = max_element( a.begin(), a.end() );
      |              ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:16:4: error: 'cour' was not declared in this scope
   16 |    cour << max_element( f.begin(), f.end() ) << endl;
      |    ^~~~
Language: C

#include <stdio.h>
#include <math.h>
#include <string.h>

int gcd(int a,int b){
    if(a<b){
        int now=a;
        a=b;
        b=a;
    }

    int r=a%b;
    while(r!=0){
        a=b;
        b=r;
        r=a%b;
    }

    return b;
}



/* 値を入れ替える関数 */
void swap (int *x, int *y) {
  int temp;    // 値を一時保存する変数

  temp = *x;
  *x = *y;
  *y = temp;
}

/***
* pivotを決め、
* 全データをpivotを境目に振り分け、
* pivotの添え字を返す
***/
int partition (int array[], int left, int right) {
  int i, j, pivot;
  i = left;
  j = right + 1;
  pivot = left;   // 先頭要素をpivotとする

  do {
    do { i++; } while (array[i] < array[pivot]);
    do { j--; } while (array[pivot] < array[j]);
    // pivotより小さいものを左へ、大きいものを右へ
    if (i < j) { swap(&array[i], &array[j]); }
  } while (i < j);

  swap(&array[pivot], &array[j]);   //pivotを更新

  return j;
}

/* クイックソート */
void quick_sort (int array[], int left, int right) {
  int pivot;

  if (left < right) {
    pivot = partition(array, left, right);
    quick_sort(array, left, pivot-1);   // pivotを境に再帰的にクイックソート
    quick_sort(array, pivot+1, right);
  }
}

const int i=0;

int main(void){
    int n;
    scanf("%d",&n);
    int all=0;
    int i;
    for(i=0;i<n;i++){
        int a;
        scanf("%d",&a);
        ans+=a;
    }

    printf("%d\n",ans-n);
}

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

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

int main(){
  int n;
  cin>>n;
  vector<int>a(n);
  for(int i=1;i<=n;i++){
    cin>>a[i];
  }
  long long mx=0;
  for(int i=1;i<=1000000;i++){
      int num=0;
    for(int j=1;j<=n;j++){
        num+=i%a[j];
    }
    mx=max(mx,num);
  }
  cout<<mx<<endl;
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: no matching function for call to 'max(long long int&, int&)'
   17 |     mx=max(mx,num);
      |        ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:17:11: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   17 |     mx=max(mx,num);
      |        ~~~^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:17:11: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   17 |     mx=max(mx,num);
      |        ~~~^~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int a[99999];
int main()
{
    int i,n,k;
cin >> n;
int ans -= n;
    for(i=0;i<n;i++){
    cin>>a[i];
       ans += a[i];
    }
   cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected initializer before '-=' token
   10 | int ans -= n;
      |         ^~
a.cc:13:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |        ans += a[i];
      |        ^~~
      |        abs
a.cc:15:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |    cout << ans;
      |            ^~~
      |            abs
Language: C++

#include<bits/std<c++.h>
using namespace std;
typedef long long int;
int main()
{
    ll n,ans=0;
    ll a[100000]
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        ans+=a[i]-1;
    }
    cout<<ans
    return 0;
}


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

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

#define M 1000000

bool isTrue(int val, vector<int> list) {
	
	for(int x: list) {
		if(val%x != x-1) {
			return false;
		}
	}
	return true;
}


void solve()
{	
	int n,num,m = INT_MIN,val;
	vector<int> list;
	cin >> n;
	while(n-- && cin >> num) {
		list.emplace_back(num);
		m = max(m,num);
	}
	//cout << m << endl;
	val = m-1;
	while(1) {
		if(isTrue(val, list)) {
			cout << val << endl;
			break;
		} 
		val += m;
	}
}

bool perfectSquare(long long int n) {
	double long s = sqrt(n);
	
	if(s == floor(s)) {
		return true;
	}
	return false;
}

void answer() {
	long long int len,num;
	vector<long long int> list;
	cin >> len;
	
	while(len-- && cin >> num) {
		list.emplace_back(num);
	}
	
	bool prime[M+1];
	
	memset(prime, true, sizeof(prime));
	
	for(int i=2;i<=sqrt(M);i++) {
		if(prime[i]) {
			for(int j=i*i;j<=M;j+=i) {
				prime[j] = false;
			}
		}
	}
	
	for(long long int x: list) {
		if(perfectSquare(x)) {
			long long int p = sqrt(x);
			if(prime[p]) {
				cout << "YES" << endl;
			} else {
				cout << "NO" << endl;
			}
		} else {
			cout << "NO" << endl;
		}
	}
}

void result() {
	long long int n,res=0;
	cin >> n;
	while(n-- && cin >> num) {
		res += num-1;
	}
	
	cout << res << endl;
}
			
		

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


Compiler output:
a.cc: In function 'void result()':
a.cc:84:29: error: 'num' was not declared in this scope; did you mean 'enum'?
   84 |         while(n-- && cin >> num) {
      |                             ^~~
      |                             enum
Language: C++

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

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

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

using namespace std;
using ll = long long;


int main(){
  int N;
  cin >> N;
  set<int> S;
  rep(i, N){
    int s;
    S.insert(s);
  }
  
  int ans = 0;
  for(int c: S)
    ans += c-1;
  }

 cout << ans << endl;
}
   
      

Compiler output:
a.cc:22:2: error: 'cout' does not name a type
   22 |  cout << ans << endl;
      |  ^~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

<>;$\+=$_-1for glob<>;print

Compiler output:
a.cc:1:5: error: stray '\' in program
    1 | <>;$\+=$_-1for glob<>;print
      |     ^
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <>;$\+=$_-1for glob<>;print
      | ^
a.cc:1:4: error: '$' does not name a type
    1 | <>;$\+=$_-1for glob<>;print
      |    ^
a.cc:1:23: error: 'print' does not name a type; did you mean 'int'?
    1 | <>;$\+=$_-1for glob<>;print
      |                       ^~~~~
      |                       int
Language: C++

#include<bits/stdc++.h>
int main()
{
	int n,ans=0;
	cin>>n;
	for (int i=1;i<=n;i++)
	{
        cin>>a[i];
	}
	for(int j=1;j<=n;j++)
    {
        ans=ans+a[j];
    }
    cout<<ans-n;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>n;
      |         ^~~
      |         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:8:14: error: 'a' was not declared in this scope
    8 |         cin>>a[i];
      |              ^
a.cc:12:17: error: 'a' was not declared in this scope
   12 |         ans=ans+a[j];
      |                 ^
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout<<ans-n;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  ll ans=0;
  rep(i,N){
    ll a; cin >> a;
    ans += a;
  }
  cout << ans - N << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'll' was not declared in this scope
    8 |   ll ans=0;
      |   ^~
a.cc:10:7: error: expected ';' before 'a'
   10 |     ll a; cin >> a;
      |       ^~
      |       ;
a.cc:10:18: error: 'a' was not declared in this scope
   10 |     ll a; cin >> a;
      |                  ^
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans += a;
      |     ^~~
      |     abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   cout << ans - N << endl;
      |           ^~~
      |           abs
Language: C++

import math

def lcm(a, b):
    return (a * b) // math.gcd(a, b)
l = 1
n = int(input())
arr = [int(i) for i in input().split()]
for i in arr:
    l = lcm(i, l)
ans = 0
for i in arr:
    ans += (l - 1) % i
print(ans)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#define ll long long
using namespace std;
int main(){
    int n;
    cin>>n;
    vector<int> a(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    
    for(int i=0;i<n;i++){
        ans+=a[i]-1;
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |         ans+=a[i]-1;
      |         ^~~
      |         abs
a.cc:19:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

917338#ifdef DEBUG

#else

#    pragma GCC optimize("O3,no-stack-protector")
#    pragma GCC optimize("unroll-loops")

#    if __cplusplus >= 201703L
#        pragma GCC target("avx2")
#    else
#        pragma GCC target("avx")
#    endif

#endif
// 実数の場合
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << endl
typedef int64_t Int;

using namespace std;
using Graph = vector<vector<Int>>;

const double pi = M_PI;
const Int MOD = 1000000007;

int Gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return Gcd(b, a % b);
    }
}

int Lcm(int a, int b) {
    return (a * b) / Gcd(a, b);
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, a;
    cin >> n;

    int ans = 0;
    for (int i = 0; i < n; i++) {
        cin >> a;
        a--;
        ans += a;
    }

    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc:1:7: error: stray '#' in program
    1 | 917338#ifdef DEBUG
      |       ^
a.cc:3:2: error: #else without #if
    3 | #else
      |  ^~~~
a.cc:14:2: error: #endif without #if
   14 | #endif
      |  ^~~~~
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 917338#ifdef DEBUG
      | ^~~~~~
Language: C++

import math
N = int(input())
A = list(map(int, input().split()))

answer = A[0]
Sum = 0

def gcd(A,B):
    if(B == 0):
        return A
    else:
        return gcd(B, A%B)

#最小公倍数-1がfに入る数なはず
for i in range(1, N):
    answer = answer * A[i] // gcd(answer, A[i])
    
for i in range(N):
    Sum += (answer-1) % A[i]

print(Sum)

Compiler output:
a.cc:14:2: error: invalid preprocessing directive #\U00006700\U00005c0f\U0000516c\U0000500d\U00006570
   14 | #最小公倍数-1がfに入る数なはず
      |  ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

int main() {
  int N;
  cin >> N;
  int m = 0;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    m += a;
  }
  cout << m-N << endl
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected ';' before '}' token
   13 |   cout << m-N << endl
      |                      ^
      |                      ;
   14 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

int main(){
    int N; cin>>N;
    long long sum=0
    for(int i=0;i<N;i++){
        long long a; cin>>a;
        sum+=a;
    }
    cout<<sum-N<<endl;
}

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

import sys
import numpy as np
#import math
# for AtCoder
import fractions
from collections import deque 
from functools import reduce

def lcm_base(x, y):
    return (x * y // fractions.gcd(x, y))

def lcm_list(numbers_list):
    return reduce(lcm_base, numbers_list, 1)

# N 
n = int(input())

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

lcm_1 = lcm_list(a) - 1
m = np.mod(lcm_1, a)
print(m.sum())


Compiler output:
a.cc:3:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    3 | #import math
      |  ^~~~~~
a.cc:3:9: error: #import expects "FILENAME" or <FILENAME>
    3 | #import math
      |         ^~~~
a.cc:4:3: error: invalid preprocessing directive #for
    4 | # for AtCoder
      |   ^~~
a.cc:15:3: error: invalid preprocessing directive #N
   15 | # N
      |   ^
a.cc:18:3: error: invalid preprocessing directive #a1
   18 | # a1 . . . an
      |   ^~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int maxn=100010;

int main()
{
    int n;
    long long a,s=0;
    cin>>n;
    for(int i=0;i<n;i++)
    {
         cin>>a;
         s += a[i]-1;
    }
        
    cout << s;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: invalid types 'long long int[int]' for array subscript
   13 |          s += a[i]-1;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int maxn=100010;

int main()
{
    int n;
    long long a,s=0;
    cin>>n;
    for(int i=0;i<n;i++)
    {
         cin>>a;
         s += a[j]-1;
    }
        
    cout << s;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'j' was not declared in this scope
   13 |          s += a[j]-1;
      |                 ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
int main(void){
    int num;
    long *a_n,*an;

    scanf("%d",&num);
    a_n=(long *)malloc(sizeof(long)*num);
    int i;
    for(i=0;i<num;i++){
        scanf("%lld",&a_n[i]);
        mod+=a_n[i]-1;
    }
    long mod;
    
    printf("%ld",mod);
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: 'mod' undeclared (first use in this function); did you mean 'fmod'?
   14 |         mod+=a_n[i]-1;
      |         ^~~
      |         fmod
main.c:14:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(void){
  int n;
  cin>>n;
  int ans=0;
  rep(i, n) {
    int a;
    cin>>a;
    ans+=(a-1);
  }
  cout<ans<<endl;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   15 |   cout<ans<<endl;
      |        ~~~^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
int a[3005];
int main()
{
    long long m,n,ans=0;
    cin >> n;
    cin >> m
    for(int i=1;i<n;i++)
    {
        cin >> a[i];
        m=m/__gcd(m,a[i])*a[i];
    }
    m--;
    for(int i=0;i<n;i++)
    {
        ans+=m%a[i];
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'for'
    9 |     cin >> m
      |             ^
      |             ;
   10 |     for(int i=1;i<n;i++)
      |     ~~~      
a.cc:10:17: error: 'i' was not declared in this scope
   10 |     for(int i=1;i<n;i++)
      |                 ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
int a[3005];
int main()
{
    long long m=1,n,ans=0;
    cin >> n;
    for(int i=0;i<n;i++)
    {
        cin >> a[i];
        m=m/__gcd(m,a[i])*a[i];
    }
    m--;
    for(int i=0;i<n;i++)
    {
        ans+=m%a[i];
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: no matching function for call to '__gcd(long long int&, int&)'
   12 |         m=m/__gcd(m,a[i])*a[i];
      |             ~~~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:12:18: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('long long int' and 'int')
   12 |         m=m/__gcd(m,a[i])*a[i];
      |             ~~~~~^~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int  a[3001],m;
long long zd(long long a,long long b)
{return a%b!=0?zd(b,a%b):b;}
long longrs;
int main()
{
	cin>>m;
	long long mt=1;
	for(int i=0;i<m;i++)
	{
		scanf("%d",&a[i]);
		mt=mt/(mt>a[i]?zd(mt,a[i]):zd(a[i],mt))*a[i];
	}
	mt--;rs=0;for(int i=0;i<m;i++)rs+=mt%a[i];
	cout<<rs<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'rs' was not declared in this scope
   16 |         mt--;rs=0;for(int i=0;i<m;i++)rs+=mt%a[i];
      |              ^~
Language: C++

#include<iostream>
using namespace std;
int m,a[3001],rs;　long long mt;
　long long zd(　long long a,　long long b)
{return a%b!=0?zd(b,a%b):b;}
int main()
{
	cin>>m;mt=1;
	for(int i=0;i<m;i++)
	{
		scanf("%d",&a[i]);
		mt=mt/(mt>a[i]?zd(mt,a[i]):zd(a[i],mt))*a[i];
	}
	mt--;
	rs=0;
	for(int i=0;i<m;i++)rs+=mt%a[i];
	cout<<rs<<endl;

}

Compiler output:
a.cc:3:18: error: extended character 　 is not valid in an identifier
    3 | int m,a[3001],rs;　long long mt;
      |                  ^
a.cc:4:1: error: extended character 　 is not valid in an identifier
    4 | 　long long zd(　long long a,　long long b)
      | ^
a.cc:4:16: error: extended character 　 is not valid in an identifier
    4 | 　long long zd(　long long a,　long long b)
      |                ^
a.cc:4:30: error: extended character 　 is not valid in an identifier
    4 | 　long long zd(　long long a,　long long b)
      |                              ^
a.cc:3:18: error: '\U00003000long' does not name a type; did you mean 'ulong'?
    3 | int m,a[3001],rs;　long long mt;
      |                  ^~~~~~
      |                  ulong
a.cc:4:1: error: '\U00003000long' does not name a type; did you mean 'ulong'?
    4 | 　long long zd(　long long a,　long long b)
      | ^~~~~~
      | ulong
a.cc: In function 'int main()':
a.cc:8:16: error: 'mt' was not declared in this scope; did you mean 'tm'?
    8 |         cin>>m;mt=1;
      |                ^~
      |                tm
a.cc:12:32: error: 'zd' was not declared in this scope
   12 |                 mt=mt/(mt>a[i]?zd(mt,a[i]):zd(a[i],mt))*a[i];
      |                                ^~
Language: C++

int main() {
  int N, ans = 0, x;
  scanf("%d", &N);
  for (int i  = 0; i < N; i++) {
       scanf("%d", &x);
       ans = ans + x - 1;
        }
   printf("%d\n", ans);
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'scanf' was not declared in this scope
    3 |   scanf("%d", &N);
      |   ^~~~~
a.cc:8:4: error: 'printf' was not declared in this scope
    8 |    printf("%d\n", ans);
      |    ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <cmath>

using namespace std;
using ll =long long;
#define rep(i,n) for ( int i =0; i < n ; i ++)
bool is_int_lround(double x){
  return std::lround(x)==x;
}
int ketasuu(int x){
  int n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}
ll gcd11(ll x, ll y){
  long long a= max(x,y), b=min(x,y), c=a%b;
  while( c!=0){
    a =b;
    b =c;
    c = a%b;
  }
  return b;
}

int abs(int x, int y){
  if(x>=y){
    return x-y;
  }
  else if(y>x){
    return y-x;
  }
}
int fiv(int n){
  if(n==0){
    return 0;
  }
  else if(n==1){
    return 1;
  }
  return fiv(n-1)+fiv(n-2);
}
int main(){
  int n;
  cin>>n;
  int ans=0;
  vector<int> a(4000)
  rep(i,n){
    cin>>a[i];
    ans+=a[i];
  }
  cout<<ans-n<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ',' or ';' before 'for'
    7 | #define rep(i,n) for ( int i =0; i < n ; i ++)
      |                  ^~~
a.cc:51:3: note: in expansion of macro 'rep'
   51 |   rep(i,n){
      |   ^~~
a.cc:51:7: error: 'i' was not declared in this scope
   51 |   rep(i,n){
      |       ^
a.cc:7:34: note: in definition of macro 'rep'
    7 | #define rep(i,n) for ( int i =0; i < n ; i ++)
      |                                  ^
a.cc: In function 'int abs(int, int)':
a.cc:36:1: warning: control reaches end of non-void function [-Wreturn-type]
   36 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int q[4]={0,1,-1,0};
int w[4]={1,0,0,-1};
int main(){
  ll n;
  cin>>n;
  vll a(n);
  ll ans=0;
  ans-=n
  rep(i,n){
    cin>>a[i];
    ans+=a[i];
  }
  COUT(ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: expected ';' before 'for'
   45 |   ans-=n
      |         ^
      |         ;
a.cc:46:7: error: 'i' was not declared in this scope
   46 |   rep(i,n){
      |       ^
a.cc:7:34: note: in definition of macro 'rep'
    7 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                                  ^
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int q[4]={0,1,-1,0};
int w[4]={1,0,0,-1};
int main(){
  ll n;
  cin>>n;
  ll ans=0;
  vll a(n);
  ll ans=0;
  ans-=n
  rep(i,n){
    cin>>a[i];
    ans+=a[i];
  }
  COUT(ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:6: error: redeclaration of 'long long int ans'
   45 |   ll ans=0;
      |      ^~~
a.cc:43:6: note: 'long long int ans' previously declared here
   43 |   ll ans=0;
      |      ^~~
a.cc:46:9: error: expected ';' before 'for'
   46 |   ans-=n
      |         ^
      |         ;
a.cc:47:7: error: 'i' was not declared in this scope
   47 |   rep(i,n){
      |       ^
a.cc:7:34: note: in definition of macro 'rep'
    7 | #define rep(i, n) for (ll i = 0; i < (n); i++)
      |                                  ^