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

#include <iostream>
#include <vector>
typedef long long ll;
using namespace std;
const ll const_inf = 1e9+7;
const int const_mod = 13;

int main(int argc, char **argv)
{
	string s; cin >>s;
	reverse(s.begin(), s.end());
	
	int n=s.length();
	ll **dp = new ll*[n+1];
	ll digit=1;
	for(int i=0; i<n+1; i++) dp[i] = new ll[const_mod];
	for(int i=0; i<n+1; i++) for(int j=0; j<const_mod; j++) dp[i][j] = 0;
	//cout << s << "\n";
	for(int i=0; i<n+1; i++){
		if(i==0){
			dp[0][0]=1;
		}else{
			for(int j=0; j<const_mod; j++){
				if(s[i-1]=='?'){
					for(ll k=0; k<10; k++){
						dp[i][(j+k*digit)%const_mod] += dp[i-1][j];
						dp[i][(j+k*digit)%const_mod] %= const_inf;
					}
				}else{
					int k = s[i-1]-'0';
					dp[i][(j+k*digit)%const_mod] += dp[i-1][j];
					dp[i][(j+k*digit)%const_mod] %= const_inf;
				}
			}
			digit*=10;
			digit%=const_mod;
		}
	}
	cout << dp[n][5] << "\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:11:9: error: 'reverse' was not declared in this scope
   11 |         reverse(s.begin(), s.end());
      |         ^~~~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

const int mod=1000000000+7;
int d[13];

int main(){

    string S;

    cin >> S;

    dp[0]=1;
    for(int i=0;i<S.size();i++){
        int b[13]={0};
        for(int j=0;j<13;j++){
            b[j]=d[j];d[j]=0;
        }
        if(S[i]!='?'){
            for(int j=0;i<13;j++){
                int r=j*10+(S[i]-'0');
                r%=13;
                d[r]=b[j];
            }
        }

        else{
            for(int k=0;k<10;k++){
                 for(int j=0;i<13;j++){
                    int r=j*10+(k-'0');
                    r%=13;
                     d[r]+=b[j];
                }
            }
        }

    }
    cout << d[5];

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'dp' was not declared in this scope; did you mean 'd'?
   15 |     dp[0]=1;
      |     ^~
      |     d
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ull MOD = 1000000007LL;

int main(){
    string s;
    cin >> s;
    int c;
    ll length = s.length();
    ll dp[length][13];
    dp[0][0] = 1;
    for(ll n = 0; n < length; n++){
        if(s[n] != '?') c = -1;
        else c = s[n] - '0';

        for(int j = 0; j < 10; j++){
            if(c != -1 && c != j) continue;
            for(int ki = 0; ki < 13; ki++){
                dp[n+1][(ki * 10 + j) % 13] += dp[n][ki];
            }
        }

        for(int j = 0; j < 13; j++) dp[n+1][j] %= MOD;
    }
    res = dp[n][5];

    cout << res << endl;
    return 0;
}

Compiler output:
a.cc:4:14: error: 'ull' does not name a type; did you mean 'll'?
    4 | static const ull MOD = 1000000007LL;
      |              ^~~
      |              ll
a.cc: In function 'int main()':
a.cc:24:51: error: 'MOD' was not declared in this scope
   24 |         for(int j = 0; j < 13; j++) dp[n+1][j] %= MOD;
      |                                                   ^~~
a.cc:26:5: error: 'res' was not declared in this scope
   26 |     res = dp[n][5];
      |     ^~~
a.cc:26:14: error: 'n' was not declared in this scope
   26 |     res = dp[n][5];
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const ull MOD = 1000000007LL;

int main(){
    string s;
    cin >> s;
    int c;
    ll length = s.length();
    ll dp[length][13];
    dp[0][0] = 1;
    for(ll n = 0; n < length; i++){
        if(s[n] != '?') c = -1;
        else c = s[n] - '0';

        for(int j = 0; j < 10; j++){
            if(c ! = -1 && c != j) continue;
            for(int ki = 0; ki < 13; ki++){
                dp[n+1][(ki * 10 + j) % 13] += dp[n][ki];
            }
        }

        for(int j = 0; j < 13; j++) dp[i+1][j] %= MOD;
    }
    res = dp[n][5];

    cout << res << endl;
    return 0;
}

Compiler output:
a.cc:4:14: error: 'ull' does not name a type; did you mean 'll'?
    4 | static const ull MOD = 1000000007LL;
      |              ^~~
      |              ll
a.cc: In function 'int main()':
a.cc:13:31: error: 'i' was not declared in this scope
   13 |     for(ll n = 0; n < length; i++){
      |                               ^
a.cc:18:17: error: expected ')' before '!' token
   18 |             if(c ! = -1 && c != j) continue;
      |               ~ ^~
      |                 )
a.cc:24:51: error: 'MOD' was not declared in this scope
   24 |         for(int j = 0; j < 13; j++) dp[i+1][j] %= MOD;
      |                                                   ^~~
a.cc:26:5: error: 'res' was not declared in this scope
   26 |     res = dp[n][5];
      |     ^~~
a.cc:26:14: error: 'n' was not declared in this scope
   26 |     res = dp[n][5];
      |              ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    long[] mod = new long[s.length()];
    mod[0] = 1;
    for(int i = 1; i < s.length(); i++) {
      mod[i] = (mod[i - 1] * 10) % 13;
    }
    long M = (long)Math.pow(10, 9) + 7;
    long[][] dp = new long[s.length()][13];
    for(int i = 0; i < s.length(); i++) {
      String str = String.valueOf(s.charAt(s.length() - 1 - i));
      if(i == 0) {
        if(str.equals("?")) {
          for(int j = 0; j < 10; j++) {
            dp[i][j] = 1;
          }
        } else {
          int d = Integer.parseInt(str);
          dp[i][d] = 1;
        }
      } else {
        if(str.equals("?")) {
          for(int j = 0; j < 10; j++) {
            for(int k = 0; k < 13; k++) {
              dp[i][(k + mod[i] * j) % 13] = (dp[i][(k + mod[i - 1] * j) % 13] + dp[i - 1][k]) % M;
            }
          }          
        } else {
          int d = Integer.parseInt(str);
          for(int j = 0; j < 13; j++) {
            dp[i][(j + mod[i] * d) % 13] = (dp[i][(j + mod[i] * d) % 13] + dp[i - 1][j]) % M;
          }          
        }        
      }
    }
    System.out.println(dp[s.length() - 1][5]);
  }
}

Compiler output:
Main.java:29: error: incompatible types: possible lossy conversion from long to int
              dp[i][(k + mod[i] * j) % 13] = (dp[i][(k + mod[i - 1] * j) % 13] + dp[i - 1][k]) % M;
                                     ^
Main.java:29: error: incompatible types: possible lossy conversion from long to int
              dp[i][(k + mod[i] * j) % 13] = (dp[i][(k + mod[i - 1] * j) % 13] + dp[i - 1][k]) % M;
                                                                         ^
Main.java:35: error: incompatible types: possible lossy conversion from long to int
            dp[i][(j + mod[i] * d) % 13] = (dp[i][(j + mod[i] * d) % 13] + dp[i - 1][j]) % M;
                                   ^
Main.java:35: error: incompatible types: possible lossy conversion from long to int
            dp[i][(j + mod[i] * d) % 13] = (dp[i][(j + mod[i] * d) % 13] + dp[i - 1][j]) % M;
                                                                   ^
4 errors
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define Rep(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll,vector<ll>,greater<ll>> SMALLPQ;
using vi=vector<ll>;
using vvi=vector<vector<ll>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
const int inf=1000000007;
const int mod=1000000007;
void chmin(auto &a,auto b){if(b<a)a=b;}
void chmax(auto &a,auto b){if(a<b)a=b;}
int main(){
  string s;cin>>s;
  int n=s.size();
  vi dp(13);
  auto bdp=dp;
  if(s[0]=='?')rep(i,10)dp[i]++;
  else dp[s[0]-'0']++;
  bdp=dp;
  Rep(i,1,n){
    if(s[i]=='?'){
      rep(j,13){
        rep(k,10){
          dp[(j*10+k)%13]+=bdp[j];
          dp[(j*10+k)%13]%=mod;
        }
      }
    }
    else{
      rep(j,13){
        dp[((s[i]-'0'+10*j))%13]+=bdp[j];
        dp[((s[i]-'0'+10*j))%13]%=mod;
      }
    }
    bdp=dp;
  }
  cout<<(dp[n-1][5])%mod<<endl;
}


Compiler output:
a.cc:18:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   18 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |            ^~~~
a.cc:18:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   18 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |                    ^~~~
a.cc:19:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   19 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |            ^~~~
a.cc:19:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   19 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:45:17: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}[int]' for array subscript
   45 |   cout<<(dp[n-1][5])%mod<<endl;
      |                 ^
Language: C++

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

int main(void){
    
    static const ll mod = 10e9+7;
    ll dp[100005][13];
    ll res=0;
    string s;
    cin>>s;
    int n=strlen(s);
    dp[0][0]=1;
    rep(i, n){
        int c;
        if(s[i]=='?') c=-1;
        else c=s[i]-'0';//charをintに変換

        rep(j, 10){
            if(c!=-1 && c!=j) continue;
            rep(ki, 13){
                dp[i+1][(ki*10+j)%13] += dp[i][ki];
            }
        }
        rep(k, 13){
            dp[i+1][k]%=mod;
        }
    }
    res=dp[n][5];

    cout<<res<<endl;
    return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   23 |     int n=strlen(s);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:11:
/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 <cmath>
#include<vector>
#define rep(i, n) for (int i=0;i<n;i++)
#include <map> 
#include<algorithm>
#include <numeric>
#include<iostream>
#include<deque>
#include<queue>
#include<string>
#include <cstring>
#include <iomanip>
using namespace std;
typedef long long ll;

int main(void){
    
    static const ll mod = 10e9+7;
    uint64_t dp[100005][13];
    uint64_t res=0;
    char s[100005];
    scanf("%s", s);
    int n=strlen(s);
    dp[0][0]=1;
    rep(i, n){
        int c;
        if(s[i]=='?') c=-1;
        else c=s[i]-'0';//charをintに変換

        rep(j, 10){
            if(c!=-1 && c!=j) continue;
            rep(ki, 13){
                dp[i+1][(ki*10+j)%13] += dp[i][ki];
            }
        }
        rep(k, 13){
            dp[i+1][k]%=mod;
        }
    }
    res=dp[n][5];

    cout<<res<<endl;
    return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'uint64_t' was not declared in this scope
   19 |     uint64_t dp[100005][13];
      |     ^~~~~~~~
a.cc:13:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   12 | #include <iomanip>
  +++ |+#include <cstdint>
   13 | using namespace std;
a.cc:20:13: error: expected ';' before 'res'
   20 |     uint64_t res=0;
      |             ^~~~
      |             ;
a.cc:24:5: error: 'dp' was not declared in this scope
   24 |     dp[0][0]=1;
      |     ^~
a.cc:40:5: error: 'res' was not declared in this scope; did you mean 'rep'?
   40 |     res=dp[n][5];
      |     ^~~
      |     rep
Language: C++

#include <iostream>
#include <string>

static const unsigned long long MOD = 1000000007LL;

int n;
char s[100005];
long long unsigned int dp[100005][13];

int main () {
    int i, j, ki;
    long long unsigned int res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++) {
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] - '0';

    for (j = 0; j < 10; j++) {
        if (c != -1 && c != j) continue;
            for (ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%llu\n", res);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'strlen' was not declared in this scope
   15 |     n = strlen(s);
      |         ^~~~~~
a.cc:2:1: note: 'strlen' 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>

static const unsigned long long MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

int main () {
    int i, j, ki;
    uint64_t res = 0;

    scanf("%s", s);
    n = strlen(s);

    dp[0][0] = 1;
    for (i = 0; i < n; i++) {
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] - '0';

    for (j = 0; j < 10; j++) {
        if (c != -1 && c != j) continue;
            for (ki = 0; ki < 13; ki++) {
                dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
            }
        }
        for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }
    res = dp[n][5];

    printf("%llu\n", res);
    return 0;
}

Compiler output:
a.cc:8:1: error: 'uint64_t' does not name a type
    8 | uint64_t dp[100005][13];
      | ^~~~~~~~
a.cc:2:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    1 | #include <iostream>
  +++ |+#include <cstdint>
    2 | #include <string>
a.cc: In function 'int main()':
a.cc:12:5: error: 'uint64_t' was not declared in this scope
   12 |     uint64_t res = 0;
      |     ^~~~~~~~
a.cc:12:5: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:15:9: error: 'strlen' was not declared in this scope
   15 |     n = strlen(s);
      |         ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:17:5: error: 'dp' was not declared in this scope
   17 |     dp[0][0] = 1;
      |     ^~
a.cc:31:5: error: 'res' was not declared in this scope
   31 |     res = dp[n][5];
      |     ^~~
Language: C++

#include <iostream>
#include <string>

static const long long MOD = 1000000007LL;

using namespace std;

char s[100005];
long long dp[100005][13];

int main() {
    long long res = 0;
    cin >> s;
    int n = strlen(s);

    dp[0][0] = 1;
    for (int i = 0; i < n; i++) {
        int c;
        if (s[i] == '?') c = -1;
        else c = s[i] - '0';

        for (int j = 0; j < 10; j++) {
            if (c != -1 && c != j) continue;
            for (int ki = 0; ki < 13; ki++)
                dp[i+1][(ki * 10 + j) % 13] += dp[i][ki];
        }

        for (int j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
    }

    res = dp[n][5];
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'strlen' was not declared in this scope
   14 |     int n = strlen(s);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' 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 <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef long long LL;

const LL MOD = 1000000007LL;

LL dp[100001][13];  //! i-th digit from the bottom, remainder, => count

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

    vector<int> rbase = {1, 10, 9, 12, 3, 4};

    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;
    
    LL fixedR = 0;
    for (int i = 0; i < S.length(); ++i) {
        char c = S[S.length()-i-1];
        if (c == '?') {
            for (int d = 0; d <= 9; ++d) {
                int dr = d * rbase[i%rbase.size()] % 13;
                for (int r = 0; r < 13; ++r) {
                    dp[i+1][(r + dr)%13] = (dp[i+1][(r + dr)%13] + dp[i][r]) % MOD;
                }
            }
        } else {
            int d = (int) (c - '0');
            int dr = d * rbase[i%rbase.size()] % 13;
            for (int r = 0; r < 13; ++r) {
                dp[i+1][(r + dr)%13] = (dp[i+1][(r + dr)%13] + dp[i][r]) % MOD;
            }
        }

        // cout << "After handling " << i << "th digit " << c << ", dp[i] = " << endl << "    ";
        // for (int r = 0; r < 13; ++r) {
        //     cout << dp[i+1][r] << ' ';
        // }
        // cout << endl;
    }

    cout << dp[S.length()][5] << endl;

    return 0;
}



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

#include<iostream>
 #include<vector>
 #include<algorithm>
 using namespace std;
 typedef long long ll;
 int dp[100009][13];
 long long int mod = 1000000007;
 char s[100009];
		 
 int main()
 {
	 for (int i = 0; i < 100009; i++)
	 {
		 s[i] = '0';
	 }
	 cin >> s;
	 int length = strlen(s);
	 for (int i = 0; i < 100009; i++)
	 {
		 for (int j = 0; j < 13; j++)
		 {
			 dp[i][j] = 0;
		 }
	 }
	 dp[0][0] = 1;
	 for (int i = 0; i < length; i++)
	 {
		 for (int j = 0; j < 13; j++)
		 {
			 if (s[i] == '?')
			 {
				 for (int k = 0; k < 10; k++)
				 {
					 dp[i + 1][(j * 10 + k) % 13] += dp[i][j];
					 dp[i + 1][(j * 10 + k) % 13] = dp[i + 1][(j * 10 + k) % 13] % mod;
				 }
			 }
			 else
			 {
				 int c = s[i] - '0';
				 dp[i + 1][((j * 10) + c) % 13] += dp[i][j];
			 }
		 }
	 }
	 cout << dp[length][5] << endl;
	 return 0;
 }


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

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>

#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
#define MEMSET(v, h) memset((v), h, sizeof(v))
typedef long long ll;

using namespace std;

int main(void){
    string S;
    cin >> S;
    ll len = S.length();
    ll filt = 1000000007;
    ll DP_TABLE[100005][13];
    MEMSET(DP_TABLE, 0);
    DP_TABLE[0][0] = 1;
    ll nxt;
    rep(i, len){
        if(S[i] == '?'){
            rep(t, 10){
                rep(j, 13){
                    nxt = (10*j+t)%13;
                    DP_TABLE[i+1][nxt] += (DP_TABLE[i][j]%filt);
                }
            }
        } else{
            rep(j, 13){
                nxt = (10*j+(S[i]-'0'))%13;
                DP_TABLE[i+1][nxt] += (DP_TABLE[i][j]%filt);
            }
        }
     }
    cout << (DP_TABLE[len][5]%filt) << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'memset' was not declared in this scope
    9 | #define MEMSET(v, h) memset((v), h, sizeof(v))
      |                      ^~~~~~
a.cc:20:5: note: in expansion of macro 'MEMSET'
   20 |     MEMSET(DP_TABLE, 0);
      |     ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <queue>
  +++ |+#include <cstring>
    5 | #include <string>
Language: Java

import java.util.Scanner;

import library.common.Predef;

public class Main {
    static final Scanner sc = new Scanner(System.in);
    static final int MOD = (int) 1E9 + 7;

    public static void main(String[] args) {
        char[] input = nstr().toCharArray();
        int len = input.length;

        char[] s = new char[len+1];
        System.arraycopy(input, 0, s, 1, input.length);
        
        final int MOD_2 = 13;
        long[][] dp = new long[len+1][MOD_2];
        
        dp[0][0] = 1;
        for (int i = 1; i <= len; i++) {
            for (int rem = 0; rem < MOD_2; rem++) {
                for (int digI = 0; digI <= 9; digI++) {
                    if (s[i] != '?' && (s[i]-'0') != digI) {
                        continue;
                    }
                    int newRem = (rem*10 + digI) % MOD_2;
                    dp[i][newRem] += dp[i-1][rem];
                    dp[i][newRem] %= MOD;
                }
            }
        }
        System.out.println(dp[len][5]);
    }

    private static long nlong() {
        return sc.nextLong();
    }

    private static int nint() {
        return sc.nextInt();
    }
    
    private static String nstr() {
        return sc.next();
    }
}

Compiler output:
Main.java:3: error: package library.common does not exist
import library.common.Predef;
                     ^
1 error
Language: C++

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define print(x) cout << (x) << endl;
#define sz(x) int(x.size())
 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const int INF = 1e9;
const ll LLINF = 1e16;

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
  for(auto &e:u) fill_v<T>(e,v...);
}
 
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

static const ll MOD = 1000000007LL;

ll n;
ll dp[100005][13];

int main(void){
    cout.tie(0);
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    string s;
    cin >> s;
    n = strlen(s);

    dp[0][0] = 1;
    rep(i,n){
      int c;
      if(s[i] == '?') c = -1;
      else c = s[i] - '0';

      rep(j,10){
        if(c != -1 && c != j) continue;
        rep(ki,13){
          dp[i+1][(ki * 10 + j) % 13] += dp[i][ki];
        }
      }
      rep(j,13) dp[i+1][j] %= MOD;
    }
    print(dp[n][5]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   50 |     n = strlen(s);
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/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 Int = long long;

Int dp[100001][13];

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
   
    string s; cin>>s; int n=s.size();
    dp[0][0]=1;
    int md[100001]; md[0]=1;
    for (int i = 1; i < 100001; i++){
        md[i]=md[i-1]*10%13;
    }
    for (int i = 0; i < n; i++){
        for (int j = 0; j < 13; j++){
            if(s[n-i-1]=='?'){
                for (int k = 0; k < 10; k++){
                    dp[i+1][(md[i]*k+j)%13]=(dp[i][j]+dp[i+1][(md[i]*k+j)%13])%MOD;
                }
            }else dp[i+1][(md[i]*(s[n-i-1]-'0')+j)%13]=(dp[i][j]+dp[i+1][(md[i]*(s[n-i-1]-'0')+j)%13])%MOD;
        }
    }
    cout<<dp[n][5]<<'\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:80: error: 'MOD' was not declared in this scope
   20 |                     dp[i+1][(md[i]*k+j)%13]=(dp[i][j]+dp[i+1][(md[i]*k+j)%13])%MOD;
      |                                                                                ^~~
a.cc:22:104: error: 'MOD' was not declared in this scope
   22 |             }else dp[i+1][(md[i]*(s[n-i-1]-'0')+j)%13]=(dp[i][j]+dp[i+1][(md[i]*(s[n-i-1]-'0')+j)%13])%MOD;
      |                                                                                                        ^~~
Language: C++

static const ull MOD = 1000000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];
uint64_t solve () {
int i, j, ki;
uint64_t res = 0;

 scanf("%s", s);
 n = strlen(s);

 dp[0][0] = 1;
 for (i = 0; i < n; i++) {
 int c;
 if (s[i] == '?') c = -1;
 else c = s[i] - '0';

for (j = 0; j < 10; j++) {
 if (c != -1 && c != j) continue;
 for (ki = 0; ki < 13; ki++) {
 dp[i + 1][(ki * 10 + j) % 13] += dp[i][ki];
 }
 }
 for (j = 0; j < 13; j++) dp[i + 1][j] %= MOD;
 }
 res = dp[n][5];

 printf("%llu\n", res);
 return 0;
 }


Compiler output:
a.cc:1:14: error: 'ull' does not name a type
    1 | static const ull MOD = 1000000007LL;
      |              ^~~
a.cc:5:1: error: 'uint64_t' does not name a type
    5 | uint64_t dp[100005][13];
      | ^~~~~~~~
a.cc:1:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | static const ull MOD = 1000000007LL;
a.cc:6:1: error: 'uint64_t' does not name a type
    6 | uint64_t solve () {
      | ^~~~~~~~
a.cc:6:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
Language: C++

#include <iostream>
#include <string>
using namespace std;
/*struct*/
struct aaa {
	aaa() {
		cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
	};
}aaaaaaa;
constexpr int32_t MOD = 1e9 + 7; //10^9
/*global*/

string S;

//#define int int64_t
signed main()
{
	unsigned long long dp[13] = { 0 }, dp_next[13];
 
	dp[0] = 1;
	cin >> S;
 
	for (const char& s : S) {
		for (int i = 0; i < 13; i++) dp_next[i] = 0;
 
		if (s == '?') {
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 13; j++) {
					dp_next[((j * 10 + i) % 13)] += dp[j];
				}
			}
		}
		else {
			for (int i = 0; i < 13; i++) {
				dp_next[(i * 10 + s-'0') % 13] += dp[i];
			}
		}
 
		for (int i = 0; i < 13; i++) {
			dp[i] = dp_next[i] % MOD;
		}
	}
 
	cout << dp[5];	
}


Compiler output:
a.cc: In constructor 'aaa::aaa()':
a.cc:7:81: error: 'setprecision' was not declared in this scope
    7 |                 cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
      |                                                                                 ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <iostream>
  +++ |+#include <iomanip>
    2 | #include <string>
Language: C++

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

/* #pragma */
//#pragma GCC optimize("Ofast")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")


/*alias*/
#define F first
#define S second

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev
#define itn int

/*template*/
template<class T>inline bool amax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>inline bool amin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }

/* func */
int32_t GCD(int32_t a, int32_t b){return b ? GCD(b, a%b) : a;}
int64_t GCD(int64_t a, int64_t b){return b ? GCD(b, a%b) : a;}
int32_t LCM(int32_t a, int32_t b){return a * b / GCD(a, b);}
int64_t LCM(int64_t a, int64_t b){return a * b / GCD(a, b);}

/*struct*/
struct aaa {
	aaa() {
		cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);
	};
}aaaaaaa;

/* const */
constexpr int32_t INF = 1001001001;
constexpr int64_t LINF = 1001001001001001001ll;
constexpr int32_t MOD = 1e9 + 7; //10^9
constexpr int64_t EPS = 1e-9;
constexpr int32_t dx[] = { 1, 1, 0, -1, -1, -1, 0, 1 }, dy[] = { 0, 1, 1, 1, 0, -1, -1, -1 };
//constexpr int32_t dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
//Counterclockwise from the 6o'clock direction
//Take the x-axis downward and the y-axis right


//g++ -std=c++14 -Wall --pedantic-errors -o template template.cpp
//g++ -std=c++14 -Wall --pedantic-errors template.cpp
//chcp 65001

/*global*/

static const  unsigned long long MOD = 1000000007LL;
string S;

//#define int int64_t
signed main()
{
	unsigned long long dp[13] = { 0 }, dp_next[13];
 
	dp[0] = 1;
	cin >> S;
 
	for (const char& s : S) {
		for (int i = 0; i < 13; i++) dp_next[i] = 0;
 
		if (s == '?') {
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 13; j++) {
					dp_next[((j * 10 + i) % 13)] += dp[j];
				}
			}
		}
		else {
			for (int i = 0; i < 13; i++) {
				dp_next[(i * 10 + s-'0') % 13] += dp[i];
			}
		}
 
		for (int i = 0; i < 13; i++) {
			dp[i] = dp_next[i] % MOD;
		}
	}
 
	cout << dp[5];	
}

Compiler output:
a.cc:55:34: error: conflicting declaration 'const long long unsigned int MOD'
   55 | static const  unsigned long long MOD = 1000000007LL;
      |                                  ^~~
a.cc:41:19: note: previous declaration as 'constexpr const int32_t MOD'
   41 | constexpr int32_t MOD = 1e9 + 7; //10^9
      |                   ^~~
Language: C++

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

int main(){
  int n;
  string s;
  cin>>s;
  n=s.size();
  ll dp[n][13]={0};
  
  if( s[n-1]=='?'){
    for(int i=0;i<10;i++){
      dp[0][i]=1;}}
  else{
    dp[0][int(s[n-1])]=1;
  }
  
  for(int i=0;i<n-1;i++){
    if(s[n-2-i]=="?"){
      for(int j=0;j<13;j++){
        if(dp[i][j]>0){
          for(int k=0;k<10,k++){
            dp[i+1][(j+(10**(i+1))*k))%13]+=dp[i][j]%mod;
          }
        }
      }
    }
    else{
      for(int j=0;j<13;j++){
        if(dp[i][j]>0){
          dp[i+1][(j+(10**(i+1))*int(s[n-2-i]))%13]+=dp[i][j]%mod;
        }
      }
    }
  }
  cout<<dp[n-1][5]%mod<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     if(s[n-2-i]=="?"){
a.cc:24:31: error: expected ';' before ')' token
   24 |           for(int k=0;k<10,k++){
      |                               ^
      |                               ;
a.cc:25:28: error: invalid type argument of unary '*' (have 'int')
   25 |             dp[i+1][(j+(10**(i+1))*k))%13]+=dp[i][j]%mod;
      |                            ^~~~~~
a.cc:25:38: error: expected ']' before ')' token
   25 |             dp[i+1][(j+(10**(i+1))*k))%13]+=dp[i][j]%mod;
      |                                      ^
      |                                      ]
a.cc:33:26: error: invalid type argument of unary '*' (have 'int')
   33 |           dp[i+1][(j+(10**(i+1))*int(s[n-2-i]))%13]+=dp[i][j]%mod;
      |                          ^~~~~~
Language: C++

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

int main() {
    ll n;
    string s;
    cin >> s;
    n = s.size();
    vector<vector<ll> > dp(n+1, vector<ll>(13,0));
    dp[0][0] = 1;
    for(int i=0;i<n;i++){
        for(int j=0;j<13;j++){
            if(s[i] != '?'){
                int r = (10*j + (s[i]-'0')) % 13;
                dp[i+1][r] += dp[i][j];
                dp[i+1][r] %= MOD;
            }
            else{
                for(int k=0;k<=9;k++){
                    int r = (10*j + k) % 13;
                    dp[i+1][r] += dp[i][j];
                    dp[i+1][r] %= MOD;
                }
            }
        }
    }
    cout << dp[n][5] << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'MOD' was not declared in this scope
   17 |                 dp[i+1][r] %= MOD;
      |                               ^~~
a.cc:23:35: error: 'MOD' was not declared in this scope
   23 |                     dp[i+1][r] %= MOD;
      |                                   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i,a) for(int i = 0; i < (a); i++)
typedef long long ll;
const int MOD = 1e9 + 7;

ll dp[100001][13];

signed main(){
    string S;
    cin >> S;
    dp[0][0] = 1;
    REP(i,S.size()){
        REP(j,10){
            int c = S[i] - '0';
            if(S[i] == '?' || c == j){
                REP(k,13){
                    dp[i + 1][(k * 10 + j) % 13] += dp[i][k];
                    dp[i + 1][(k * 10 + j) % 13] %= MOD;
                }
            }
    }
    cout << dp[S.size()][5] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:9:14: note: to match this '{'
    9 | signed main(){
      |              ^
Language: C++

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


#define int ll
using ll  = long long;
using vi  = vector<int>;
constexpr ll mod = 1e9+7;

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

  vi dp(13);
  dp[0] = 1;
  for(auto c : s){
    vi next(13);
    if(isdigit(c)){
      int x = c - '0';
      rep(i,13) next[(i*10+x)%13] += dp[i];
      rep(i,13) next[i] %= mod;
    }else{
      rep(x,10){
	rep(i,13) next[(i*10+x)%13] += dp[i];
	rep(i,13) next[i] %= mod;
      }
    }
    dp = next;
  }
  cout << dp[5] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'i' was not declared in this scope
   19 |       rep(i,13) next[(i*10+x)%13] += dp[i];
      |           ^
a.cc:19:7: error: 'rep' was not declared in this scope
   19 |       rep(i,13) next[(i*10+x)%13] += dp[i];
      |       ^~~
a.cc:22:11: error: 'x' was not declared in this scope
   22 |       rep(x,10){
      |           ^
a.cc:22:7: error: 'rep' was not declared in this scope
   22 |       rep(x,10){
      |       ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>

using namespace std;

#define N 100005
int n[N];
int dp[N][13];

#define MOD 1000000007

int main() {
    string s;
    cin >> s;
    reverse(s.begin(), s.end());

    n[0] = 1;
    for(int i=1; i<N; i++)
        n[i] = (n[i-1] * 10) % 13;
    
    memset(dp,0,sizeof(dp));
    dp[0][0] = 1;
    for(int i=0; i<s.length(); i++)
    {
        if(s[i] == '?')
        {
            for(int j=0; j<13; j++)
            {
                for(int k=0; k<10; k++)
                {
                    dp[i+1][(j + k * n[i]) % 13] += dp[i][j];
                    dp[i+1][(j + k * n[i]) % 13] %= MOD;
                }
            }
        }
        else
        {
            for(int j=0; j<13; j++)
            {
                dp[i+1][(j + (s[i] - '0') * n[i]) % 13] = dp[i][j];
            }
        }
    }
    
    cout << dp[s.length()][5] << endl;
    
    return 0;
}


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

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <stdlib.h>

using namespace std;

#define N 100005
int n[N];
int dp[N][13];

#define MOD 1000000007

int main() {
    string s;
    cin >> s;
    reverse(s.begin(), s.end());

    n[0] = 1;
    for(int i=1; i<N; i++)
        n[i] = (n[i-1] * 10) % 13;
    
    memset(dp,0,sizeof(dp));
    dp[0][0] = 1;
    for(int i=0; i<s.length(); i++)
    {
        if(s[i] == '?')
        {
            for(int j=0; j<13; j++)
            {
                for(int k=0; k<10; k++)
                {
                    dp[i+1][(j + k * n[i]) % 13] += dp[i][j];
                    dp[i+1][(j + k * n[i]) % 13] %= MOD;
                }
            }
        }
        else
        {
            for(int j=0; j<13; j++)
            {
                dp[i+1][(j + (s[i] - '0') * n[i]) % 13] = dp[i][j];
            }
        }
    }
    
    cout << dp[s.length()][5] << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:5: error: 'memset' was not declared in this scope
   24 |     memset(dp,0,sizeof(dp));
      |     ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <stdlib.h>
  +++ |+#include <cstring>
    6 |
Language: C++

#include <iostream>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; ++i)

#define MOD 1000000007LL;

int n;
char s[123456];
uint64_t dp[123456][13];

int main(int argc, char** argv) {
  int i, j, k;
  uint64_t res = 0;

  scanf("%s", s);
  n = strlen(s);

  dp[0][0] = 1;
  rep(i, n) {
    int c;
    if (s[i] == '?') {
      c = -1;
    } else {
      c = s[i] - '0';
    }

    rep(j, 10) {
      if (c != -1 && j != c) {
        // If c is not '?', only the specified number must be summed.
        continue;
      }
      rep(k, 13) {
        dp[i + 1][(k * 10 + j) % 13] += dp[i][k];
      }
    }

    // MOD
    rep(k, 13) {
      dp[i + 1][k] %= MOD;
    }
  }
  res = dp[n][5];

  cout << res << endl;
  return 0;
}


Compiler output:
a.cc:11:1: error: 'uint64_t' does not name a type
   11 | uint64_t dp[123456][13];
      | ^~~~~~~~
a.cc:2:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    1 | #include <iostream>
  +++ |+#include <cstdint>
    2 | 
a.cc: In function 'int main(int, char**)':
a.cc:15:3: error: 'uint64_t' was not declared in this scope
   15 |   uint64_t res = 0;
      |   ^~~~~~~~
a.cc:15:3: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:18:7: error: 'strlen' was not declared in this scope
   18 |   n = strlen(s);
      |       ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | 
a.cc:20:3: error: 'dp' was not declared in this scope
   20 |   dp[0][0] = 1;
      |   ^~
a.cc:44:3: error: 'res' was not declared in this scope; did you mean 'rep'?
   44 |   res = dp[n][5];
      |   ^~~
      |   rep
Language: Java

import java.util.*;
import java.lang.*;

public class Main{
	static long mod = 1000000007;
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        String inp = sc.nextLine();
        long[][] dp = new long[inp.length()+1][13];

        dp[0][0] = 1;
        int n = inp.length();
        for(int i=1;i<=n;i++){
            char c = inp.charAt(i-1);
            if(c == '?'){
                for(int k=0;k<10;k++){
                    for(int j=0;j<13;j++){
                        dp[i][(j*10 + k)%13] += dp[i-1][j];
                        dp[i][(j*10 + k)%13] %= mod;
                    }
                }
            }else{
                int val = Character.getNumericValue(c);
                for(int j=0;j<13;j++){
                    dp[i][(j*10 + val)%13] += dp[i-1][j];
                    dp[i][(j*10 + val)%13] %= mod;
                }
            }
        }

        p("ans",dp[n][5]%mod);



        sc.close();
	}
}

Compiler output:
Main.java:32: error: cannot find symbol
        p("ans",dp[n][5]%mod);
        ^
  symbol:   method p(String,long)
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

static const ll MOD = 1000000007LL;

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

  int n;

  n = strlen(s);

  // DPテーブル
  // dp[i][j]は、i桁目までの余りがjであるものの数を表す
  // 1: 桁数
  ll dp[n + 1][13];

  dp[0][0] = 1;

  int c; // s[i]を数値に変換、?の場合は-1
  for (int i = 0; i < n; i++){
    if(s[i] == '?'){
      c = -1;
    } else {
      c = s[i] - '0';
    }

    for(int j = 0; j < 10; j++){
      if((c == -1) && (c == j)){
        for(int k = 0; k < 13; k++){
          dp[i+1][(k * 10 + j) % 13] += dp[i][k];
        }
      } else {
        continue;
      }
    }
    for (int j = 0; j < 13; j++){
      dp[i+1][j] %= MOD;
    }
  }

  ll res = dp[n][5];
  cout << res << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   16 |   n = strlen(s);
      |              ^
      |              |
      |              std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/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 <iostream>
#include <vector>
#include <cmath>

using namespace std;

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

    vector<int> dp(13);
    vector<int> dp_tmp(13);

    reverse(S.begin(), S.end());

    if (S[0] == '?')
    {
        for (int i = 0; i < 10; i++)
        {
            dp[i] = 1;
        }
    }
    else
    {
        dp[S[0] - '0'] = 1;
    }
    // for (auto x : dp)
    // {
    //     cout << x << ' ';
    // }
    // cout << endl;

    int base = 10;

    for (int j = 1; j < S.size(); j++)
    {
        dp_tmp = dp;
        if (S[j] == '?')
        {
            for (auto &x : dp)
            {
                x = 0;
            }

            for (int i = 0; i < 13; i++)
            {
                for (int k = 0; k < 10; k++)
                {
                    int idx = (k * base + i) % 13;
                    dp[idx] = (dp[idx] + dp_tmp[i]) % (1000000000 + 7);
                }
            }
        }
        else
        {
            for (int i = 0; i < 13; i++)
            {
                int idx = ((S[j] - '0') * base + i) % 13;
                dp[idx] = dp_tmp[i];
            }
        }

        base = (base * 10) % 13;
        // for (auto x : dp)
        // {
        //     cout << x << ' ';
        // }
        // cout << endl;
    }
    cout << dp[5] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'reverse' was not declared in this scope
   15 |     reverse(S.begin(), S.end());
      |     ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 string s;
 cin >> s;
 int n;
 n = s.size();
 int dp[n][13];
 int ciconv; 

  if(s.at(0)=='?'){
   for(int i=0; i<10;i++){
   dp.at(0).at(i) = 1; 
   }
  }else{
    ciconv = s.at(0) - '0';
    dp.at(0).at(ciconv) = 1;
  }

 for(int i=1;i<n;i++){
   ciconv = s.at(i) - '0';
   for(int j=0 ; j!=13;j++){
      for(int k=0 ; k!=10 ; k++){
        if(s.at(i)!='?' && k!=ciconv) continue;
        dp[i][(j*10+k)%13] += dp[i-1][j];
        dp[i][(j*10+k)%13] %= 1000000007;
      }
    }
  }
  cout << dp[n-1][5];  
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: request for member 'at' in 'dp', which is of non-class type 'int [n][13]'
   14 |    dp.at(0).at(i) = 1;
      |       ^~
a.cc:18:8: error: request for member 'at' in 'dp', which is of non-class type 'int [n][13]'
   18 |     dp.at(0).at(ciconv) = 1;
      |        ^~
Language: C++

#include<bits/stdc++.h>
#include <math.h>
#include <algorithm>
#include <functional>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define fro(i,j,n) for(int i=j;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


int main() {
    string s;
	cin >> s;
    int n=s.length();
    dp[n][10];
    fr(i,n){
      fr(j,10){
        dp[i][j]=0;
      }
    }
    fr(i,n){
      if(s[i]=='?'){
        if(i==0){
          fr(j,10){
            dp[0][j]=1;
          }
        }
        else{
          fr(j,10){
            fr(k,10){
              dp[i][(j*10+k)%13]+=dp[i-1][j];
            }
          }
        }
      }
      else{
        int a = int(s[i]);
        if(i==0){
          dp[0][a]=1;
        }
        else{
          fr(j,10){
            dp[i][(j*10+a)%13]=dp[i-1][j];
          }
        }
      }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'dp' was not declared in this scope; did you mean 'dup'?
   19 |     dp[n][10];
      |     ^~
      |     dup
Language: C++

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

long long dp[100010][13];
string s;

int main() {
    cin >> s;
    int n = 0;
    n = s.size();
    
    memset(dp, 0, sizeof(dp));

    dp[0][0] = 1;
    for (int i = 0; i < n; i++) {
        int check = 0;
        if (s[i] == '?') check = -1;
        else check = s[i] - '0';

        for (int j = 0; j < 10; j++) {
            if (check != -1 && check != j) continue;
            for (int k = 0; k < 13; k++) {
                dp[i + 1][(10 * k + j) % 13] += dp[i][k];
            }
        }
        for (int j = 0; j < 13; j++) dp[i + 1][j] %= 1000000007;
    }
    cout << dp[n][5] << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'memset' was not declared in this scope
   14 |     memset(dp, 0, sizeof(dp));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<vector>
  +++ |+#include <cstring>
    3 | #include<string>
Language: C++

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

typedef unsigned long long ull;
const ull mod = 100000007LL;

int n;
char s[100005];
uint64_t dp[100005][13];

int main() {
	int i, j, k;
	uint64_t res = 0;

	cin >> s;
	n = strlen(s);

	dp[0][0] = 1;
	for (i = 0; i < n; i++) {
		int c;
		if (s[i] == '?')c = -1;
		else c = s[i] - '0';

		for (j = 0; j < 10; j++) {
			if (c != -1 && c != j)continue;
			for (k = 0; k < 13; k++) {
				dp[i + 1][(k * 10 + j) % 13] += dp[i][k];
			}
		}
		for (j = 0; j < 13; j++)dp[i + 1][j] %= mod;
	}
	res = dp[n][5];

	cout << res << endl;

	return 0;
}

Compiler output:
a.cc:10:1: error: 'uint64_t' does not name a type
   10 | uint64_t dp[100005][13];
      | ^~~~~~~~
a.cc:2:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    1 | #include<iostream>
  +++ |+#include <cstdint>
    2 | #include<string>
a.cc: In function 'int main()':
a.cc:14:9: error: 'uint64_t' was not declared in this scope
   14 |         uint64_t res = 0;
      |         ^~~~~~~~
a.cc:14:9: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:17:13: error: 'strlen' was not declared in this scope
   17 |         n = strlen(s);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
a.cc:19:9: error: 'dp' was not declared in this scope
   19 |         dp[0][0] = 1;
      |         ^~
a.cc:33:9: error: 'res' was not declared in this scope
   33 |         res = dp[n][5];
      |         ^~~