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

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <fstream>

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

ll n, m;
vector<ll> a[100000];
ll mem[100000][100000][3];
ll s, t;
ll ans = 1000000000;

void dfs(ll prePrePrev, ll prePrev, ll prev, ll now, ll count) {

    if (now == t && count % 3 == 0) {
        ans = min(ans, count / 3);
    }

    if (prePrePrev != -1 && prePrev != -1 && prev != -1) {
        if (mem[now][prePrePrev][count % 3] == 0 || mem[now][prePrePrev][count % 3] > count) {
            mem[now][prePrePrev][count % 3] = count;
            REP(i, a[now].size()) {
                dfs(prePrev, prev, now, a[now][i], count + 1);
            }
        }
    } else {
        REP(i, a[now].size()) {
            dfs(prePrev, prev, now, a[now][i], count + 1);
        }
    }
}


int main() {

    cin >> n >> m;

    REP(i, m) {
        ll u, v;
        cin >> u >> v;
        u--;
        v--;
        a[u].push_back(v);
    }

    cin >> s >> t;
    s--;
    t--;

    dfs(-1, -1, -1, s, 0);

    if (ans == 1000000000) {
        cout << "-1";
    } else {
        cout << ans;
    }

    return 0;
}




Compiler output:
/tmp/ccwoCzJM.o: in function `dfs(long long, long long, long long, long long, long long)':
a.cc:(.text+0x20): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccwoCzJM.o
/tmp/ccwoCzJM.o: in function `main':
a.cc:(.text+0x3e5): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwoCzJM.o
a.cc:(.text+0x401): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccwoCzJM.o
a.cc:(.text+0x413): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwoCzJM.o
a.cc:(.text+0x41e): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwoCzJM.o
a.cc:(.text+0x425): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccwoCzJM.o
a.cc:(.text+0x430): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccwoCzJM.o
a.cc:(.text+0x437): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwoCzJM.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <fstream>

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

ll n, m;
vector<ll> a[100000];
ll mem[100000][100000][3];
ll s, t;
ll ans = 1000000000;

bool pairCompare(const P &firstElof, const P &secondElof) {
    return firstElof.second < secondElof.second;
}

void dfs(ll prePrePrev, ll prePrev, ll prev, ll now, ll count) {

    if (now == t && count % 3 == 0) {
        ans = min(ans, count / 3);
    }

    if (prePrePrev != -1 && prePrev != -1 && prev != -1) {
        if (mem[now][prePrePrev][count % 3] == 0 || mem[now][prePrePrev][count % 3] > count) {
            mem[now][prePrePrev][count % 3] = count;
            REP(i, a[now].size()) {
                dfs(prePrev, prev, now, a[now][i], count + 1);
            }
        }
    } else {
        REP(i, a[now].size()) {
            dfs(prePrev, prev, now, a[now][i], count + 1);
        }
    }
}


int main() {

    cin >> n >> m;

    REP(i, m) {
        ll u, v;
        cin >> u >> v;
        u--;
        v--;
        a[u].push_back(v);
    }

    cin >> s >> t;
    s--;
    t--;

    dfs(-1, -1, -1, s, 0);

    if (ans == 1000000000) {
        cout << "-1";
    } else {
        cout << ans;
    }

    return 0;
}




Compiler output:
/tmp/ccsth5Fc.o: in function `dfs(long long, long long, long long, long long, long long)':
a.cc:(.text+0x44): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccsth5Fc.o
/tmp/ccsth5Fc.o: in function `main':
a.cc:(.text+0x409): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccsth5Fc.o
a.cc:(.text+0x425): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccsth5Fc.o
a.cc:(.text+0x437): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccsth5Fc.o
a.cc:(.text+0x442): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccsth5Fc.o
a.cc:(.text+0x449): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccsth5Fc.o
a.cc:(.text+0x454): relocation truncated to fit: R_X86_64_PC32 against symbol `t' defined in .bss section in /tmp/ccsth5Fc.o
a.cc:(.text+0x45b): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccsth5Fc.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#define INT long long int
#define MOD 1000000007
using namespace std;
string s;
INT n, m, S, T, d[200020], chk[200020];
vector<INT> G[200020], G2[200020];
queue<INT> q;
unordered_map<INT, INT> dd[200020];
void dfs(int x, int y, int z)
{
    if( z == 3 )
    {
        dd[x][w#include <bits/stdc++.h>
#define INT long long int
#define MOD 1000000007
using namespace std;
string s;
INT n, m, S, T, d[200020], chk[200020];
vector<INT> G[200020], G2[200020];
queue<INT> q;
unordered_map<INT, INT> dd[200020];
void dfs(int x, int y, int z)
{
    if( z == 3 )
    {
        dd[x][y] = 1;
        G2[x].push_back(y);
        return;
    }
    for(int w : G[y])
    {
        if( dd[x][w] )
            continue;
        dfs(x, w, z+1);
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin>>n>>m;
    for(int i = 0 ; i < m ; i++ )
    {
        INT x, y;
        cin>>x>>y;
        G[x].push_back(y);
    }
    cin>>S>>T;
    for(int i = 1 ; i <= n ; i++ )
        dfs(i, i, 0);
    q.push(S);
    chk[S] = 1;
    while( !q.empty() )
    {
        S = q.front(); q.pop();
        if( S == T ) return cout<<chk[S]-1<<endl, 0;
        for(int w : G2[S])
            if( !chk[w] )
                q.push(w), chk[w] = chk[S]+1;
    }
    cout<<"-1\n";
    return 0;
}
] = 1;
        G2[x].push_back(y);
        return;
    }
    for(int w : G[y])
    {
        if( dd[x][w] )
            continue;
        dfs(x, w, z+1);
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin>>n>>m;
    for(int i = 0 ; i < m ; i++ )
    {
        INT x, y;
        cin>>x>>y;
        G[x].push_back(y);
    }
    cin>>S>>T;
    for(int i = 1 ; i <= n ; i++ )
        dfs(i, i, 0);
    q.push(S);
    chk[S] = 1;
    while( !q.empty() )
    {
        S = q.front(); q.pop();
        if( S == T ) return cout<<chk[S]-1<<endl, 0;
        for(int w : G2[S])
            if( !chk[w] )
                q.push(w), chk[w] = chk[S]+1;
    }
    cout<<"-1\n";
    return 0;
}


Compiler output:
a.cc:14:16: error: stray '#' in program
   14 |         dd[x][w#include <bits/stdc++.h>
      |                ^
a.cc: In function 'void dfs(int, int, int)':
a.cc:14:15: error: 'w' was not declared in this scope
   14 |         dd[x][w#include <bits/stdc++.h>
      |               ^
a.cc:14:16: error: expected ']' before 'include'
   14 |         dd[x][w#include <bits/stdc++.h>
      |                ^~~~~~~~
      |                ]
a.cc:24:1: error: a function-definition is not allowed here before '{' token
   24 | {
      | ^
a.cc:38:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   38 | int main()
      |         ^~
a.cc:38:9: note: remove parentheses to default-initialize a variable
   38 | int main()
      |         ^~
      |         --
a.cc:38:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:39:1: error: a function-definition is not allowed here before '{' token
   39 | {
      | ^
a.cc:64:1: error: expected primary-expression before ']' token
   64 | ] = 1;
      | ^
Language: C++

#include <bits/stdc++.h>
#define INT long long int
#define MOD 1000000007
using namespace std;
string s;
INT n, m, S, T, d[200020], chk[200020];
vector<INT> G[200020], G2[200020];
queue<INT> q;
unordered_map<INT, INT> dd[200020];
void dfs(int x, int y, int z)
{
    if( z == 3 )
    {
        dd[x][w] = 1;
        G2[x].push_back(y);
        return;
    }
    for(int w : G[y])
    {
        if( dd[x][w] )
            continue;
        dfs(x, w, z+1);
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin>>n>>m;
    for(int i = 0 ; i < m ; i++ )
    {
        INT x, y;
        cin>>x>>y;
        G[x].push_back(y);
    }
    cin>>S>>T;
    for(int i = 1 ; i <= n ; i++ )
        dfs(i, i, 0);
    q.push(S);
    chk[S] = 1;
    while( !q.empty() )
    {
        S = q.front(); q.pop();
        if( S == T ) return cout<<chk[S]-1<<endl, 0;
        for(int w : G2[S])
            if( !chk[w] )
                q.push(w), chk[w] = chk[S]+1;
    }
    cout<<"-1\n";
    return 0;
}


Compiler output:
a.cc: In function 'void dfs(int, int, int)':
a.cc:14:15: error: 'w' was not declared in this scope
   14 |         dd[x][w] = 1;
      |               ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <iomanip>

using namespace std;

typedef long long ll;
const int INF = 10000000;
vector<vector<int> > memo;
void dfs(int v, int mod, int dist, vector<vector<int> >& g, int count) {
    if (count >= 1000000) return;
    count += 1;
    if (dist < memo[mod][v]) {
        memo[mod][v] = dist;
        for (auto nv: g[v]) {
            if (dist+1 >= memo[(mod+1)%3][nv]) {
                continue;
            }
            dfs(nv, (mod+1)%3, dist+1, g);
        }
    }
}

int main() {
    int n, m;
    cin >> n >> m;
    vector<vector<int> > g;
    g = vector<vector<int> >(n, vector<int>(0, 0));
    memo = vector<vector<int> >(3, vector<int>(n, INF));

    for (int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        u--;
        v--;
        g[u].push_back(v);
    }

    int s, t;
    cin >> s >> t;
    s--;
    t--;

    dfs(s, 0, 0, g, 0);
    if (memo[0][t] == INF) cout << -1 << endl;
    else cout << memo[0][t]/3 << endl;



    return 0;
}

Compiler output:
a.cc: In function 'void dfs(int, int, int, std::vector<std::vector<int> >&, int)':
a.cc:25:16: error: too few arguments to function 'void dfs(int, int, int, std::vector<std::vector<int> >&, int)'
   25 |             dfs(nv, (mod+1)%3, dist+1, g);
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:16:6: note: declared here
   16 | void dfs(int v, int mod, int dist, vector<vector<int> >& g, int count) {
      |      ^~~
Language: C++

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>

using namespace std;

#define ll long long
#define P pair<int, int>
#define FOR(i, N) for (int i = 0; i < (int)N; i++)
#define FORIN(i, a, b) for (int i = a; i < (int)b; i++)
#define ALL(x) (x).begin(), (x).end()
#define GI(name) \
  int(name);     \
  scanf("%d", &(name))
#define GI2(name1, name2) \
  int(name1), (name2);    \
  scanf("%d %d", &(name1), &(name2))
#define GI3(name1, name2, name3) \
  int(name1), (name2), (name3);  \
  scanf("%d %d %d", &(name1), &(name2), &(name3))
#define GVI(name, size)    \
  vector<int>(name)(size); \
  FOR(i, (size)) scanf("%d", &(name)[i])
#define GS(name) \
  string(name);  \
  cin >> (name);
#define MOD 1000000007
#define DEBUG(...) debug(__LINE__, ":" __VA_ARGS__)

string to_string(string s) {
  return s;
}

template <class T>
string to_string(vector<T> v) {
  string ret = "{";
  FOR(i, v.size() - 1) { ret += to_string(v[i]) + ","; }
  if (v.size() > 0) {
    ret += to_string(v.back());
  }
  ret += "}";
  return ret;
}

void debug() {
  cerr << endl;
}

template <class Head, class... Tail>
void debug(Head head, Tail... tail) {
  cerr << to_string(head) << " ";
  debug(tail...);
}

void print() {
  cout << endl;
}

template <class Head, class... Tail>
void print(Head head, Tail... tail) {
  cout << to_string(head);
  print(tail...);
}
#define ONE_CLOCK 0.000000425

inline unsigned long long get_cycle() {
  unsigned int low, high;
  __asm__ volatile("rdtsc" : "=a"(low), "=d"(high));
  return ((unsigned long long int)low) | ((unsigned long long int)high << 32);
}

class Timer {
 public:
  unsigned long long start_time;
  Timer() { start_time = get_cycle(); }
  inline int get_time() {
    return get_cycle() * ONE_CLOCK - start_time * ONE_CLOCK;
  }
};
int main() {
  Timer timer;
  GI2(N, M);
  vector<vector<int>> G(N);
  FOR(i, M) {
    GI2(u, v);
    G[u - 1].push_back(v - 1);
  }
  GI2(S, T);
  vector<vector<int>> dist(N, vector<int>(3));
  queue<pair<int, int>> q;
  q.push(pair<int, int>(S - 1, 0));
  while (timer.get_time() < 1800) {
    if (!q.empty() && q.size() < 100000000) {
      pair<int, int> p = q.front();
      q.pop();
      int v = p.first;
      int d = p.second;
      if (v == T - 1 && d % 3 == 0) {
        print(d / 3);
        return 0;
      }
      for (int x : G[v]) {
        if (dist[x][(d + 1) % 3] == 0) {
          q.push(pair<int, int>(x, d + 1));
          dist[x][(d + 1) % 3] = 1;
        }
      }
    }
    print(-1);
    return 0;
  }

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

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define FORR(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)

#define CHMIN(a, b) (a) = min((a), (b))
#define CHMAX(a, b) (a) = max((a), (b))

#define DEBUG(x) cout << #x << ": " << (x) << endl
#define PRINT(x) cout << x << endl
#define all(x) x.begin(),x.end()


int main() {
    //３の倍数になっていないところがあれば到達可能,３の倍数になっているか数える
    int N,M;
    cin >> N >> M;
    vector<vector<int>> ren(N+1); //逆連結リスト　それにいくことができる奴ら

    REP(i,M){
        int u,v;
        cin >> u >> v;
        ren[v].push_back(u);
    }

    int S,T;
    cin >> S >> T;

    //%3で泊まるところは判定できる
    vector<bool> visited(N+1,false);
    queue<pii> Q;//node depth
    Q.push({T,0});
    vi dist(N+1,INT_MAX); //Tまでの距離
    bool edg[10e5+1][10e5+1][3] = {false};

    while (!Q.empty()) {
        int v = Q.front().first;
        int d = Q.front().second;
        Q.pop();
        if(d%3==0&&visited[v])continue; //ケンケンで到達可能かつ訪れていたら

        if(d%3==0){
            visited[v]=true;
            dist[v] = d;
        }

        for (int k = 0; k < ren[v].size(); k++) {
            int u = ren[v][k];
            if(edg[v][k][d%3])continue;
            edg[v][k][d%3]=true;
            Q.push(pii(u, d + 1));
        }
    }

    if(dist[S]==INT_MAX){
        cout << -1 << endl;
        return 0;
    }

    cout << dist[S]/3 << endl;
    return 0;


}



Compiler output:
a.cc: In function 'int main()':
a.cc:42:26: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   42 |     bool edg[10e5+1][10e5+1][3] = {false};
      |                      ~~~~^~
a.cc:42:26: error: could not convert '(1.0e+6 + (double)1)' from 'double' to 'long unsigned int'
   42 |     bool edg[10e5+1][10e5+1][3] = {false};
      |                      ~~~~^~
      |                          |
      |                          double
a.cc:42:26: error: size of array 'edg' has non-integral type 'double'
a.cc:42:18: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
   42 |     bool edg[10e5+1][10e5+1][3] = {false};
      |              ~~~~^~
a.cc:42:18: error: could not convert '(1.0e+6 + (double)1)' from 'double' to 'long unsigned int'
   42 |     bool edg[10e5+1][10e5+1][3] = {false};
      |              ~~~~^~
      |                  |
      |                  double
a.cc:42:18: error: size of array 'edg' has non-integral type 'double'
Language: C++

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

const long long mod = 1e9 + 7, inf = 1e12;
vector <vector <int>> adj, adj2;
vector <bool> mark, mark2;
vector <long long> d;

void Op(int v, int x, int k){
	if (!k){
		adj2[x].push_back(v);
		return;
	}
	for (auto u: adj[v]){
		Op(u, x, k - 1);
	}
}

void dfs(int v){
	mark2[v] = true;
	Op(v, v, 3);
	for (auto u: adj[v]){
		if (!mark2[u])
			dfs(u);
	}
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, m;
	cin >> n >> m;
	mark.resize(n);
	mark2.resize(n);
	adj.resize(n);
	adj2.resize(n);
	d.resize(n, inf);
	for (int i = 0; i < m; i++){
		int v, u;
		cin >> v >> u;
		v --;
		u --;
		adj[v].push_back(u);
	}
	int S, T;
	cin >> S >> T;
	S --;
	T --;
	dfs(S);
	queue <pair <int, int>> Q;
	Q.push(make_pair(-1, S));
	if (!mark2[T]){
		cout << -1;
		return 0;
	}
	mark[S] = true;
	while (Q.size()){
		pair <int, int> P = Q.front();
		Q.pop();
		if (P.second == S){
			d[S] = 0;
		}
		else{
			d[P.second] = min((long long)P.first + 1, d[P.second]);
		}
		for (auto u: adj2[P.second]){
			if (!mark[u]){
				mark[u] = true;
				Q.push(make_pair(d[P.second], u));
			}
		}
	}
	if (d[t] == inf){
		cout << -1;
		return 0;
	}
	cout << d[T];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:15: error: 't' was not declared in this scope
   75 |         if (d[t] == inf){
      |               ^
Language: C++

#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <string>
#include <map>
#include <algorithm>
using namespace std;


int main()
{
	int n, m;
	cin >> n >> m;

	vector<vector<int> > G(n, vector<int>());
	vector<vector<int> > G2(n, vector<int>());

	for(int i=0;i<m;i++){
		int a,b;
		cin >> a >> b;
		G[a-1].push_back(b-1);
	}

	for(int i=0;i<n;i++){
		for(int j=0;j<G[i].size();j++){
			int u=G[i][j];
			for(int k=0;k<G[u].size();k++){
				int v = G[u][k];
				G2[i].push_back(v);
			}
		}
	}

	int s,t;
	cin >> s >> t;
	s--; t--;

	// queue<int> que;
	// que.push(s);
	// vector<int> dist(n, -1);
	// dist[s] = 0;
	// while(!que.empty()){
	// 	int u = que.front(); que.pop();
	// 	for(int i=0;i<G[u].size();i++){
	// 		int v = G[u][i];
	// 		for(int j=0;j<G2[v].size();j++){
	// 			int z = G2[v][j];
	// 			if(dist[z] == -1){
	// 				dist[z] = dist[u] + 1;
	// 				que.push(z);
	// 			}
	// 		}
	// 	}
	// }
	cout << dist[t] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:17: error: 'dist' was not declared in this scope
   57 |         cout << dist[t] << endl;
      |                 ^~~~
Language: C++

;
vector<int> edge[100005];

int main(void)
{
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= m; ++i) {
        int u, v;
        scanf("%d%d", &u, &v);
        edge[u].push_back(v);
    }
    scanf("%d%d", &s, &t);
    for (int i = 1; i <= n; ++i)
        for (int j = 0; j <= 2; ++j)
            dis[i][j] = 0x3f3f3f3f;
    dis[s][0] = 0;
    q.push(make_pair(s, 0));
    while (!q.empty()) {
        int x = q.front().first, y = q.front().second;
        q.pop();
        for (int i = 0, _i = edge[x].size(); i < _i; ++i) {
            if (dis[edge[x][i]][(y + 1) % 3] > dis[x][y] + 1) {
                dis[edge[x][i]][(y + 1) % 3] = dis[x][y] + 1;
                q.push(make_pair(edge[x][i], (y + 1) % 3));
            }
        }
    }
    if (dis[t][0] == 0x3f3f3f3f) printf("-1\n");
    else printf("%d\n", dis[t][0] / 3);
    return 0;
}

Compiler output:
a.cc:2:1: error: 'vector' does not name a type
    2 | vector<int> edge[100005];
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:6:20: error: 'n' was not declared in this scope
    6 |     scanf("%d%d", &n, &m);
      |                    ^
a.cc:6:24: error: 'm' was not declared in this scope
    6 |     scanf("%d%d", &n, &m);
      |                        ^
a.cc:6:5: error: 'scanf' was not declared in this scope
    6 |     scanf("%d%d", &n, &m);
      |     ^~~~~
a.cc:10:9: error: 'edge' was not declared in this scope
   10 |         edge[u].push_back(v);
      |         ^~~~
a.cc:12:20: error: 's' was not declared in this scope
   12 |     scanf("%d%d", &s, &t);
      |                    ^
a.cc:12:24: error: 't' was not declared in this scope
   12 |     scanf("%d%d", &s, &t);
      |                        ^
a.cc:15:13: error: 'dis' was not declared in this scope
   15 |             dis[i][j] = 0x3f3f3f3f;
      |             ^~~
a.cc:16:5: error: 'dis' was not declared in this scope
   16 |     dis[s][0] = 0;
      |     ^~~
a.cc:17:5: error: 'q' was not declared in this scope
   17 |     q.push(make_pair(s, 0));
      |     ^
a.cc:17:12: error: 'make_pair' was not declared in this scope
   17 |     q.push(make_pair(s, 0));
      |            ^~~~~~~~~
a.cc:21:30: error: 'edge' was not declared in this scope
   21 |         for (int i = 0, _i = edge[x].size(); i < _i; ++i) {
      |                              ^~~~
a.cc:22:34: error: 'y' was not declared in this scope
   22 |             if (dis[edge[x][i]][(y + 1) % 3] > dis[x][y] + 1) {
      |                                  ^
a.cc:28:34: error: 'printf' was not declared in this scope
   28 |     if (dis[t][0] == 0x3f3f3f3f) printf("-1\n");
      |                                  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | ;
a.cc:29:10: error: 'printf' was not declared in this scope
   29 |     else printf("%d\n", dis[t][0] / 3);
      |          ^~~~~~
a.cc:29:10: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

#define pb push_back
#define mp make_pair
#define ll long long int
#define all(x) x.begin(), x.end()

void solve() {

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

    vector<vector<int>> graph(n);
    for (size_t i = 0; i < m; i++)
    {
        int u, v;
        cin >> u >> v;
        u--; v--;
        graph[v].push_back(u); // make opposite connection
    }

    int start, end;
    cin >> start >> end;
    start--; end--;

    // start from end and keep marking the nodes
    unordered_map<int, unordered_set<int>> god;
    for(int i = 0; i < n; i++) {
        god[i] = unordered_set<int>();
    }
    // queue<int> q;
    q.push(end);
    god[end].insert(0);
    unordered_set<int> seen; 

    int runner = 0;
    int ans = -1;

    while(!q.empty()) {
        // fetch all children
        auto parent = q.front();
        q.pop();
        // seen.insert(parent);
        
        if(parent == start) {
            for(auto val: god[parent]) {
                // cout << "val: " << val << "\n";
                if(val % 3 == 0 && (ans == -1 || ans > val)) {
                    ans = val;
                    break;
                }
            }

            if(runner == 5) break;

            runner++;
        }

        // fetch all children
        for(auto val: god[parent]) {
            for(auto child: graph[parent]) {                
                // update child val
                god[child].insert(val + 1);
            }
        }

        for(auto child: graph[parent]) {                
            // if(seen.find(child) != seen.end()) continue;
            // update child val
            q.push(child);
        }
    }


    // go check the start
    

    if(ans != -1) 
        ans /= 3;
    
    cout << ans << "\n";
}

int main() {
    ios_base::sync_with_stdio(false);

    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:33:5: error: 'q' was not declared in this scope
   33 |     q.push(end);
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
vector<pair<long long, pair<long long, long long>>> quotient_ranges(long long N){
  vector<pair<long long, pair<long long, long long>>> ans;
  for (long long i = 1; i * i <= N; i++){
    ans.push_back(make_pair(N / i, make_pair(i, i)));
  }
  for (long long i = N / ((long long) sqrt(N) + 1); i >= 1; i--){
    ans.push_back(make_pair(i, make_pair(N / (i + 1) + 1, N / i)));
  }
  return ans;
}
int main(){
  long long N;
  int K;
  cin >> N >> K;
  vector<pair<long long, pair<long long, long long>>> A = quotient_ranges(N);
  int cnt = A.size();
  vector<vector<long long>> dp(K, vector<long long>(cnt, 0));
  for (int i = 0; i < cnt - 1; i++){
    dp[0][i] = A[i].first - A[i + 1].first;
  }
  dp[0][cnt - 1] = 1;
  for (int i = 0; i < K - 1; i++){
    for (int j = cnt - 1; j >= 0; j--){
      int k = cnt - 1;
      long long sum = 0;
      if (k >= 0){
        while ((long long) A[j].first * A[k].first <= N){
          sum += dp[i][k];
          sum %= MOD;
          k--;
          if (k < 0){
            break;
          }
        }
      }
      dp[i + 1][j] += sum * dp[0][j];
      dp[i + 1][j] %= MOD;
    }
  }
  for (int i = 0; i < cnt; i++){
    ans += dp[K - 1][i];
  }
  ans %= MOD;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   44 |     ans += dp[K - 1][i];
      |     ^~~
      |     abs
a.cc:46:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   46 |   ans %= MOD;
      |   ^~~
      |   abs
Language: C++

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

using namespace std;

typedef long long ll;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

const ll SQ = 50000, MOD = 1e9 + 7;

ll dp[110][SQ], pref[110][SQ], slf[110][SQ];

int main() {
	fastInp;

	ll n, k;
	cin >> k >> n;

	ll sq = sqrt(k);

	dp[0][1] = 1;
	ll ans = 0;
	for (int i = 1; i <= n; i++) {
		ll sm = 0, cur = 0, curs = 0;
		for (int j = 1; j <= sq; j++) {
			cur += pref[i][j];
			cur = (cur + MOD) % MOD;
			dp[i][j] += cur;
			dp[i][j] %= MOD;

			curs += slf[i][j];
			ll dl = (k / j);
			curs = (curs + MOD) % MOD;
			dp[i][j] += (dl - sq) * curs;
			dp[i][j] %= MOD;

			sm += dp[i - 1][j];
			sm %= MOD;
		}
		for (int j = 1; j <= sq; j++) {
			dp[i][j] += sm;
			dp[i][j] %= MOD;
		}

		for (int j = 1; j <= sq; j++) {
			ll dl = (k / j);
			dl -= sq;
			pref[i + 1][1] += dp[i - 1][j] * dl;
			pref[i + 1][j + 1] -= dp[i - 1][j] * dl;

			slf[i + 1][j + 1] += dp[i - 1][j];
			slf[i + 1][sq + 1] -= dp[i - 1][j];
		}

		if (i == n) {
			for (int j = 1; j <= sq; j++) {
				ll dl = (k / j);
				dl -= sq;
				ans += dp[i][j] + (dp[i - 1][j] * dl);
				ans %= MOD;
			}
		}
	}

	cout << ans;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 'sqrt' was not declared in this scope; did you mean 'sq'?
   22 |         ll sq = sqrt(k);
      |                 ^~~~
      |                 sq
Language: C++

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

const unsigned long long BASE = 1e9 + 7;

int main()
{
    int n, k;
    cin >> n >> k;
    int sqrtN = int(sqrt(n));
    vector<unsigned long long> count0(sqrtN, 1);
    for (int i = sqrtN; i >= 1; i--)
    {
        double start = double(n) / (i + 1);
        double end = double(n) / i;
        // (start, end]
        count0.push_back(int(end) - int(start));
    }
    int m = count0.size();
    vector<unsigned long long> count(count0.begin(), count0.end());
    for (int iter = 2; iter <= k; iter++)
    {
        vector<unsigned long long> nextCount(m);
        unsigned long long sum = 0;
        for (int i = m - 1; i >= 0; i--)
        {
            sum = (sum + count[m - 1 - i]) % BASE;
            nextCount[i] = sum * count0[i] % BASE;
        }
        count = nextCount;
    }
    unsigned long long result = 0;
    for (int i = 0; i < m; i++)
    {
        result = (result + count[i]) % BASE;
    }
    cout << result << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'sqrt' was not declared in this scope; did you mean 'sqrtN'?
   13 |     int sqrtN = int(sqrt(n));
      |                     ^~~~
      |                     sqrtN
Language: C++

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

const int maxk=100+5;
const int maxn= 1e9+5;
const int mod=1e9+7;
int n,k;
int f[maxk][maxn];
int s[maxn];
int main(){
	cin>>n>>k;
	for(int i=1;i<=n;i++){
		s[i]=i;
	}
	for(int i=2;i<=k;i++){
		for(int j=1;j<=n;j++){
			f[i][j]=s[n/j];
		}
		for(int j=1;j<=n;j++){
			s[j]=(s[j-1]+f[i][j])%mod;
		}
    }
    int ans=0;
    for(int i=1;i<=n;i++) ans=(ans+f[k][i])%mod;
    cout<<ans;
}

Compiler output:
/tmp/ccwtE90v.o: in function `main':
a.cc:(.text+0x4f): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwtE90v.o
a.cc:(.text+0x94): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwtE90v.o
a.cc:(.text+0xf1): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwtE90v.o
a.cc:(.text+0x154): relocation truncated to fit: R_X86_64_PC32 against symbol `s' defined in .bss section in /tmp/ccwtE90v.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using Map = map<string,ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;

ll MOD=1000000007;

int main(){
	ll N;
    cin >> N;
    ll N2=sqrt(N);
    ll K;
    cin >> K;
    vector<vector<ll>> dp(K+1, vector<ll>(2*N2+2,0));
    for(ll i=1;i<=N2;i++){
        dp[1][i]=1
    ;}
    dp[1][N2+1]=N/N2-N2;
    for(ll i=N2+2;i<=2*N2;i++){
        dp[1][i]=N/(2*N2+1-i)-N/(2*N2+2-i)
    ;}
    for(ll i=2;i<=K;i++){
        ll sum=0
        for(ll j=2*N2;j>=1;j--){
            sum+=dp[i-1][2*N2+1-j]
            dp[i][j]=(sum*dp[1][j])%MOD
        ;}
    ;}
    ll ans=0;
    for(ll i=1;i<=2*N2;i++){
        ans+=dp[K][i];
        ans%=MOD;
    ;}
    cout<<ans<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: expected ',' or ';' before 'for'
   27 |         for(ll j=2*N2;j>=1;j--){
      |         ^~~
a.cc:27:23: error: 'j' was not declared in this scope
   27 |         for(ll j=2*N2;j>=1;j--){
      |                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
#define all(ppp) ppp.begin(),ppp.end()
#define out(ppp) cout<<(ppp)<<endl
#define out1(ppp) cout<<(ppp) 
#define MAX_CHAR 256

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define pb push_back

typedef long double ld;
typedef complex<ld> cd;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<bool> vb;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<vpi> vvpi;

typedef set<pi> spi;

const int INF=INT_MAX;
ll dp[101][101010];

int main(){
    int k,n;
    cin>>k>>n;
    vector<int> a;
    FOR(i,1,100000){
        if(i*i>k)break;
        a.push_back(i);
        a.push_back(k/i);
    }
    a.push_back(0);
    sort(a.begin(),a.end());
    int m = a.size();
    dp[0][0]=1;
    F0R(i,n){
        F0R(j,m)(dp[i][j+1]+=dp[i][j])%=MOD;
        F0R(j,m-1){
            int idx = m-j-2;
            dp[i+1][j]=dp[i][idx]*(a[j+1]-a[j])%MOD;
        }
    }
    ll ans = 0;
 
    F0R(i,m)ans += dp[n][i];
    cout<<ans%mod<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:15: error: 'mod' was not declared in this scope; did you mean 'modf'?
   60 |     cout<<ans%mod<<endl;
      |               ^~~
      |               modf
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
#define all(ppp) ppp.begin(),ppp.end()
#define out(ppp) cout<<(ppp)<<endl
#define out1(ppp) cout<<(ppp) 
#define MAX_CHAR 256

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define pb push_back

typedef long double ld;
typedef complex<ld> cd;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<bool> vb;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<vpi> vvpi;

typedef set<pi> spi;

const int INF=INT_MAX;
ll dp[101][101010];

int main(){
    int k,n;
    cin>>k>>n;
    vector<int> a;
    FOR(i,1,100000){
        if(i*i>k)break;
        a.push_back(i);
        a.push_back(k/i);
    }
    a.push_back(0);
    sort(a.begin(),a.end());
    int m = a.size();
    dp[0][0]=1;
    F0R(i,n){
        F0R(j,m)(dp[i][j+1]+=dp[i][j])%=mod;
        F0R(j,m-1){
            int idx = m-j-2;
            dp[i+1][j]=dp[i][idx]*(a[j+1]-a[j])%mod;
        }
    }
    ll ans = 0;
 
    F0R(i,m)ans += dp[n][i];
    cout<<ans%mod<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:41: error: 'mod' was not declared in this scope; did you mean 'modf'?
   51 |         F0R(j,m)(dp[i][j+1]+=dp[i][j])%=mod;
      |                                         ^~~
      |                                         modf
a.cc:54:49: error: 'mod' was not declared in this scope; did you mean 'modf'?
   54 |             dp[i+1][j]=dp[i][idx]*(a[j+1]-a[j])%mod;
      |                                                 ^~~
      |                                                 modf
a.cc:60:15: error: 'mod' was not declared in this scope; did you mean 'modf'?
   60 |     cout<<ans%mod<<endl;
      |               ^~~
      |               modf
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MOD 1000000007
#define all(ppp) ppp.begin(),ppp.end()
#define out(ppp) cout<<(ppp)<<endl
#define out1(ppp) cout<<(ppp) 
#define MAX_CHAR 256

#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
#define pb push_back

typedef long double ld;
typedef complex<ld> cd;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<bool> vb;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
typedef vector<vpi> vvpi;

typedef set<pi> spi;

const int INF=INT_MAX;
ll dp[101][101010];
 
 
int main(){
    int k,n;
    cin>>k>>n;
    vector<int> a;
    REP(i,1,100000){
        if(i*i>k)break;
        a.push_back(i);
        a.push_back(k/i);
    }
    a.push_back(0);
    sort(a.begin(),a.end());
    int m = a.size();
    dp[0][0]=1;
    rep(i,n){
        rep(j,m)(dp[i][j+1]+=dp[i][j])%=mod;
        rep(j,m-1){
            int idx = m-j-2;
            dp[i+1][j]=dp[i][idx]*(a[j+1]-a[j])%mod;
        }
    }
    ll ans = 0;
 
    rep(i,m)ans += dp[n][i];
    cout<<ans%mod<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:9: error: 'i' was not declared in this scope
   42 |     REP(i,1,100000){
      |         ^
a.cc:42:5: error: 'REP' was not declared in this scope
   42 |     REP(i,1,100000){
      |     ^~~
a.cc:51:5: error: 'rep' was not declared in this scope
   51 |     rep(i,n){
      |     ^~~
a.cc:61:15: error: 'mod' was not declared in this scope; did you mean 'modf'?
   61 |     cout<<ans%mod<<endl;
      |               ^~~
      |               modf
Language: C++

// #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep3(i,a,b) for(ll i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define vec2(a,b) vector<vec>(a,vec(b))
#define vec2ll(a,b) vector<vec>(a,vecll(b))
#define vec3(a,b,c) vector<vector<vec>>(a,vec2(b,c))
#define vec3ll(a,b,c) vector<vector<vecll>>(a,vec2ll(b,c))
#define fi first
#define se second
#define endl "\n"
#define all(c) begin(c),end(c)
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))
#define MM " "
using namespace std;
int in() {int x;cin>>x;return x;}
ll lin() {ll x;cin>>x;return x;}
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T> inline void print(pair<T,T> p){cout<<"("<<p.first<<","<<p.second<<") ";}
template<class T> inline void print(vector<pair<T,T>> v){for(auto e:v)print(e); cout<<endl;}
template<class T> inline void print(T v){for(auto e:v)cout<<e<<" ";cout<<endl;}
const ll mod=1e9+7;
ll dp[200][100000];
main(){
  int n=in(),k=in();
  vec d;
  for(int i=1;i*i<=n;i++){
    d.pb(i);
    if(i!=n/i)d.pb(n/i);
  }
  int D=d.size();
  rep(i,D)dp[0][i]=1;
  sort(all(d));
  rep(ii,k){
    int pre=0;
    rep(i,D){
      dp[ii+1][D-1-i]+=dp[ii][i]*(d[i]-pre)%mod;
      pre=d[i];
    }
    for(auto e:mp){
    rep3(i,D-2,0){
      dp[ii+1][i]=(dp[ii+1][i+1]+dp[ii+1][i])%mod;
    }
  }
  cout<<dp[k][0]<<endl;
}


Compiler output:
a.cc:37:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   37 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:53:16: error: 'mp' was not declared in this scope; did you mean 'dp'?
   53 |     for(auto e:mp){
      |                ^~
      |                dp
a.cc:59:2: error: expected '}' at end of input
   59 | }
      |  ^
a.cc:37:7: note: to match this '{'
   37 | main(){
      |       ^
Language: C++

// #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep3(i,a,b) for(ll i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define vec2(a,b) vector<vec>(a,vec(b))
#define vec2ll(a,b) vector<vec>(a,vecll(b))
#define vec3(a,b,c) vector<vector<vec>>(a,vec2(b,c))
#define vec3ll(a,b,c) vector<vector<vecll>>(a,vec2ll(b,c))
#define fi first
#define se second
#define endl "\n"
#define all(c) begin(c),end(c)
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))
#define MM " "
using namespace std;
int in() {int x;cin>>x;return x;}
ll lin() {ll x;cin>>x;return x;}
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T> inline void print(pair<T,T> p){cout<<"("<<p.first<<","<<p.second<<") ";}
template<class T> inline void print(vector<pair<T,T>> v){for(auto e:v)print(e); cout<<endl;}
template<class T> inline void print(T v){for(auto e:v)cout<<e<<" ";cout<<endl;}
const ll mod=1e9+7;
main(){
  int n=in(),k=in();
  vec d;
  for(int i=1;i*i<=n;i++){
    d.pb(i);
    if(i!=n/i)d.dp(n/i);
  }
  map<int,ll> mp;
  for(auto e:d)mp[e]=1;
  sort(all(d),greater<int>());
  while(k--){
    map<int,ll> next;
    int pre=0;
    for(auto e:mp){
      next[n/e.first]+=e.second*(e.first-pre)%mod;
      pre=e.first;
    }
    rep2(i,1,d.size()-1){
      next[d[i]]=(next[d[i]]+next[d[i-1]])%mod;
    }
    mp=next;
  }
  cout<<mp[1]<<endl;
}


Compiler output:
a.cc:36:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   36 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:41:17: error: 'class std::vector<int>' has no member named 'dp'
   41 |     if(i!=n/i)d.dp(n/i);
      |                 ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=1e9+7;
ll s[102][202000],b[102][202000],n,k;      //第几位  第几位是多少
int main(){
	cin>>n>>k;
	int d=sqrt(n);
	s[0][1]=1; //前缀和  因此只有赋值s[0][1];
	for(int i=1;i<=k;i++){
		for(int j=1;j<=d;j++) s[i][j]=(s[i-1][j-1]+s[i][j])%mod;
		for(int j=1;j<=d;j++) b[i][j]=(b[i-1][j-1]+b[i][j])%mod;
		for(int j=1;j<=d;j++){
			b[i][j]=(n/j-n/(j+1))*s[i-1][j];
			s[i][j]=(s[i-1][d]+b[i-1][d]-b[i-1][j-1]+mod)%mod;
			if(j==n/j) b[i][j]=0;
		}
 }
 for(int i=1;i<=d;i++) ans=(ans+s[k][i]+b[k][i])%mod;
 cout<<ans<<'\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |  for(int i=1;i<=d;i++) ans=(ans+s[k][i]+b[k][i])%mod;
      |                        ^~~
      |                        abs
a.cc:20:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |  cout<<ans<<'\n';
      |        ^~~
      |        abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int maxn=3e5+10,mod=1e9+7;
int a,b,f[maxn],k;
map<int,int,greater<int>> dp,dp2;
unordered_map<int,int> fre;
void plusle(int &a,int b){
    a+=b;if(a>=mod)a-=mod; return;
}
void minun(int &a,int b){
    a-=b; if(a<0)a+=mod; return;
}
int add(int a, int b) {
  a += b;
  if (a >= mod) a -= mod;
  return a;
}
int mul(int a,int b){
    return (int)(((long long)a*b)%mod);
}

int main(){
    int n;
    scanf("%d%d",&n,&k);
    fre.reserve(1<<17);
    fre.max_load_factor(0.25);
    int cc=n,pt=1;
    while(cc){
      //  cout<<cc<<'\n';
        int x=n/cc;
        dp[x]=(n/x-n/(x+1));
        fre[x]=dp[x];
        cc=(n/(x+1));
    }
    int sum=0;
  //  for(auto i:dp)
    //printf("%d %d\n",i.first,i.second);
    while(k--){
        //cout<<'g'<<'\n';
    int last=-1;
    //dp2.clear();
    for(auto &it:dp){
        dp2[it.first]=(last==-1)?it.second:add(last,it.second);
        last=dp2[it.first];
    }
    for(auto &it:dp){
        it.first=mul(fre[it.first],dp2[n/(it.first)]);
    }
    }
    printf("%d\n",dp[n]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:17: error: assignment of read-only member 'std::pair<const int, int>::first'
   47 |         it.first=mul(fre[it.first],dp2[n/(it.first)]);
      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define MOD = 1_000_000_007
using namespace std;

typedef long long swl;
typedef struct PATTERN {
  swl sum;
  swl ran;
} pattern_t;

int main() {
#ifdef  DEBUG
  ifstream in("input.txt");
  cin.rdbuf(in.rdbuf());
#endif  // for local.
  int n, k;
  cin >> n >> k;
  int rt_n = (int)floot(sqrt(n));
  int ptnn = n/(rt_n+1) + rt_n;

  pattern_t ptn[ptnn];
  for (int i = 0; i < rt_n; i++) {
    ptn[i].sum = n / (i+1);
    ptn[i].ran = 1;
  }
  if (ptnn & 1 == 0) { // rt_n * (rt_n+1) <= n
    ptn[rt_n+1].sum = n / rt_n;
    ptn[rt_n+1].ran = 1;
  }
  for (int i = 1; i < n/(rt_n+1) + 1; i++) {
    ptn[ptnn-i].ran = ptn[i-1].sum - ptn[i].sum;
    ptn[ptnn-i].sum = ptn[ptnn-i].ran * i % MOD;
  }

  for (int i = 2; i < k; i++) {
    for (int j = 0; j < ptnn; j++) {
      for (int x = 0; x < ptnn-j; x++) {
        ptn[j].sum = (ptn[j].sum + ptn[x].sum * ptn[x].ran) % MOD;
      } 
    }
  }
  swl ans = 0;
  for (int i = 0; i < ptnn; i++) {
    ans = (ans + ptn[i].sum * ptn[i].ran) % MOD;
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: 'floot' was not declared in this scope; did you mean 'floor'?
   18 |   int rt_n = (int)floot(sqrt(n));
      |                   ^~~~~
      |                   floor
a.cc:2:13: error: expected primary-expression before '=' token
    2 | #define MOD = 1_000_000_007
      |             ^
a.cc:32:45: note: in expansion of macro 'MOD'
   32 |     ptn[ptnn-i].sum = ptn[ptnn-i].ran * i % MOD;
      |                                             ^~~
a.cc:2:15: error: unable to find numeric literal operator 'operator""_000_000_007'
    2 | #define MOD = 1_000_000_007
      |               ^~~~~~~~~~~~~
a.cc:32:45: note: in expansion of macro 'MOD'
   32 |     ptn[ptnn-i].sum = ptn[ptnn-i].ran * i % MOD;
      |                                             ^~~
a.cc:2:13: error: expected primary-expression before '=' token
    2 | #define MOD = 1_000_000_007
      |             ^
a.cc:38:63: note: in expansion of macro 'MOD'
   38 |         ptn[j].sum = (ptn[j].sum + ptn[x].sum * ptn[x].ran) % MOD;
      |                                                               ^~~
a.cc:2:15: error: unable to find numeric literal operator 'operator""_000_000_007'
    2 | #define MOD = 1_000_000_007
      |               ^~~~~~~~~~~~~
a.cc:38:63: note: in expansion of macro 'MOD'
   38 |         ptn[j].sum = (ptn[j].sum + ptn[x].sum * ptn[x].ran) % MOD;
      |                                                               ^~~
a.cc:2:13: error: expected primary-expression before '=' token
    2 | #define MOD = 1_000_000_007
      |             ^
a.cc:44:45: note: in expansion of macro 'MOD'
   44 |     ans = (ans + ptn[i].sum * ptn[i].ran) % MOD;
      |                                             ^~~
a.cc:2:15: error: unable to find numeric literal operator 'operator""_000_000_007'
    2 | #define MOD = 1_000_000_007
      |               ^~~~~~~~~~~~~
a.cc:44:45: note: in expansion of macro 'MOD'
   44 |     ans = (ans + ptn[i].sum * ptn[i].ran) % MOD;
      |                                             ^~~
Language: C++

#include <map>
#include <set>
#include <iostream> 
#include <queue>
#include <math.h>
#include <string>
#include <algorithm>
using namespace std;

const int mod = 1e9 + 7;

const int N = 105;
const int M = 4e4 + 5;

int dp[N][2][M];

int add(int x, int y) {
	int ret = (x + y);
	if (ret < 0) {
		ret += mod;
	}
	if (ret >= mod) {
		ret -= mod;
	}
	return ret;
}
int mul(int x, int y) {
	return (long long)x*y%mod;
}

int cc[M];

void solve() {
	int n, k;
	scanf("%d %d", &n, &k);
	int SQ = sqrt(n);
	while ((SQ + 1)*(SQ + 1) <= n) ++SQ;
	for (int i = 1; i <= SQ; ++i) {
		++dp[1][0][i];
	}
	for (int st = SQ + 1; st <= n;) {
		int l = st, r = n, mid;
		int v = n / st;
		while (l < r) {
			mid = (l + r + 1) / 2;
			if (n / mid != v) {
				r = mid - 1;
			}
			else {
				l = mid;
			}
		}
		dp[1][1][v] = l - st + 1;
		cc[v] = l - st + 1;
		st = l + 1;
	}
	int tmp1[M], tmp2[M];
	int maxi = n / (SQ + 1);
	for (int ind = 2; ind <= k; ++ind) {
		//만약 bit == 0 이라면 우선적으로 1부터 SQ까지 모든 값이 똑같이 더해지게 된다. 
		//bit==0 이라면 bit==1 에 대해서는 상태 dp[ind][1][x]에 dp[ind-1][0][x]의 값이 더해지게 된다.
		//만약 bit==1 이라면 사실 dp[ind][0][y] (1<=y<=x)까지 모두 dp[ind-1][1][x]의 값이 더해지게 된다.
		int sum = 0;
		memset(tmp1, 0, sizeof(tmp1));
		memset(tmp2, 0, sizeof(tmp2));

		for (int x = 1; x <= SQ; ++x) {
			sum = add(sum, dp[ind - 1][0][x]);
			tmp2[maxi] = add(tmp2[maxi], dp[ind - 1][0][x]);
			tmp2[x -1] = add(tmp2[x-1], -dp[ind - 1][0][x]);
		}
		tmp1[0] = sum;
		for (int x = 1; x <= SQ; ++x) {
			tmp1[0] = add(tmp1[0], dp[ind - 1][1][x]);
			tmp1[x + 1] = add(tmp1[x + 1], -dp[ind - 1][1][x]);
		}
		for (int x = 1; x <= SQ; ++x) {
			tmp1[x] = add(tmp1[x], tmp1[x - 1]);
			dp[ind][0][x] = tmp1[x];
		}

		for (int x = maxi; x >= 1; --x) {
			tmp2[x] = add(tmp2[x], tmp2[x + 1]);
			dp[ind][1][x] = mul(tmp2[x], cc[x]);
		}
	}
	int ret = 0;
	for (int x = 1; x <= SQ; ++x) {
		ret = add(ret, dp[k][1][x]);
		ret = add(ret, dp[k][0][x]);
	}
	printf("%d\n", ret);
}
int main() {
	//freopen("input.txt", "r", stdin);
	solve();
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:64:17: error: 'memset' was not declared in this scope
   64 |                 memset(tmp1, 0, sizeof(tmp1));
      |                 ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <algorithm>
  +++ |+#include <cstring>
    8 | using namespace std;