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

#include <cstdio>
#include <cstring>

long long mypow(long long x, int n) {
    long long ans=1;
    for(int i=0; i<n; i++) {
        ans *= x;
    }
    return ans;
}
int main() {
    char s[11];
    scanf("%s",s);
    int len = strlen(s);
    long long result=0, sum=0;
    for (int cut=0; cut < len; cut++) {
        for (int i=0; i < len; i++) {
            if (i == cut) {
                result += sum * mypow(2,len-cut-1);
                sum = 0;
            }
            sum = 10*sum + (s[i]-'0');
        }
        result += sum * mypow(2,cut-1);
        sum = 0;
    }
    printf("%lld\n",result);
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: expected '}' at end of input
   28 |     return 0;
      |              ^
a.cc:11:12: note: to match this '{'
   11 | int main() {
      |            ^
Language: C++

if __name__=='__main__':
  S=input()
  sums=0
  num=[x for x in range(1,len(S))]
  for i in range(0,1<<len(num)):
    output=[]
    for j in range(len(num)):
      if ((i>>j)&1)==1:
        output.append(num[j])
    output.append(10)
    t=0
    for o in output:
      sums+=int(S[t:o])
      t=o
  print(sums)
      

Compiler output:
a.cc:1:14: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    1 | if __name__=='__main__':
      |              ^~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if __name__=='__main__':
      | ^~
Language: C++

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

long calc(char *target) {
	long ans = 0;
	char *p = strtok(target, "+");
	while(p) {
		ans += atol(p);
		p = strtok(NULL, "+");
	}
	return ans;
}

main() {
	char S[21];
	scanf("%s", S);

	int i;
	int n = strlen(S);
	
	char target[41];
	int j;
	
	long ans = 0;
	for(i=0;i< 1<< (n - 1); i++) {
		strcpy(target ,S);
		int target_pos = 0;
		for(j=0;j<n;j++) {
			target[target_pos++] = S[j];

			if( ((i >> j) & 1)  == 1) {
				target[target_pos++] = '+';
			}
		}
		target[target_pos] = '\0';
		ans += calc(target);
	}
	printf("%ld\n", ans);
}


Compiler output:
a.cc: In function 'long int calc(char*)':
a.cc:8:24: error: 'atol' was not declared in this scope
    8 |                 ans += atol(p);
      |                        ^~~~
a.cc: At global scope:
a.cc:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   14 | main() {
      | ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  string s; cin >> s;
  int t = atoi("s");
  int a = s.size();
  int count = 0;
  for(int i = 0; i < a; ++i){
    count += atoi(s[0:i]) + atoi(s[i:a - 1]);
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ']' before ':' token
   11 |     count += atoi(s[0:i]) + atoi(s[i:a - 1]);
      |                      ^
      |                      ]
a.cc:11:22: error: expected ')' before ':' token
   11 |     count += atoi(s[0:i]) + atoi(s[i:a - 1]);
      |                  ~   ^
      |                      )
Language: C++

#include <cstdio>
#include <cmath>
int calc(int left, int sum) {
  if (left < 10) {
    return sum + left;
  }
  else {
    sum += left;
    for(int i=1;i < log10(left)+1;i++){
    int right = left % (int) pow(10,i);
    left = left / pow(10,i);
    sum += calc(left,0)+calc(right,0);
    }
    return sum;
  }
}

void solve() {
  char S;
  int iS;
  scanf(" %c", &S);
  iS = (int)S;
  printf("%d\n", calc(iS, 0));
  }



Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#define CATCH_CONFIG_MAIN
#include <cstdio>
#include <cmath>
int calc(int left, int sum) {
  if (left < 10) {
    return sum + left;
  }
  else {
    sum += left;
    for(int i=1;i < log10(left)+1;i++){
    int right = left % (int) pow(10,i);
    left = left / pow(10,i);
    sum += calc(left,0)+calc(right,0);
    }
    return sum;
  }
}

void solve() {
  char S;
  int iS;
  scanf(" %c", &S);
  iS = (int)S;
  printf("%d\n", calc(iS, 0));
  }



Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

// https://qiita.com/drken/items/e77685614f3c6bf86f44
// https://,0)arc061.contest.atcoder.jp/tasks/arc061_a
#define CATCH_CONFIG_MAIN
#include <cstdio>
#include <cmath>
#include <catch2/catch.hpp>
int calc(int left, int sum) {
  if (left < 10) {
    return sum + left;
  }
  else {
    sum += left;
    for(int i=1;i < log10(left)+1;i++){
    int right = left % (int) pow(10,i);
    left = left / pow(10,i);
    sum += calc(left,0)+calc(right,0);
    }
    return sum;
  }
}

void solve() {
  char S;
  int iS;
  scanf(" %c", &S);
  iS = (int)S;
  printf("%d\n", calc(iS, 0));
  }



Compiler output:
a.cc:6:10: fatal error: catch2/catch.hpp: No such file or directory
    6 | #include <catch2/catch.hpp>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <stdint.h>
using namespace std;

uint64_t test(uint64_t x, char *s) {
  if (*s == '\0') {
    return x;
  }
  uint64_t i = x + atoll(s);
  for(int j = 1; j < strlen(s); j++) {
    char tmp[j + 1];
    memcpy(tmp, s, j);
    tmp[j] = '\0';
    i += test(x + atoll(tmp), s + j);
  }
  return i;
}

int main() {
  char s[11];
  cin >> s;
  cout << test(0, s);
  return 0;
}

Compiler output:
a.cc: In function 'uint64_t test(uint64_t, char*)':
a.cc:10:22: error: 'strlen' was not declared in this scope
   10 |   for(int j = 1; j < strlen(s); j++) {
      |                      ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdint.h>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc:12:5: error: 'memcpy' was not declared in this scope
   12 |     memcpy(tmp, s, j);
      |     ^~~~~~
a.cc:12:5: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: Java

import java.util.Scanner;
public class Main {
  public static void main(String[] args) {

	  String ans="";
	  long sum = 0;
	  Scanner sc = new Scanner(System.in);

	  char[] charArray = sc.next().toCharArray();

	  for(int bit = 0; bit < Math.pow(2, charArray.length -1) ; bit++) {
		  ans = String.valueOf(charArray[0]);
		  for(int i = 0 ; i < charArray.length - 1 ;i++) {
			  if((1 & (bit >> i)) == 1) {
				 ans += ",";
			  }
			  ans += String.valueOf(charArray[i+1]);
		  }
		  String num[] = ans.split(",");
			  for(int i = 0; i < num.length;i++) {
				  sum += Long.valueOf(num[i]);
		  }
	  }
	  System.out.println(sum);
	  sc.close();

  }


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

#include <bits/stdc++.h>
using namespace std;
char s[12345];
int main(int argc, char const *argv[])
{
  scanf("%c",&s);
  int n = strlen(s);
  long long ret = 0;
  for (int i = 0; i < 1<<(n-1); ++i)
  {
    long long now = 0;
    long long sum = 0;
    for (int j  = 0; j < n; ++j)
    {
      now=now*10 long long;
      now+=s[i]-'0';
      if (i<n-1&&(s>>i&1))
      {
        sum+=now;
        now =0;
      }
    }
    sum+=now;
    ret+=sum;
  }
  printf("%lld\n",ret);
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:17: error: expected ';' before 'long'
   15 |       now=now*10 long long;
      |                 ^~~~~
      |                 ;
a.cc:17:20: error: invalid operands of types 'char [12345]' and 'int' to binary 'operator>>'
   17 |       if (i<n-1&&(s>>i&1))
      |                   ~^~~
      |                   |  |
      |                   |  int
      |                   char [12345]
Language: C++

#include <bits/stdc++.h>
using namespace std;
char s[12345];
int main(int argc, char const *argv[])
{
  scanf("%s",&s);
  int n = strlen(s);
  long long ret = 0;
  for (int i = 0; i < 1<<(n-1); ++i)
  {
    long long now = 0;
    long long sum = 0;
    for (int j  = 0; j < n; ++j)
    {
      now=now*10 long long
      now+=s[i]-'0';
      if (i<n-1&&(s>>i&1))
      {
        sum+=now;
        now =0;
      }
    }
    sum+=now;
    ret+=sum;
  }
  printf("%lld\n",ret);
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:17: error: expected ';' before 'long'
   15 |       now=now*10 long long
      |                 ^~~~~
      |                 ;
a.cc:17:20: error: invalid operands of types 'char [12345]' and 'int' to binary 'operator>>'
   17 |       if (i<n-1&&(s>>i&1))
      |                   ~^~~
      |                   |  |
      |                   |  int
      |                   char [12345]
Language: C++

#include<bits/stdc++.h>
#include<windows.h>
#define ll long long
using namespace std;
int main(){
	string s;
	cin>>s;
	ll ans=0,num=0;
	for(int i=0;i<(1<<s.size()-1);i++){
		for(int j=0;j<s.size();j++){
			num=num*10+s[j]-'0';
			if(i & 1<<j){
				ans+=num;
				num=0;
			}
		}
		ans+=num;
		num=0;
	}
	Sleep(10000);
	cout<<ans<<endl;
	return 0;
}

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

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
	string s;
	cin>>s;
	ll ans=0,num=0;
	for(int i=0;i<(1<<s.size()-1);i++){
		for(int j=0;j<s.size();j++){
			num=num*10+s[j]-'0';
			if(i & 1<<j){
				ans+=num;
				num=0;
			}
		}
		ans+=num;
		num=0;
	}
	Sleep(1000);
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'Sleep' was not declared in this scope; did you mean 'sleep'?
   19 |         Sleep(1000);
      |         ^~~~~
      |         sleep
Language: C++

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

typedef long long ll;

int n;
ll ans;
bool flg[12];
string s;

void calc() {
  vector<string> v;
  int idx = 0;
  string tmp;

  while (true) {
    if (idx > 0 && flg[idx - 1]) {
      v.push_back(tmp);
      tmp = "";
    }
    
    if (idx == n) {
      break;
    }
    tmp += s[idx];
    idx++;
  }

  for (int i = 0; i < v.size(); i++) {
    ans += atoll(v[i].c_str());
  }
}

void dfs(int idx) {
  if (idx == n - 1) {
    calc();
    return;
  }

  flg[idx] = true;
  dfs(idx + 1);
  flg[idx] = false;
  dfs(idx + 1);
}

int main() {
  while (cin >> s) {
    n = s.size();
    ans = 0;
    memset(flg, 0, sizeof(flg));
    flg[n - 1] = true;
    dfs(0);
    cout << ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:5: error: 'memset' was not declared in this scope
   53 |     memset(flg, 0, sizeof(flg));
      |     ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <cstdlib>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

s = input()
n = len(s)
ans = 0
for i in range(1 << (n-1)):
    formula = s[0]
    for j in range(n-1):
        if (i >> j) & 1 == 1:
            formula += s[j+1]
        else:
            formula += '+' + s[j+1]
    ans += eval(formula)
print(ans)
                                     


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

#include <bits/stdc++.h>
#typedef long long ll
using namespace std;
inline ll pow10(ll a){
  if(!a)return 1;
  return pow10(a-1)*10;
}
int main(){
  ll a,ans;
  cin>>a;
  ans+=a;
  ll dig=log10(a)+1;
  for(ll i=dig;i>0;i--){
    for(ll j=dig-i;j>=0;j--){
      ans+=a/pow10(j)%pow10(i)<<i-1;
    }
  }
  cout<<a;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #typedef
    2 | #typedef long long ll
      |  ^~~~~~~
a.cc:4:8: error: 'll' does not name a type
    4 | inline ll pow10(ll a){
      |        ^~
a.cc: In function 'int main()':
a.cc:9:3: error: 'll' was not declared in this scope
    9 |   ll a,ans;
      |   ^~
a.cc:10:8: error: 'a' was not declared in this scope
   10 |   cin>>a;
      |        ^
a.cc:11:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   ans+=a;
      |   ^~~
      |   abs
a.cc:12:5: error: expected ';' before 'dig'
   12 |   ll dig=log10(a)+1;
      |     ^~~~
      |     ;
a.cc:13:9: error: expected ';' before 'i'
   13 |   for(ll i=dig;i>0;i--){
      |         ^~
      |         ;
a.cc:13:16: error: 'i' was not declared in this scope
   13 |   for(ll i=dig;i>0;i--){
      |                ^
a.cc:14:11: error: expected ';' before 'j'
   14 |     for(ll j=dig-i;j>=0;j--){
      |           ^~
      |           ;
a.cc:14:20: error: 'j' was not declared in this scope; did you mean 'jn'?
   14 |     for(ll j=dig-i;j>=0;j--){
      |                    ^
      |                    jn
a.cc:15:14: error: 'pow10' was not declared in this scope
   15 |       ans+=a/pow10(j)%pow10(i)<<i-1;
      |              ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  ll a;
  cin>>a;
  a+=a/10+a%1e9+((a/1e2+a/10%1e8+a%1e8)<<1)+((a/1e3+a/1e2%1e7+a/10%1e7+a%1e7)<<2)+((a/1e4+a/1e3%1e6+a/1e2%1e6+a/10%1e6+a%1e6)<<3)+((a/1e5+a/1e4%1e5+a/1e3%1e5+a/1e2%1e5+a/10%1e5+a%1e5)<<4)+((a/1e6+a/1e5%1e4+a/1e4%1e4+a/1e3%1e4+a/1e2%1e4+a/10%1e4+a%1e4)<<5)+((a/1e7+a/1e6%1e3+a/1e5%1e3+a/1e4%1e3+a/1e3%1e3+a/1e2%1e3+a/10%1e3+a%1e3)<<6)+((a/1e8+a/1e7%100+a/1e6%100+a/1e5%100+a/1e4%100+a/1e3%100+a/1e2%100+a/10%100+a%100)<<7)+((a/1e9+a/1e8%10+a/1e7%10+a/1e6%10+a/1e5%10+a/1e4%10+a/1e3%10+a/1e2%10+a/10%10+a%10)<<8);
  cout<<a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll a;
      |   ^~
a.cc:5:8: error: 'a' was not declared in this scope
    5 |   cin>>a;
      |        ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int ll;

#define all(x) x.begin(),x.end()

const ll mod = 1e9+7;
const ll INF = 1e9;
const ll MAXN = 1e9;

int main()
{
    string s;
    cin >> s;

    int n = s.size()-1;
    ll sol = 0;
    for(int bit = 0; bit < (1<<n); bit++){
        ll now = 0;
        cout << bitset<8>(bit) << endl;
        for(int i = 0; i < n+1; i++){
            now *= 10;
            now += s[i] - '0';
            if(!(bit&(1<<i))){  //bitが立ってない -> +があるので加算   bitが立ってる -> +がない
                //cout << bitset<8>(bit&(1<<i)) << endl;
                cout << now << endl;
                sol += now;
                now = 0;
            }
        }
    }

    cout << sol << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'bitset' was not declared in this scope
   30 |         cout << bitset<8>(bit) << endl;
      |                 ^~~~~~
a.cc:10:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    9 | #include <cmath>
  +++ |+#include <bitset>
   10 | 
a.cc:30:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   30 |         cout << bitset<8>(bit) << endl;
      |                          ~~~~~~^~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int ll;

#define all(x) x.begin(),x.end()

const ll mod = 1e9+7;
const ll INF = 1e9;
const ll MAXN = 1e9;

int main()
{
    string s;
    cin >> s;

    int n = s.size()-1;
    ll sol = 0;
    for(int bit = 0; bit < (1<<n); bit++){
        int now = 0;
        cout << bitset<8>(bit) << endl;
        for(int i = 0; i < n+1; i++){
            now *= 10;
            now += s[i] - '0';
            if(!(bit&(1<<i))){  //bitが立ってない -> +があるので加算   bitが立ってる -> +がない
                //cout << bitset<8>(bit&(1<<i)) << endl;
                cout << now << endl;
                sol += now;
                now = 0;
            }
        }
    }

    cout << sol << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'bitset' was not declared in this scope
   30 |         cout << bitset<8>(bit) << endl;
      |                 ^~~~~~
a.cc:10:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
    9 | #include <cmath>
  +++ |+#include <bitset>
   10 | 
a.cc:30:32: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   30 |         cout << bitset<8>(bit) << endl;
      |                          ~~~~~~^~~~~~~
Language: C++

#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<iostream>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<vector>
#define pa pair<int,int>
 
using namespace std;

const int MAXN=1000010;
int dis[MAXN];
vector <pa> g[MAXN];
vector <int> new_g[MAXN],all[MAXN];
int visit[MAXN],ptr[MAXN];
queue <int> q;
int main()
{
	int n,m;
	scanf("%d%d",&n,&m);
	for (int i=1;i<=m;i++)
	{
		int u,v,c;
		scanf("%d%d%d",&u,&v,&c);
		u--,v--;
		g[u].push_back(make_pair(c,v));
		g[v].push_back(make_pair(c,u));
		all[c].push_back(u);
		all[c].push_back(v);
	}
	for (int i=0;i<n;i++)
	{
		sort(g[i].begin(),g[i].end());
		visit[i]=-1;
	}
	int newn=n;
	for (int i=0;i<MAXN;i++)
	{
		if (all[i].empty())
		{
			continue;
		}
		for (int it=0;it<all[i].size();it++)
		{
			int v=all[i][it];
			if (visit[v]==i)
			{
				continue;
			}
			visit[v]=i;
			new_g[x].push_back(newn);
			new_g[newn].push_back(x);	
			newn++;
		}
	}
	for (int i=0;i<newn;i++)
	{
		dis[i]=-2;
	}
	q.push(0);
	dis[0]=0;
	while (!q.empty())
	{
		int x=q.front();
		q.pop();
		for (int i=0;i<new_g[x].size();i++)
		{
			int u=new_g[x][i];
			if (dis[u]==-2)
			{
				dis[u]=dis[x]+1;
				q.push(u);	
			}
		}
	}
	cout<<dis[n-1]/2;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:31: error: 'x' was not declared in this scope
   54 |                         new_g[x].push_back(newn);
      |                               ^
Language: C++

(ns Atcoder.ARC061-A)

(def S (read-line))

(def len (count S))

(defn char2int [c]
  (- (int c) (int \0))
  )
(defn calc [i]
  (loop [j 1 now (char2int (nth S 0)) sum 0]
    (if (= len j)
      (+ sum now)
      (if (= (bit-and 1 (bit-shift-right i (dec j))) 1)
        (recur (inc j) (char2int (nth S j)) (+ sum now))
        (recur (inc j) (+ (* now 10) (char2int (nth S j))) sum)
        )
      )
    )
  )
(def ans (reduce + (for [i (range 0 (Math/pow 2 (dec len)))] (calc i))))
(println ans)

Compiler output:
a.cc:8:19: error: stray '\' in program
    8 |   (- (int c) (int \0))
      |                   ^
a.cc:1:4: error: expected ')' before 'Atcoder'
    1 | (ns Atcoder.ARC061-A)
      | ~  ^~~~~~~~
      |    )
Language: C++

s = raw_input()
l = len(s)
ans = 0
for p in range(l):
    for q in range(p+1,l+1):
        ans += int(s[p:q]) * (2**max(p-1,0)) * (2**max(l-q-1,0))
print ans


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

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

using namespace std;

string S;

long long all_sum = 0;

void search(int i, int j, int sum)
{
		if(i == S.length())
		{
				all_sum += (sum + stoll(S.substr(j)));
		}
		else
		{
				search(i+1, i, sum + stoll(S.substr(j, i-j)));
				search(i+1, j, sum);
		}
}


int main(int argc, char const* argv[])
{
		cin >> S;

		search(1,0,0);
		cout << all_sum << endl;

		return 0;
}
#include <iostream>
#include <string>
#include <vector>
#include <cstdio>

using namespace std;

string S;

long long all_sum = 0;

void search(int i, int j, int sum)
{
		if(i == S.length())
		{
				all_sum += (sum + stoll(S.substr(j)));
		}
		else
		{
				search(i+1, i, sum + stoll(S.substr(j, i-j)));
				search(i+1, j, sum);
		}
}


int main(int argc, char const* argv[])
{
		cin >> S;

		search(1,0,0);
		cout << all_sum << endl;

		return 0;
}


Compiler output:
a.cc:42:8: error: redefinition of 'std::string S'
   42 | string S;
      |        ^
a.cc:8:8: note: 'std::string S' previously declared here
    8 | string S;
      |        ^
a.cc:44:11: error: redefinition of 'long long int all_sum'
   44 | long long all_sum = 0;
      |           ^~~~~~~
a.cc:10:11: note: 'long long int all_sum' previously defined here
   10 | long long all_sum = 0;
      |           ^~~~~~~
a.cc:46:6: error: redefinition of 'void search(int, int, int)'
   46 | void search(int i, int j, int sum)
      |      ^~~~~~
a.cc:12:6: note: 'void search(int, int, int)' previously defined here
   12 | void search(int i, int j, int sum)
      |      ^~~~~~
a.cc:60:5: error: redefinition of 'int main(int, const char**)'
   60 | int main(int argc, char const* argv[])
      |     ^~~~
a.cc:26:5: note: 'int main(int, const char**)' previously defined here
   26 | int main(int argc, char const* argv[])
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n,m) for (int i=n; i<m; i++)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}
#define Yes(condition) if(condition){cout << "Yes" << endl;}else{cout << "No" << endl;}
#define Cout(x) cout<<(x)<<endl
#define POSSIBLE(n) cout << ((n) ? "POSSIBLE" : "IMPOSSIBLE"  ) << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible"  ) << endl
#define possible(n) cout << ((n) ? "possible" : "impossible"  ) << endl
#define Size(n) (n).size()

bool dfs(int i, int d, long long sum, string s, int l);

long long  ssum=0;
int l;
string s;

int main(){

    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> s;
    l = s.length();

    dfs(1,0,0);
    cout<<ssum<<endl;
    return 0;
}

int dfs(int i, int d, long long sum){
    if (i==l){
        sum = sum+stoll(s.substr(d,i-d));
        ssum += sum;
        return 0;
    }
    else{
    dfs(i+1,i,sum+stoll(s.substr(d,i-d)));
    dfs(i+1,d,sum);
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:30:8: error: too few arguments to function 'bool dfs(int, int, long long int, std::string, int)'
   30 |     dfs(1,0,0);
      |     ~~~^~~~~~~
a.cc:16:6: note: declared here
   16 | bool dfs(int i, int d, long long sum, string s, int l);
      |      ^~~
a.cc: In function 'int dfs(int, int, long long int)':
a.cc:43:8: warning: control reaches end of non-void function [-Wreturn-type]
   43 |     dfs(i+1,d,sum);
      |     ~~~^~~~~~~~~~~
Language: C++

S=input()
l=len(S)

out = 0;

for i in range(l):
    out += int(S[i:l])

Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S=input()
      | ^
a.cc:6:1: error: expected unqualified-id before 'for'
    6 | for i in range(l):
      | ^~~
Language: C++

//http://codeforces.com/problemset/problem 
#include <string>
#include<iostream >
#include<utility>
#include<cstdlib>
#include <cstdio>
#include <vector>
#include <queue>
#include <cmath>
#include <map>
#include <set>
#include <algorithm>
#include <deque>
#include <stdio.h>
#include <fstream>
#include <ctime>
#include <cstring>
#include <iomanip>
#include <cassert>
#include <complex>
#include <functional>
#include <list> 
#include <bits/stdc++.h>
using namespace std; 
char c[12345];
int main ()		
{ 
	cin >>c;
	int len=strlen(c);
	long long ans=0;
	for (int t=0;t<(1<<len-1);t++)
	{
		long long num=c[0]-'0';
		for (int i=0;i<len-1;i++)
		{
			if (t&(1<<i))
			{
				ans+=num;
				num=0;
			}
			num=num*10+c[i+1]-'0';
		}
		ans+=num;
	} 
	cout <<ans;
	
 }  

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

#include<bits\\stdc++.h>
using namespace std;
char s[12345];
int main(){
	scanf("%s",s);
	int len=strlen(s);
	long long ans=0;
	for(int t=0;t<(1<<(len-1));t++){
		long long num=s[0]-'0';
		for(int i=0;i<len-1;i++){
			if(t&(1<<i)){
				ans+=num;
				num=0;
			}
			num=num*10+s[i+1]-'0';
		}
		ans+=num;
	}
	cout<<ans;
}

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

#include<bits\\stdc++.h>
using namespace std;
int n;
char wcz[1007];
int czy[1007];
long long wyn;
void check(){
	czy[n]=1;
	long long aktu=0;
	for(int i=1;i<=n;i++){
		aktu*=10;
		aktu+=wcz[i]-'0';
		if(czy[i]){
			wyn+=aktu;
			aktu=0;
		}
	}
}
void rek(int v){
	if(v==n){
		check();
		return;
	}
	czy[v]=0;
	rek(v+1);
	czy[v]=1;
	rek(v+1);
}
int main(){
	scanf("%s",wcz+1);
	while(wcz[n+1])
		n++;
	rek(1);
	printf("%lld\n",wyn);
}

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

#include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <random>
#include <string>
#include <bitset>
#include <map>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <cstring>
#include <cstdlib>
#include <cctype>

#define rep(i, n) for(int i = 0; i < n; ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define FORR(i, m, n) for(int i = m; i >= n; --i)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
#define INF 999999999

using namespace std;

typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};

llong pow(int x, int n) {
    llong ans = x;
    if (n == 0) return 1;

    for(int i = 0; i < n - 1; i++) {
        ans *= x;
    }

    return ans;
}

void swap(int *X, int *Y){
    int t = *X; *X = *Y; *Y = t;
}

const static int nmax = 40, abmax = 10;

int dp[nmax + 1][nmax * abmax + 1][nmax * abmax + 1];

int main() {
    int n;
    cin >> S;
    string S;
    n = S.length();
    llong ans = 0;
    rep (i, 1 << (n - 1)) {
        llong sum = 0;
        llong a = S[0] - '0';
        rep (j, n - 1) {
            if (i & (1 << j)) {
                sum += a;
                a = 0;
            }
            a = a * 10 + S[j + 1] - '0';
        }
        sum += a;
        ans += sum;
    }

    cout << ans << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:12: error: 'S' was not declared in this scope
   60 |     cin >> S;
      |            ^
Language: C++

#include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <random>
#include <string>
#include <bitset>
#include <map>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <cstring>
#include <cstdlib>
#include <cctype>

#define rep(i, n) for(int i = 0; i < n; ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define FOR(i, m, n) for(int i = m; i < n; ++i)
#define FORR(i, m, n) for(int i = m; i >= n; --i)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
#define INF 999999999

using namespace std;

typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};

llong pow(int x, int n) {
    llong ans = x;
    if (n == 0) return 1;

    for(int i = 0; i < n - 1; i++) {
        ans *= x;
    }

    return ans;
}

void swap(int *X, int *Y){
    int t = *X; *X = *Y; *Y = t;
}

const static int nmax = 40, abmax = 10;

int dp[nmax + 1][nmax * abmax + 1][nmax * abmax + 1];

int main() {
    int n;
    string S;
    n = strlen(S);
    llong ans = 0;
    rep (i, 1 << (n - 1)) {
        llong sum = 0;
        llong a = S[0] - '0';
        rep (j, n - 1) {
            if (i & (1 << j)) {
                sum += a;
                a = 0;
            }
            a = a * 10 + S[j + 1] - '0';
        }
        sum += a;
        ans += sum;
    }
    
    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   61 |     n = strlen(S);
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:14:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

ll stoll(string s) {
  ll res = 0;
  for (int i = 0; i < s.size(); i++) {
    res = res * 10 + (s[i] - '0');
  }
  return res;
}

ll dfs(string &s, int p, int w, ll sum) {
  if (p + w == s.size()) return sum + stoll(s.substr(p, w));
  return dfs(s, p + w, 1, sum + stoll(s.substr(p, w))) + dfs(s, p, w + 1, sum);
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  string s;
  cin >> s;
  cout << dfs(s, 0, 1, 0) << endl;

  return 0;
}

Compiler output:
a.cc: In function 'll dfs(std::string&, int, int, ll)':
a.cc:16:44: error: call of overloaded 'stoll(std::__cxx11::basic_string<char>)' is ambiguous
   16 |   if (p + w == s.size()) return sum + stoll(s.substr(p, w));
      |                                       ~~~~~^~~~~~~~~~~~~~~~
a.cc:7:4: note: candidate: 'll stoll(std::string)'
    7 | ll stoll(string s) {
      |    ^~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4180:3: note: candidate: 'long long int std::__cxx11::stoll(const std::string&, std::size_t*, int)'
 4180 |   stoll(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~~
a.cc:17:38: error: call of overloaded 'stoll(std::__cxx11::basic_string<char>)' is ambiguous
   17 |   return dfs(s, p + w, 1, sum + stoll(s.substr(p, w))) + dfs(s, p, w + 1, sum);
      |                                 ~~~~~^~~~~~~~~~~~~~~~
a.cc:7:4: note: candidate: 'll stoll(std::string)'
    7 | ll stoll(string s) {
      |    ^~~~~
/usr/include/c++/14/bits/basic_string.h:4180:3: note: candidate: 'long long int std::__cxx11::stoll(const std::string&, std::size_t*, int)'
 4180 |   stoll(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~~
Language: C++

#include <iostream>
#include <cmath>
#include <string>

using namespace std;

#define MAX_S 10

// 入力
char s[MAX_S];

long long ans = 0;
long long arr[MAX_S] = {1, 11, 112, 1124, 11248, 112496, 1124992, 11249984, 112499968, 1124999936};

int main() {
    cin >> s;

    int le = strlen(s);
    for (int i = 0; i < le; ++i) {
        ans += arr[le - i - 1] * pow(2, i) * (s[i] - '0');
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'strlen' was not declared in this scope
   18 |     int le = strlen(s);
      |              ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cmath>
  +++ |+#include <cstring>
    3 | #include <string>
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

#define MAX_S 10

// 入力
char s[MAX_S];

long long ans = 0;
long long arr[MAX_S] = {1, 11, 112, 1124, 11248, 112496, 1124992, 11249984, 112499968, 1124999936};

int main() {
    cin >> s;

    int le = strlen(s);
    for (int i = 0; i < le; ++i) {
        ans += arr[le - i - 1] * pow(2, i) * (s[i] - '0');
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: 'strlen' was not declared in this scope
   17 |     int le = strlen(s);
      |              ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cmath>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <functional>
using namespace std;

typedef long long ll;


vector<pair<int, int>> edg[100003];
set<pair<int, int>> used;
priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<pair<int, pair<int, int>>>> que;

int main() {
	int n, m; cin >> n >> m;
	for (int i = 0; i < m; ++i) {
		int p, q, c; cin >> p >> q >> c;
		--p; --q;
		edg[p].push_back({ q, c });
		edg[q].push_back({ p, c })
    }    
          
	que.push({ 0, {0, -1} });
	while (!que.empty()) {
		int d = que.top().first; pair<int, int> pos = que.top().second;
		que.pop();
		if (pos.first == n - 1) {
			cout << d << endl;
			return 0;
		}
		if (used.count(pos) == 1) continue;
		used.insert(pos);
		int t = pos.first, c = pos.second;
		if (c == -1) {
			for (int i = 0; i < (int)edg[t].size(); ++i) {
				if (used.count(edg[t][i]) == 1) continue;
				que.push({ d + 1, edg[t][i] });
			}
		}
		else {
			for (int i = 0; i < (int)edg[t].size(); ++i) {
				if (c != edg[t][i].second) {
					if (used.count({ t, -1 }) == 1) continue;
					que.push({ d,{t, -1} });
				}
				else {
					if (used.count(edg[t][i]) == 1) continue;
					que.push({ d, edg[t][i] });
				}
			}
		}
	}
	cout << -1 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:43: error: expected ';' before '}' token
   27 |                 edg[q].push_back({ p, c })
      |                                           ^
      |                                           ;
   28 |     }
      |     ~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int keta(int n){
    int ans=0;
    while(n>0){
        ans++;
        n/=10;
    }
    return ans;
}
int main(void){
    string s;
    cin>>s;
    vector<long long> a(s.size());
    for(int i=0;i<s.size();i++){
        for(int j=0;j<i;j++){
            a[i]+=pow(2,j)*pow(10,i-j);
        }
        a[i]/=10;
        a[i]+=pow(10,keta(a[i]));
        a[i]*=pow(2,s.size()-i-1);
    }
    long long ans=0;
    for(int i=0;i<s.size();i++){
        ans+=(s[i]-'0')*a[s.size()-i-1];
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: 'pow' was not declared in this scope
   20 |             a[i]+=pow(2,j)*pow(10,i-j);
      |                   ^~~
a.cc:23:15: error: 'pow' was not declared in this scope
   23 |         a[i]+=pow(10,keta(a[i]));
      |               ^~~
Language: C++

#include"stdio.h"
#include"stdlib.h"
#include"string.h"
#include"math.h"


int main(){

	unsigned _int64 S = 0;
	unsigned _int64 SS = 0;
	int N = 0;
	int i = 0, j = 0;
	char str[11];
	int plus[9] = {};

	_int64 stack = 0;
	
	scanf("%s", str);	
	N = strlen(str);
	

	for (i = 0; i < pow((double)2, N - 1) ; i++){
		stack = 0;
		S = 0;
		if (i != 0){
			if (plus[0] == 0){
				plus[0] = 1;
			}
			else{
				plus[0] = 0;
				if (plus[1] == 0){
					plus[1] = 1;
				}
				else{
					plus[1] = 0;
					if (plus[2] == 0){
						plus[2] = 1;
					}
					else{
						plus[2] = 0;
						if (plus[3] == 0){
							plus[3] = 1;
						}
						else{
							plus[3] = 0;
							if (plus[4] == 0){
								plus[4] = 1;
							}
							else{
								plus[4] = 0;
								if (plus[5] == 0){
									plus[5] = 1;
								}
								else{
									plus[5] = 0;
									if (plus[6] == 0){
										plus[6] = 1;
									}
									else{
										plus[6] = 0;
										if (plus[7] == 0){
											plus[7] = 1;
										}
										else{
											plus[7] = 0;
											if (plus[8] == 0){
												plus[8] = 1;
											}
										}
									}
								}
							}

						}
					}
				}
			}
		}
		/*
		for (j = 0; j < N - 1;j++){
			printf("%d ",plus[j]);
		}
		printf("\n");
		*/
		stack += (str[0]-'0');
		for (j = 1; j < N; j++){
			if (plus[j - 1] == 0){
				stack = stack * 10 + (str[j]-'0');
			}
			else{
				S += stack;
				//printf("%d ", stack);
				stack = (str[j]-'0');
				
			}
			
		}
		//printf("%d \n",stack);
		S += stack;
		//printf("%d\n",S);
		SS += S;
		//printf("%d\n", SS);
		
	}

	printf("%d", SS);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected initializer before 'S'
    9 |         unsigned _int64 S = 0;
      |                         ^
a.cc:10:25: error: expected initializer before 'SS'
   10 |         unsigned _int64 SS = 0;
      |                         ^~
a.cc:16:9: error: '_int64' was not declared in this scope; did you mean 'sinf64'?
   16 |         _int64 stack = 0;
      |         ^~~~~~
      |         sinf64
a.cc:23:17: error: 'stack' was not declared in this scope; did you mean 'obstack'?
   23 |                 stack = 0;
      |                 ^~~~~
      |                 obstack
a.cc:24:17: error: 'S' was not declared in this scope
   24 |                 S = 0;
      |                 ^
a.cc:101:17: error: 'SS' was not declared in this scope
  101 |                 SS += S;
      |                 ^~
a.cc:106:22: error: 'SS' was not declared in this scope
  106 |         printf("%d", SS);
      |                      ^~
Language: C++

#include"stdio.h"
#include"stdlib.h"
#include"string"

int flag(int plus[], int N){
	int S = 1;
	for (int i = 0; i < N - 1; i++){
		S *= plus[i];
	}
	return S;
}

int main(){

	long long int S = 0;
	long long int SS = 0;
	int N = 0;
	int i = 0, j = 0;
	char str[10];
	int plus[9] = {};
	int data[10] = {};
	int stack = 0;
	scanf("%s", str);
	
	N = strlen(str);
	

	for (i = 0; i < pow(2, N - 1) ; i++){
		stack = 0;
		S = 0;
		if (i != 0){
			if (plus[0] == 0){
				plus[0] = 1;
			}
			else{
				plus[0] = 0;
				if (plus[1] == 0){
					plus[1] = 1;
				}
				else{
					plus[1] = 0;
					if (plus[2] == 0){
						plus[2] = 1;
					}
					else{
						plus[2] = 0;
						if (plus[3] == 0){
							plus[3] = 1;
						}
						else{
							plus[3] = 0;
							if (plus[4] == 0){
								plus[4] = 1;
							}
							else{
								plus[4] = 0;
								if (plus[5] == 0){
									plus[5] = 1;
								}
								else{
									plus[5] = 0;
									if (plus[6] == 0){
										plus[6] = 1;
									}
									else{
										plus[6] = 0;
										if (plus[7] == 0){
											plus[7] = 1;
										}
										else{
											plus[7] = 0;
											if (plus[8] == 0){
												plus[8] = 1;
											}
										}
									}
								}
							}

						}
					}
				}
			}
		}
		
		
		for (j = 0; j < N - 1; j++){
		}
		

		stack += (str[0]-48);
		for (j = 1; j < N; j++){
			if (plus[j - 1] == 0){
				stack = stack * 10 + (str[j]-48);
			}
			else{
				S += stack;
				
				stack = (str[j]-48);
				
			}
			
		}
		S += stack;
		SS += S;
		
	}

	printf("%d", SS);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: 'strlen' was not declared in this scope
   25 |         N = strlen(str);
      |             ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include"string"
  +++ |+#include <cstring>
    4 | 
a.cc:28:25: error: 'pow' was not declared in this scope
   28 |         for (i = 0; i < pow(2, N - 1) ; i++){
      |                         ^~~
Language: C++

#include"stdio.h"
#include"stdlib.h"
#include"string"

int flag(int plus[], int N){
	int S = 1;
	for (int i = 0; i < N - 1; i++){
		S *= plus[i];
	}
	return S;
}

int main(){

	long long int S = 0;
	long long int SS = 0;
	int N = 0;
	int i = 0, j = 0;
	char str[10];
	int plus[9] = {};
	int data[10] = {};
	int stack = 0;
	scanf("%s", str);
	
	N = strlen(str);
	

	for (i = 0; i < pow(2, N - 1) ; i++){
		stack = 0;
		S = 0;
		if (i != 0){
			if (plus[0] == 0){
				plus[0] = 1;
			}
			else{
				plus[0] = 0;
				if (plus[1] == 0){
					plus[1] = 1;
				}
				else{
					plus[1] = 0;
					if (plus[2] == 0){
						plus[2] = 1;
					}
					else{
						plus[2] = 0;
						if (plus[3] == 0){
							plus[3] == 1;
						}
						else{
							plus[3] = 0;
							if (plus[4] == 0){
								plus[4] == 1;
							}
							else{
								plus[4] = 0;
								if (plus[5] == 0){
									plus[5] == 1;
								}
								else{
									plus[5] = 0;
									if (plus[6] == 0){
										plus[6] == 1;
									}
									else{
										plus[6] = 0;
										if (plus[7] == 0){
											plus[7] == 1;
										}
										else{
											plus[7] = 0;
											if (plus[8] == 0){
												plus[8] == 1;
											}
										}
									}
								}
							}

						}
					}
				}
			}
		}
		
		
		for (j = 0; j < N - 1; j++){
		}
		

		stack += (str[0]-48);
		for (j = 1; j < N; j++){
			if (plus[j - 1] == 0){
				stack = stack * 10 + (str[j]-48);
			}
			else{
				S += stack;
				
				stack = (str[j]-48);
				
			}
			
		}
		S += stack;
		SS += S;
		
	}

	printf("%d", SS);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: 'strlen' was not declared in this scope
   25 |         N = strlen(str);
      |             ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include"string"
  +++ |+#include <cstring>
    4 | 
a.cc:28:25: error: 'pow' was not declared in this scope
   28 |         for (i = 0; i < pow(2, N - 1) ; i++){
      |                         ^~~
Language: C++

#include <bits/stdc++.h>

#define F first
#define S second
#define pb push_back
#define ld  double
#define ll long long
#define int long long


using namespace std;

const int MAXN = 301 * 1001  , MOD = 1e9 + 7 , sq = 333  ;

unordered_map < int , int > d[MAXN];

unordered_map < int , vector < int>  > adj2[MAXN] ;

int dis[MAXN] ;

int mark[MAXN] ;

vector < pair < int , int > > adj[MAXN];

int32_t main()
{
   ios::sync_with_stdio(0);cin.tie(0);
   int n ,m ;
   cin >> n >> m ;
   for(int i = 0 ; i < m ; i ++ )
   {
       int x ,y , z ;
       cin >> x >> y >> z ;
       adj[x].pb({y,z});
       adj[y].pb({x,z});
       adj2[x][z].pb(y);
       adj2[y][z].pb(x);
   }

   dis[1] = 1 ;
   deque<pair<int,int> > q ;
   for(auto u : adj[1])
   {
       q.push_back({u.F,u.S}) ;
       q.push_back({1,u.S})  ;
       d[u.F][u.S] = 1  ;
       d[1][u.S] = 1 ;
   }
   while(q.size())
   {
       int x = q.front().F ;
       int c = q.front().S ;
       q.pop_front() ;
       if(!dis[x])
        dis[x] = d[x][c] ;
        if(dis[x]>dis[x][c])
            continue;
        if(dis[x]==d[x][c])
        {
            for(auto u : adj2[x][c])
            {
                pair<int,int> v = {u,c};
                if(d[v.F][v.S]>d[x][c]||!d[v.F][v.S])
                {
                    d[v.F][v.S] = d[x][c] ;
                    q.push_front({v.F,v.S});
                }
            }
        }
       if(dis[x]>d[x][c]||mark[x]>2)
        continue ;
       mark[x] ++ ;
       for(auto v : adj[x] )
       {
           if(v.S==c)
           {
               if(d[v.F][v.S]>d[x][c]||!d[v.F][v.S])
               {
                   d[v.F][v.S] = d[x][c] ;
                   q.push_front({v.F,v.S});
               }
           }
           else
           {
               if(d[v.F][v.S]>d[x][c] + 1||!d[v.F][v.S])
               {
                   d[v.F][v.S] = d[x][c] + 1 ;
                   q.push_back({v.F,v.S});
               }
           }
       }

   }
   if(!dis[n])
    return cout<<-1,0;
   cout<<dis[n] ;


}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:56:25: error: invalid types 'long long int[long long int]' for array subscript
   56 |         if(dis[x]>dis[x][c])
      |                         ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <typeinfo>
#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

typedef long long ll;

#define MAX_L (10)

char S[MAX_L + 1];

void print_array(int *ar, int n) {
  for (size_t i = 0; i < n; i++) {
    printf("%d ", ar[i]);
  }
  printf("\n");
}

ll my_atoi(char *s, int l, int r) {
  ll val = 0;
  for (size_t i = l; i < r; i++) {
    val = 10 * val + (s[i] - '0');
  }
  return val;
}

ll comb(int n, int k) {
  ll c = 1;
  for (size_t i = k + 1; i <= n; i++) {
    c *= i;
  }
  for (size_t i = 2; i <= n - k; i++) {
    c /= i;
  }
  return c;
}

ll search(char *s, int n, int l, int r) {
//  printf("%lld, %d\n", my_atoi(s, l, r), n);
  if (n <= 0) { return my_atoi(s, l, r); }
  ll cost = 0;
  for (size_t i = l + 1; n - 1 < r - i; i++) {
    cost += search(s, 0, l, i) * comb(r - i - 1, n - 1);
    cost += search(s, n - 1, i, r);
  }
  return cost;
}

int main() {
  scanf("%s", S);

  ll cost = 0;
  int L = strlen(S);
  for (size_t i = 0; i < L; i++) {
    cost += search(S, i, 0, L);
  }

  printf("%lld\n", cost);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:11: error: 'strlen' was not declared in this scope
   57 |   int L = strlen(S);
      |           ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <algorithm>
  +++ |+#include <cstring>
    7 |