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

/*
 * @Author: CucumicsMelon
 * @Date: 2018-11-02 21:31:37
 * @Last Modified by: CucumicsMelon
 * @Last Modified time: 2018-11-02 21:46:28
 */
#include <cstdio>
#include <iostream>
#include <string.h>
#include<bits/stdc++.h>
#include <string>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <stack>
#include <iomanip>
#define rep(i,n,m) for(int i=n;i<=m;++i)
#define per(i,n,m) for(int i=n;i>=m;--i)
#define mem0(a) memset(a,0,sizeof(a))
#define meminf(a) memset(a,0x3f,sizeof(a))
#define maxn 100000+50
#define inf 0x7fffffff
#define ll long long
using namespace std;
inline int read()
{
    int x = 0, f = 1;
    char ch = getchar();
    while (ch<'0' || ch>'9')
    {
        if (ch == '-') f = -1;
        ch = getchar();
    }
    while (ch >= '0'&&ch <= '9')
    {
        x = 10 * x + ch - '0';
        ch = getchar();
    }
    return x*f;
}
struct  City{
    int index,pre,sor,year;
};
struct Pre{
   City city[maxn];
    int num=0;
}p_pre[maxn];
City ans1[maxn];
int cmp(City x,City y)
{
    return x.year<y.year;
}
int cmp1(City x,City y)
{
    return x.index<y.index;
}
int main()
{
    int m=read();
    int n=read();
    int anss=0;
    rep(i,1,n)
    {
        int p=read(),yy=read();
        p_pre[p].city[++(p_pre[p].num)].year=yy;
        p_pre[p].city[++(p_pre[p].num)].index=i;
        p_pre[p].city[++(p_pre[p].num)].pre=p;
    }
    for (int i = 1; i <=n; ++i) {
        if(p_pre[i].num)
        {
            sort(p_pre[i].city+1,p_pre[i].city+p_pre[i].num+1,cmp);
            for(int j=1;j<=p_pre[i].num;++j)
                p_pre[i].city[j].sor=j;
            for(int j=1;j<=p_pre[i].num;++j)
            {
                anss++;
                ans1[anss].pre=p_pre[i].city[j].pre;
                ans1[anss].index=p_pre[i].city[j].index;
                ans1[anss].sor=p_pre[i].city[j].sor;
            }
        }
    }
    sort(ans1+1,ans1+n+1,cmp1);
    rep(i,1,n)
    {
        printf("%06d%06d\n",ans1[i].pre,ans1[i].sor);
    }
}

Compiler output:
/tmp/cc8pz5h9.o: in function `main':
a.cc:(.text+0x324): relocation truncated to fit: R_X86_64_PC32 against symbol `ans1' defined in .bss section in /tmp/cc8pz5h9.o
a.cc:(.text+0x360): relocation truncated to fit: R_X86_64_PC32 against symbol `ans1' defined in .bss section in /tmp/cc8pz5h9.o
a.cc:(.text+0x39c): relocation truncated to fit: R_X86_64_PC32 against symbol `ans1' defined in .bss section in /tmp/cc8pz5h9.o
a.cc:(.text+0x3e9): relocation truncated to fit: R_X86_64_PC32 against symbol `ans1' defined in .bss section in /tmp/cc8pz5h9.o
a.cc:(.text+0x3f4): relocation truncated to fit: R_X86_64_PC32 against symbol `ans1' defined in .bss section in /tmp/cc8pz5h9.o
a.cc:(.text+0x422): relocation truncated to fit: R_X86_64_PC32 against symbol `ans1' defined in .bss section in /tmp/cc8pz5h9.o
a.cc:(.text+0x438): relocation truncated to fit: R_X86_64_PC32 against symbol `ans1' defined in .bss section in /tmp/cc8pz5h9.o
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<iostream>
#include<sstream>
#include<iterator>
#include<algorithm>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<list>
using namespace std;
const double eps = 1e-8;
typedef long long LL;
const int M=100005;
int n,m;
struct node
{
	int p,y;
	int id;
	string s;
}a[M];
bool cmp(node x,node z)
{
	if(x.p==z.p)
	{
		return x.y<=z.y;
	}
	return x.p<=z.p;
}
bool cmp1(node x,node z)
{
	
	return x.id<=z.id;
}
int f(int a)   
{  
    int n=0;  
    while (a)  
    {  
        a = a / 10;  
        n++;  
    }  
    return n;  

}  
int main()
{
    
    scanf("%d%d",&m,&n);
    for(int i=1;i<=n;i++)
	{
		scanf("%d%d",&a[i].p,&a[i].y);   
		a[i].id=i;
	}
	sort(a+1,a+n+1,cmp);
	int k=1;
	int t=1;
    for(int i=1;i<=n;i++)
	{
	  if(k==a[i].p)
	  {
	    int num=6-f(i);
	    
	  	for(int j=1;j<=num;j++)
		{
			a[i].s+="0";
			//cout<<"0";
		}
		char s1[10];
		itoa(k,s1,10);
		a[i].s+=s1;
		
		
		num=6-f(a[i].y);
	  	for(int j=1;j<=num;j++)
		{
			a[i].s+="0";
		}
		itoa(t,s1,10);
		a[i].s+=s1;
		 t++;
	  }
	  else
	  	{
		t=1;
		k++;
		i--;
	  	}
	}
	sort(a+1,a+n+1,cmp1);
	for(int i=1;i<=n;i++)
		cout<<a[i].s<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:77:17: error: 'itoa' was not declared in this scope
   77 |                 itoa(k,s1,10);
      |                 ^~~~
Language: C++

#include <iostream>
#include <string.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
struct ppppp
{
    int num;
    int year;
    long long ans;
    long long xian;
}d[100005];
bool cmp(ppppp a,ppppp b)
{
    if(a.xian<b.xian)return true;
    else if(a.xian==b.xian)
    {
        if(a.year<b.year)return true;
    }
    return false;
}
bool cmp2(ppppp a,ppppp b)
{
    if(a.num<b.num)return true;
    return false;
}
int weishu(int a)
{
    int d=0;
    while(a!=0)
    {
        a/=10;
        d++;
    }
    return d;
}
int main()
{
    int a,b;
    scanf("%d %d",&a,&b);
    for(int i=1;i<=b;i++)
    {
        d[i].num=i;
        cin>>d[i].xian;
        cin>>d[i].year;
    }
    sort(d+1,d+b+1,cmp);
    int cnt=0;
    for(int i=1;i<=b;i++)
    {
        h=1;
        if(i==1||d[i].xian!=d[i-1].xian)
        {
            cnt=1;
        }
        d[i].ans=d[i].xian*1000000+cnt;
        cnt++;
    }
    sort(d+1,d+b+1,cmp2);
    for(int i=1;i<=b;i++)
    {
        printf("%012lld\n",d[i].ans);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:9: error: 'h' was not declared in this scope
   53 |         h=1;
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ALL(v.at(a[i])) (v.at(a[i])).begin(),(v.at(a[i])).end()
int main(){
  int n,m;
  cin>>n>>m;
  int a[m],b[m];
  vector<vector<int>> v;
  v.resize(n+1);
  for(int i=0;i<m;i++){
    cin>>a[i]>>b[i];
    v.at(a[i]).push_back(b[i]);
  }
  for(int i=1;i<n+1;i++){
    sort(v.at(i).begin(),v.at(i).end());
  }
  for(int i=0;i<m;i++){
    if(a[i]<10)
      cout<<"00000";
    else if(a[i]<100)
      cout<<"0000";
    else if(a[i]<1000)
      cout<<"000";
    else if(a[i]<10000)
      cout<<"00";
    else if(a[i]<100000)
      cout<<"0";
    cout<<a[i];
    if(lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<10)
      cout<<"00000";
    else if(lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<100)
      cout<<"0000";
    else if(lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<1000)
      cout<<"000";
    else if(lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<10000)
      cout<<"00";
    else if(lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<100000)
      cout<<"0";
    cout<<lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<<endl;
  }
}

Compiler output:
a.cc:3:14: error: expected ',' or ')', found "."
    3 | #define ALL(v.at(a[i])) (v.at(a[i])).begin(),(v.at(a[i])).end()
      |              ^
a.cc: In function 'int main()':
a.cc:29:20: error: 'ALL' was not declared in this scope
   29 |     if(lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<10)
      |                    ^~~
a.cc:39:23: error: 'ALL' was not declared in this scope
   39 |     cout<<lower_bound(ALL(v.at(a[i])),b[i])-v.at(a[i]).begin()<<endl;
      |                       ^~~
Language: Java

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        HashMap<Integer, int[]> map = new HashMap<>();
        ArrayList<Pair> list = new ArrayList<>();
        for(int i = 0; i < n; i++) {
            int[] array = new int[Integer.MAX_VALUE];
            map.put(i+1, array);
        }
        for(int i = 0; i < m; i++) {
            int p = sc.nextInt();
            int y = sc.nextInt();
            list.add(new Pair(p, y));
            int[] a = map.get(p);
            a[y]++;
            map.put(p, a);
        }
        for(int i = 0; i < n; i++) {
            int num = 1;
            int[] a = map.get(i+1);
            for(int j = 0; j < a.length; j++) {
                if(a[j] == 1) {
                    a[j] = num;
                    num++;
                }
            }
        }
        for(Pair pair: list) {
            int p = pair.p;
            int y = pair.y;
            int order  = map.get(p)[y];
            System.out.println(String.format("%06d", p) + String.format("%06d", order));
        }
    }
    static class Pair {
        int p;
        int y;
        Pair(int p, int y) {
            this.p = p;
            this.y = y;
        }
    }
}



Compiler output:
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
        HashMap<Integer, int[]> map = new HashMap<>();
        ^
  symbol:   class HashMap
  location: class Main
Main.java:7: error: cannot find symbol
        HashMap<Integer, int[]> map = new HashMap<>();
                                          ^
  symbol:   class HashMap
  location: class Main
Main.java:8: error: cannot find symbol
        ArrayList<Pair> list = new ArrayList<>();
        ^
  symbol:   class ArrayList
  location: class Main
Main.java:8: error: cannot find symbol
        ArrayList<Pair> list = new ArrayList<>();
                                   ^
  symbol:   class ArrayList
  location: class Main
6 errors
Language: C++

n,m = map(int,input().split())
a = []
c =[[] for i in range(n+1)]
for i in range(m):
    b = list(map(int,input().split()))
    a.append(b)
    c[b[0]].append(b[1])

for i in c:
    i.sort()
for i in a:
    s = '{0:06d}'.format(i[0])
    s += '{0:06d}'.format(c[i[0]].index(i[1])+1)
    print(s)

Compiler output:
a.cc:12:9: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
   12 |     s = '{0:06d}'.format(i[0])
      |         ^~~~~~~~~
a.cc:13:10: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
   13 |     s += '{0:06d}'.format(c[i[0]].index(i[1])+1)
      |          ^~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n,m = map(int,input().split())
      | ^
Language: C++

#include<iostream>
#include<iterator>
#include<vector>
#include<algorithm>
using namespace std;
const int maxn = 100007;

string s = "000000000000";
vector<int> f[maxn];
int a[maxn], x[maxn], y[maxn];
int main(){
    memset(a, 0, sizeof(a));
    int n, m;
    cin >> n >> m;
    for(int i = 1; i <= m; ++i){
        cin >> x[i] >> y[i];
        f[x[i]].push_back(y[i]);
    }
    for(int i = 1; i <= n; ++i){
        sort(f[i].begin(), f[i].end());
    }
    for(int i = 1; i <= m; ++i){
        int delta = distance(f[x[i]].begin(), lower_bound(f[x[i]].begin(), f[x[i]].end(), y[i])) + 1;
        string s1 = s;
        int d = 5;
        while(x[i] > 0){
            s1[d] = x[i] % 10 + '0';
            x[i] /= 10;
            --d;
        }
        d = 11;
        while(delta > 0){
            s1[d] = delta % 10 + '0';
            delta /= 10;
            --d;
        }
        cout << s1 << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'memset' was not declared in this scope
   12 |     memset(a, 0, sizeof(a));
      |     ^~~~~~
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 <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <utility>
using namespace std;


int main(){
    int n, m;
    vector<pair<int, int> > a(0);
    vector<set<int> > s(0);
    pair<int, int> x;
    set<int> t;
    int p, y;
        
    cin >> n >> m;
    for(int i=0;i<=n;i++){
        s.push_back(t);
    }
    for(int i=0;i<m;i++){
        cin >> x.first >> x.second;
        a.push_back(x);
        s[x.first].insert(x.second); 
    }

    for(int i=0;i<m;i++){
        p = a[i].first;
        y = a[i].second;
        printf("%06d%06d\n", p, (int)distance(s[p].begin(), s[p].find(y))+1);
    }

	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'cin' was not declared in this scope
   19 |     cin >> n >> m;
      |     ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    7 | #include <utility>
  +++ |+#include <iostream>
    8 | using namespace std;
Language: C++

// Author: Jinhai Chen
#include <cstring>
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
const int INF = 0x3f3f3f3f;
typedef long long ll;
const int maxn = 1e5 + 10;
struct node {
	int y,id;
	bool operator<(const node& rhs) const { return y<rhs.y; }
}nd;

vector<node> p[maxn];
int n,m;
int ans1[maxn],ans2[maxn];
int main() {
#ifndef ONLINE_JUDGE
//	freopen("data.in","r",stdin);
#endif
	ios::sync_with_stdio(false);
	cin>>m>>n;
	int u,v;
	for(int i=1;i<=n;i++) { cin>>u>>v; nd.id=i; nd.y=v; p[u].push_back(nd); }
	for(int i=1;i<=n;i++) sort(p[i].begin(),p[i].end());
	for(int i=0;i<=m;i++) {
		for(int j=0;j<p[i].size();j++) {
			int id=p[i][j].id,a2=j+1;
			ans1[id]=i; ans2[id]=a2;
		}
	}
	for(int i=1;i<=n;i++) {
		printf("%06d%06d\n",ans1[i],ans2[i]);
	}
	return 0;
}














Compiler output:
a.cc:15:1: error: 'vector' does not name a type
   15 | vector<node> p[maxn];
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:25:61: error: 'p' was not declared in this scope
   25 |         for(int i=1;i<=n;i++) { cin>>u>>v; nd.id=i; nd.y=v; p[u].push_back(nd); }
      |                                                             ^
a.cc:26:36: error: 'p' was not declared in this scope
   26 |         for(int i=1;i<=n;i++) sort(p[i].begin(),p[i].end());
      |                                    ^
a.cc:28:31: error: 'p' was not declared in this scope
   28 |                 for(int j=0;j<p[i].size();j++) {
      |                               ^
a.cc:30:46: error: 'a2' was not declared in this scope
   30 |                         ans1[id]=i; ans2[id]=a2;
      |                                              ^~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <cmath>
#include <random>
#include <iomanip>
#include <functional>
#include <list>
#include <unordered_map>
#include <sstream>
#include <istream>
#include <iterator>
#include <numeric>
#include <tuple>
using namespace std;

int cnt[100100];
int ans0[100100];
int ans1[100100];

string get_string(int x)
{
	string ans;
	for (int d = 100000; d >= 1; d /= 10)
	{
		ans += to_string(x / d);
		x -= x / d;
	}
	return ans;
}

int main()
{
#ifndef ONLINE_JUDGE
	FILE *stream;
	freopen_s(&stream, "input.txt", "r", stdin);
	// freopen_s(&stream, "output.txt", "w", stdout);
#endif

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

	vector<tuple<int, int, int>> v;
	for (int city_id = 0; city_id < m; city_id++)
	{
		int p, y;
		cin >> p >> y;

		v.push_back({ p, y, city_id });
	}

	sort(v.begin(), v.end());
	for (auto vv : v)
	{
		int p = get<0>(vv);
		int city_id = get<2>(vv);

		cnt[p]++;
		ans0[city_id] = p;
		ans1[city_id] = cnt[p];
	}

	for (int city_id = 0; city_id < m; city_id++)
	{
		cout << get_string(ans0[city_id]) << get_string(ans1[city_id]);
		if (city_id + 1 != m)
			cout << '\n';
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:9: error: 'freopen_s' was not declared in this scope; did you mean 'freopen64'?
   42 |         freopen_s(&stream, "input.txt", "r", stdin);
      |         ^~~~~~~~~
      |         freopen64
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <unordered_map>
#include <numeric>
#include <algorithm>
#define rep(it, ifrom, ito) for (auto it = ifrom; it != ito; ++it)
#define all(a) a.begin(), a.end()

using namespace std;

int main(int argc, char* argv[]) {
    bool debug = argc == 2 && (strcmp(argv[1], "debug") == 0);
    int N, M;
    scanf("%d %d", &N, &M);
    vector<int> Ps, Ys;
    rep(i, 0, M) {
        int tmp0, tmp1;
        scanf("%d %d", &tmp0, &tmp1);
        Ps.push_back(tmp0);
        Ys.push_back(tmp1);
    }

    if (debug) {
        printf("N=%d, M=%d\n", N, M);
        rep(i, 0, M) {
            printf("P[%d]=%d Y[%d]=%d\n", i, Ps[i], Ys[i]);
        }
    }

    unordered_map<int, vector<int>> cities_in_P(N);
    rep(i, 0, M) {
        cities_in_P[Ps[i]].emplace_back(Ys[i]);
    }
    for (auto& item : cities_in_P) {
        sort(all(item.second));
    }

    vector<int> Yorder(M, 0);
    rep(i, 0, M) {
        int count = -1;
        auto& C = cities_in_P[Ps[i]];
        rep(j, 0, C.size()) {
            if (C[j] == Ys[i]) { // unique.
                count = j;
                break;
            }
        }
        Yorder[i] = count;
    }


    rep(i, 0, M) {
        printf("%06d%06d\n", Ps[i], Yorder[i] + 1);
    }


    return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:14:32: error: 'strcmp' was not declared in this scope
   14 |     bool debug = argc == 2 && (strcmp(argv[1], "debug") == 0);
      |                                ^~~~~~
a.cc:8:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <algorithm>
  +++ |+#include <cstring>
    8 | #define rep(it, ifrom, ito) for (auto it = ifrom; it != ito; ++it)
Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <stdio.h>
#include <string.h>
#include <cstdio>
#include <cwchar>
using ll = long long;

//LLONG_MAX
//#define int long long
#define CONTAINS(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v,a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v,a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
using namespace std;

int N, M;

struct St
{
	int Y;
	int P;
	int I;

	bool operator < (const St &st) const
	{
		return (Y < st.Y);
	}
};

vector<St> v;

int cnt[100001];
char ans[20][100001];

signed main()
{
	cin >> N >> M;
	REP(i, M)
	{
		St st;
		cin >> st.P >> st.Y;
		st.I = i;
		v.push_back(st);
	}

	SORT(v);

	for (St& st : v)
	{
		cnt[st.P]++;
		sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
		
	}

	for (int i = 0; i < M; i++)
	{
		cout << ans[i] << endl;
	}
}








Compiler output:
a.cc: In function 'int main()':
a.cc:74:17: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   74 |                 sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
      |                 ^~~~~~~~~
      |                 sprintf
Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <stdio.h>
#include <string.h>
using ll = long long;

//LLONG_MAX
//#define int long long
#define CONTAINS(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v,a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v,a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
using namespace std;

int N, M;

struct St
{
	int Y;
	int P;
	int I;

	bool operator < (const St &st) const
	{
		return (Y < st.Y);
	}
};

vector<St> v;

int cnt[100001];
char ans[20][100001];

signed main()
{
	cin >> N >> M;
	REP(i, M)
	{
		St st;
		cin >> st.P >> st.Y;
		st.I = i;
		v.push_back(st);
	}

	SORT(v);

	for (St& st : v)
	{
		cnt[st.P]++;
		sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
		
	}

	for (int i = 0; i < M; i++)
	{
		cout << ans[i] << endl;
	}
}








Compiler output:
a.cc: In function 'int main()':
a.cc:72:17: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   72 |                 sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
      |                 ^~~~~~~~~
      |                 sprintf
Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <stdio.h>
using ll = long long;

//LLONG_MAX
//#define int long long
#define CONTAINS(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v,a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v,a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
using namespace std;

int N, M;

struct St
{
	int Y;
	int P;
	int I;

	bool operator < (const St &st) const
	{
		return (Y < st.Y);
	}
};

vector<St> v;

int cnt[100001];
char ans[20][100001];

signed main()
{
	cin >> N >> M;
	REP(i, M)
	{
		St st;
		cin >> st.P >> st.Y;
		st.I = i;
		v.push_back(st);
	}

	SORT(v);

	for (St& st : v)
	{
		cnt[st.P]++;
		sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
		
	}

	for (int i = 0; i < M; i++)
	{
		cout << ans[i] << endl;
	}
}








Compiler output:
a.cc: In function 'int main()':
a.cc:71:17: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   71 |                 sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
      |                 ^~~~~~~~~
      |                 sprintf
Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
using ll = long long;

//LLONG_MAX
//#define int long long
#define CONTAINS(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v,a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v,a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
using namespace std;

int N, M;

struct St
{
	int Y;
	int P;
	int I;

	bool operator < (const St &st) const
	{
		return (Y < st.Y);
	}
};

vector<St> v;

int cnt[100001];
char ans[20][100001];

signed main()
{
	cin >> N >> M;
	REP(i, M)
	{
		St st;
		cin >> st.P >> st.Y;
		st.I = i;
		v.push_back(st);
	}

	SORT(v);

	for (St& st : v)
	{
		cnt[st.P]++;
		sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
		
	}

	for (int i = 0; i < M; i++)
	{
		cout << ans[i] << endl;
	}
}








Compiler output:
a.cc: In function 'int main()':
a.cc:70:17: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   70 |                 sprintf_s(ans[st.I], 20, "%06d%06d", st.P, cnt[st.P]);
      |                 ^~~~~~~~~
      |                 sprintf
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector>
#define mp make_pair
using namespace std;

double av(double a){
	if(a<0)return -a;
	return a;
}
int nod(int x){
	if(x<10)return 1;
	return 1+nod(x/10);
}
void psd(int x){
	for(int i = 0;i < 6-nod(x);i ++){
		cout<<0;
	}
	cout<<x;
}
int main(){
	int n, m, y, p;
	vector <pair<int,pair<int,int> > > yp;
	vector <pair<int,int> > op;
	cin>>n>>m;
	vector <int> nocip(n);
	op.resize(m);
	for(int i = 0;i < m;i ++){
		cin>>p>>y;
		yp.push_back(mp(y,mp(p,i)));
	}
	for(int i = 0;i < n;i ++){
		nocip[i]=0;
	}
	sort(yp.begin(),yp.end());
	for(int i = 0;i < yp.size();i ++){
		op[yp[i].second.second].first=yp[i].second.first;
		nocip[yp[i].second.first]++;
		op[yp[i].second.second].second=nocip[yp[i].second.first];
	}
	for(int i = 0;i < m;i ++){
		psd(op[i].first);
		psd(op[i].second);cout<<"\n";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   35 |         sort(yp.begin(),yp.end());
      |         ^~~~
      |         short
Language: C++

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

const int mod = 1e9 + 7;
int main(){
    int h, w, K;
    cin >> h >> w >> K;
    vector<int> c;
    rep(i, 1 << w - 1){
        int flag = 1;
        rep(j, w - 2){
            if ((i >> j & 1) && (i >> j + 1 & 1))
                flag = 0;
        }
        if (flag) c.pb(i);
    }
    vector<vector<ll>> dp(h + 1, vector<ll>(w));
    rep(i, w) dp[0][0] = 1;
    rep(i, h){
        rep(j, w){
            int p = 0;
            int q = 0;
            int r = 0;
            rep(k, c.size()){
                if (j && (c[k] >> j - 1 & 1)) p++;
                else if (j < w - 1 && (c[k] >> j & 1)) q++;
                else r++;
            }
            dp[i + 1][j] = r * dp[i][j];
            if (j) dp[i + 1][j] += p * dp[i][j - 1];
            if (j < w - 1) dp[i + 1][j] += q * dp[i][j + 1];
            dp[i + 1][j] %= mod;
        }
    }
    cout << dp[h][K - 1] << endl;
}

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

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,ll> llP;

ll mod(ll a, ll b){
  ll ret=a%b;
  if(ret<0) ret+=b;
  return ret;
}

ll modpow(ll a,ll b,ll c){
  ll res=1;
  while(b>0){
    if(b&1) res=mod(res*a,c);
    a=mod(a*a,c);
    b>>=1;
  }
  return res;
}

int main() {
  ll MOD=1000000007;
  int h,w,k;
  cin>>h>>w>>k;
  if(w==1){
    cout<<1<<endl;
    return 0;
  }
  ll dp[h+1][w];
  for(int i=0;i<h+1;i++){
    for(int j=0;j<w;j++){
      dp[i][j]=0;
    }
  }
  dp[0][0]=1;
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      for(int k=0;k<(1<<(w-1));k++){
        bool ok=true;
        for(int l=0;l<w-2;l++){
          if(((k>>l)&1) and ((k>>(l+1))&1)){
            ok=false;
          }
        }
        if(ok){
          if(j>=1 and ((k>>(j-1))&1)){
            dp[i+1][j-1]+=dp[i][j];
            dp[i+1][j-1]%=MOD;
          }
          else if(j<=w-2 and ((k>>j)&1){
            dp[i+1][j+1]+=dp[i][j];
            dp[i+1][j+1]%=MOD;
          }
          else{
            dp[i+1][j]+=dp[i][j];
            dp[i+1][j]%=MOD;
          }
        }
      }
    }
  }
  cout<<dp[h][k-1]<<endl;;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:40: error: expected ')' before '{' token
   53 |           else if(j<=w-2 and ((k>>j)&1){
      |                  ~                     ^
      |                                        )
a.cc:61:9: error: expected primary-expression before '}' token
   61 |         }
      |         ^
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,ll> llP;

ll mod(ll a, ll b){
  ll ret=a%b;
  if(ret<0) ret+=b;
  return ret;
}

ll modpow(ll a,ll b,ll c){
  ll res=1;
  while(b>0){
    if(b&1) res=mod(res*a,c);
    a=mod(a*a,c);
    b>>=1;
  }
  return res;
}

int main() {
  ll MOD=1000000007;
  int h,w,k;
  cin>>h>>w>>k;
  if(w==1){
    cout<<1<<endl;
    return 0;
  }
  ll dp[h+1][w];
  for(int i=0;i<h+1;i++){
    for(int j=0;j<w;j++){
      dp[i][j]=0;
    }
  }
  dp[0][0]=1;
  for(int i=1;i<=h+1;i++){
    for(int j=0;j<w;j++){
      if(j==0){
        dp[i][j]=mod(mod(dp[i-1][j]*(w-1),MOD)+mod(dp[i-1][j+1],MOD),MOD);
      }
      if(j==w-1){
        dp[i][j]=mod(mod(dp[i-1][j]*(w-1),MOD)+dp[i-1][j-1],MOD);
      }
      else{
        dp[i][j]=mod(dp[i-1][j-1]+dp[i-1][j+1]+mod(dp[i-1][j]*(w-2),MOD),MOD)
      }
    }
  }
  cout<<dp[h][k-1];
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:78: error: expected ';' before '}' token
   48 |         dp[i][j]=mod(dp[i-1][j-1]+dp[i-1][j+1]+mod(dp[i-1][j]*(w-2),MOD),MOD)
      |                                                                              ^
      |                                                                              ;
   49 |       }
      |       ~
Language: C++

#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <set>
#include <deque>
#include <utility>

long long mod = 1e9+7;
class Mint {
public:
  long long x;
  Mint(){}; // 引数なしでも定義できるように引数なしコンストラクタも用意しておく
  Mint(long long a){
    x = a%mod;
    while(x<0){
      x += mod;
    }
  };
  Mint& operator += (const Mint &a){
    x+=a.x;
    x%=mod;
    return *this;
  }
  Mint& operator -= (const Mint &a){
    x += (mod - a.x);
    x%=mod;
    return *this;
  }
  Mint& operator *= (const Mint &a){
    x*=a.x;
    x%=mod;
    return *this;
  }


  // a^n mod を計算する
  // Useaeg: Mint z = y.pow(y, n);
  Mint pow(Mint a, long long n) const {
    Mint y(1);
    Mint b(a);
    while (n > 0) {
     if (n & 1) y *= b;
      b *= b;
      n >>= 1;
    }
    return y;
  }

  // a^{-1} mod を計算する
  Mint modinv(const Mint &a) const {
    return pow(a, mod-2);
  }

  Mint& operator /= (const Mint &a) {
    x *= modinv(a).x;
    x %= mod;
    return *this;
  }

  Mint operator + (Mint &a) const {
    Mint y(*this);
    y += a;
    return y;
  }

  Mint operator - (Mint &a) const {
    Mint y(*this);
    y -= a;
    return y;
  }

  Mint operator * (Mint &a) const {
    Mint y(*this);
    y *= a;
    return y;
  }

  Mint operator / (Mint &a) const {
    Mint y(*this);
    y/=a;
    return y.x;
  }

  bool operator == (Mint &a) const {
    return x==a.x;
  }

  bool operator != (Mint &a) const {
    return x!=a.x;
  }
};

Mint dp[104][10];
int main(){
  int H, W, K;
  scanf("%d", &H);
  scanf("%d", &W);
  scanf("%d", &K);
  K--;
  dp[0][0].x=1;

  auto check = [&](int k){
    bool is1=false;
    while(k>0){
      if (k%2==0){
	if (is1) return false
	is1 = true;
      } else {
	is1 = false;
      }
      k = k / 2;
    }
    return true;
  }
  
  for (int i=0; i<H; i++){
    for (int k=0; k<(1<<(W-1)); k++){
      if (!check(k)) continue;
      int n = k;
      for (int j=0; j<W-1; j++){
	if (n%2==1){
	  dp[i+1][j+1] += dp[i][j];
	  dp[i+1][j] += dp[i][j+1];
	}
	n = n/2;
      }
    }
  }
  std::cout << dp[H][K].x << std::endl;
  return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:114:30: error: expected ';' before 'is1'
  114 |         if (is1) return false
      |                              ^
      |                              ;
  115 |         is1 = true;
      |         ~~~                   
a.cc: In function 'int main()':
a.cc:124:3: error: expected ',' or ';' before 'for'
  124 |   for (int i=0; i<H; i++){
      |   ^~~
a.cc:124:17: error: 'i' was not declared in this scope
  124 |   for (int i=0; i<H; i++){
      |                 ^
Language: C++

#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#include<cstdint>

#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int,int>;

vector<int>bitSearch(int bit,int n){
    vector<int>S,False(1,-1);
    rep(i,n)if(bit&(1<<i))S.push_back(i);
    return S;
}

template<typename A,size_t N,typename T>
void Fill(A(&array)[N],const T &val){
    fill((T*)array,(T*)(array+N),val);
}

const int MOD = INF+7;
ll dp[105][10];
int main(){
    int h,w,k;cin>>h>>w>>k;
    k--;
    dp[0][0] = 1;
    rep(i,h){
        for(int bit = 0;bit < (1<<w-1);bit++){
          vector<int>S;
            vector<int>S = bitSearch(bit,w-1);
       
            const int len = S.size();
            bool flag = true;
            rep(l,len-1){
                if(S[l+1] == S[l]+1)flag = false;
            }
            if(!flag)continue;
            if(S.empty()){
                rep(jj,w){
                    dp[i+1][jj] = (dp[i+1][jj]+dp[i][jj])%MOD;
                    //dp[i+1][j] %= MOD;
                }
            }
            else {
                rep(j,w){
                    if(j == *lower_bound(ALL(S),j)){                
                        dp[i+1][j+1] = (dp[i+1][j+1]+dp[i][j])%MOD;
                        dp[i+1][j] = (dp[i+1][j]+dp[i][j+1])%MOD;
                        j++;
                        if(j >= w)continue;
                    }
                    else{
                        dp[i+1][j] = (dp[i+1][j]+dp[i][j])%MOD;
                        //dp[i+1][j] %= MOD;
                    }
                }
            }
        }
    }
    //rep(i,h+1){rep(j,w)cout<<dp[i][j]<<" ";cout<<endl;}
    cout<<dp[h][k]<<endl;;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:24: error: redeclaration of 'std::vector<int> S'
   53 |             vector<int>S = bitSearch(bit,w-1);
      |                        ^
a.cc:52:22: note: 'std::vector<int> S' previously declared here
   52 |           vector<int>S;
      |                      ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;
using ll = long long;
const ll MOD = 1000000007;

int main() {
    int h, w, k;
    cin >> h >> w >> k;
    --k;
    vector<vector<ll>> dp(h + 1, vector<ll>(w, 0));
    dp[0][0] = 1;

    for (int i = 0; i < h; ++i) {
        for (int j = 0; j < w; ++j) {
            for (int bit = 0; bit < 1 << (w - 1); ++bit) { // つながっているのかを
                bool ok = true;
                for (int k = 0; k < w - 2; ++k) {  // i, i+1, i+2本目がつながっている場合はfalse
                    if ((bit >> k & 1) && (bit >> (k + 1) & 1)) ok = false; 
                }
                if (!ok) continue;

                int nj = j;  // 次にどのポジションにいるか。
                if ((bit >> j) & 1) nj = j + 1;  // 右側とつながっている場合
                else if (j > 0 && ((bit >> (j - 1)) & 1)) nj = j - 1; // 左側とつながっている場合

                dp[i + 1][nj] += dp[i][j];
                dp[i + 1][nj] %= MOD;
            }
        }
    }
    cout << dp[h][k] << endl;
}C;

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

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

const int mod = 1000000007;

int main()
{
    int h, w, k;
    cin >> h >> w >> k;
    vector<vector<int> > dp(h+1, vector<int>(w,0));
    dp[0][0] = 1;
    for(int i=0; i<h; i++)
    {
        for(int j=0; j<w; j++)
        {
            for(int k=0; k<1<<(w-1); k++)
            {
                bool ok = true;
                for(int l=0;l<w-2;l++)
                {
                    if(((k>>l)&1) && ((k>>(l+1))&1)) ok = false;
                }
                if(ok)
                {
                    if(j >= 1 && ((k>>(j-1))&1))
                    {
                        dp[i+1][j-1] += dp[i][j];
                        dp[i+1][j-1] %= mod;
                    }
                    ekse if(j <=w-2 && ((k>>j)&1))
                    {
                        dp[i+1][j+1] += dp[i][j];
                        dp[i+1][j+1] %= mod; 
                    }
                    else
                    {
                        dp[i+1][j] += dp[i][j];
                        dp[i+1][j] %= mod;
                    }
                }
            }
        }
    }
    cout << dp[h][k-w] << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:21: error: 'ekse' was not declared in this scope
   32 |                     ekse if(j <=w-2 && ((k>>j)&1))
      |                     ^~~~
a.cc:37:21: error: expected '}' before 'else'
   37 |                     else
      |                     ^~~~
a.cc:26:17: note: to match this '{'
   26 |                 {
      |                 ^
a.cc: At global scope:
a.cc:46:5: error: 'cout' does not name a type
   46 |     cout << dp[h][k-w] << endl;
      |     ^~~~
a.cc:47:5: error: expected unqualified-id before 'return'
   47 |     return 0;
      |     ^~~~~~
a.cc:48:1: error: expected declaration before '}' token
   48 | }
      | ^
Language: C++

// https://atcoder.jp/contests/abc113/tasks/abc113_d

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define REP(i,n)   for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); i++)
#define DUMP(a, n) REP(_i, n) printf("%d%c", a[_i], _i + 1 == n ? '\n' : ' ')
#define DUMP2D(a, n, m) REP(_i, n) REP(_j, m) printf("%d%c", a[_i][_j], _j + 1 == m ? '\n' : ' '); puts("")

const int H_MAX = 100;
const int W_MAX = 8;
const int S_MAX = 1 << (W_MAX - 1);
const int MOD = 1000000007;

int H, W, K;

int S;
int lcnt[W_MAX];
int ccnt[W_MAX];
int rcnt[W_MAX];
ll dp[H_MAX + 1][W_MAX];

void init_tbl() {
  S = 1 << (W - 1);
  REP(i, S) {
    bool valid = true;
    REP(j, W - 2) {
      if ((i >> j & 1 > 0) && (i >> (j + 1) & 1 > 0)) {
        // printf("invalid: i=%d j=%d\n", i, j);
        valid = false;
        break;
      }
    }
    if (!valid) continue;
    // printf("i: %d\n", i);
    REP(j, W) {
      if ((j > 0) && (i >> (j - 1) & 1 > 0)) {
        // turn left
        lcnt[j]++;
        // printf("%d : L\n", j);
      } else if ((j < W - 1) && (i >> j & 1 > 0)) {
        // turn right
        rcnt[j]++;
        // printf("%d : R\n", j);
      } else {
        // go straight
        ccnt[j]++;
        // printf("%d : C\n", j);
      }
    }
  }
a
}

void solve() {
  init_tbl();
  dp[0][0] = 1;
  REP(i, H) {
    REP(j, W) {
      if (j > 0) dp[i + 1][j - 1] = (dp[i + 1][j - 1] +(dp[i][j] * lcnt[j] % MOD)) % MOD;
      dp[i + 1][j] = (dp[i + 1][j] + (dp[i][j] * ccnt[j] % MOD)) % MOD;
      if (j < W - 1) dp[i + 1][j + 1] = (dp[i + 1][j + 1] + (dp[i][j] * rcnt[j] % MOD)) % MOD;
    }
  }

  printf("%lld\n", dp[H][K - 1]);
}

void input() {
  scanf("%d%d%d", &H, &W, &K);
}

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


Compiler output:
a.cc: In function 'void init_tbl()':
a.cc:56:1: error: 'a' was not declared in this scope
   56 | a
      | ^
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <utility>
#include <queue>

using namespace std;
typedef long long signed int ll;

constexpr int inf = INT32_MAX / 2;
constexpr int mod = 1000000007;
constexpr int maxn = 100000;

int h, w, k;
ll dp[101][8][8];

int main() {
	cin >> h >> w >> k;
	for (int i = 0; i < pow(2, w - 1); i++) {
		bool f = false;
		for (int j = 0; j < w - 2; j++) {
			if ((i & (1 << j)) && (i & (1 << (j + 1)))) f = true;
		}
		if (f) continue;
		for (int j = 0; j < w; j++) {
			if (i & (1 << j)) {
				dp[1][j][j + 1]++;
			}
			else if ((j > 0) && (i & (1 << (j - 1)))) {
				dp[1][j][j - 1]++;
			}
			else {
				dp[1][j][j]++;
			}
		}
	}
	for (int i = 2; i <= h; i++) {
		for (int s = 0; s < w; s++) {
			for (int t = 0; t < w; t++) {
				for (int u = 0; u < w; u++) {
					dp[i][s][t] = (dp[i][s][t] + dp[i - 1][s][u] * dp[1][u][t]) % mod;
				}
			}
		}
	}
	cout << dp[h][0][k-1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:29: error: 'pow' was not declared in this scope
   28 |         for (int i = 0; i < pow(2, w - 1); i++) {
      |                             ^~~
Language: C

#include<stdio.h>

const int mod = 1000000007;

int main(){
  int H, W, K;
  scanf("%d %d %d", &H, &W, &K);
  
  int num_of_amida[H + 1][W];
  for(int i = 0; i <= H; i++) for(int j = 0; j < W; j++) num_of_amida[i][j] = 0;
  num_of_amida[0][0] = 1;
  
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      for(int b = 0; b < (1 << (W - 1)); b++){
        int valid = 1;
        for(int l = 0; l < W - 2; l++){
          if((b & (1 << l)) && (b & (1 << (l + 1)))){
            valid = 0;
            break;
          }
        }
        if(!valid) continue;
        
        if(j > 0 && (b & (1 << (j - 1)))){
          (num_of_amida[i + 1][j - 1] += num_of_amida[i][j]) %= mod;
        }else if(j < W - 1 && (b & (1 << j))){
          (num_of_amida[i + 1][j + 1] += num_of_amida[i][j]) %= mod;
        }else{
          (num_of_amida[i + 1][j] += num_of_amida[i][j]) %= mod;
        }
      }
    }
  }
  
  printf("%d", num_of_amida[H][K - 1]);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:62: error: lvalue required as left operand of assignment
   26 |           (num_of_amida[i + 1][j - 1] += num_of_amida[i][j]) %= mod;
      |                                                              ^~
main.c:28:62: error: lvalue required as left operand of assignment
   28 |           (num_of_amida[i + 1][j + 1] += num_of_amida[i][j]) %= mod;
      |                                                              ^~
main.c:30:58: error: lvalue required as left operand of assignment
   30 |           (num_of_amida[i + 1][j] += num_of_amida[i][j]) %= mod;
      |                                                          ^~
Language: C++

#include <iostream>
#include <string>
#include <map>
#include <queue>
#include <algorithm>
#include <vector>
#include <math.h>
#include <bitset>
#include <cmath>
#include <set>
#include <queue>
#include <stack>

typedef long long ll;
#define rep(i,s,n)for(ll i = s;i<n;i++)
#define repe(i,s,n)for(ll i = s;i<=n;i++)
#define rep_r(i,s,n)for(ll i = n;i>s;i--)
#define rep_re(i,s,n)for(ll i = n;i>=s;i--)
using namespace std;
static const ll MOD = 1e9 + 7;
static const ll INF = 1e25;
static const ll MAX_N = 100001;

ll H, W, K;
ll dp[101][8];
//---------------------------------------------------------------------------------------------------
ll check(ll msk) {
	rep(i, 0, W - 2) {
		ll a = (msk >> i) & 1;
		ll b = (msk >> (i + 1)) & 1;
		if (a and b) return 0;
	}
	return 1;
}
//---------------------------------------------------------------------------------------------------
ll main() {
	cin >> H >> W >> K;
	K--;

	dp[0][0] = 1;
	rep(h, 0, H) rep(k, 0, W) rep(msk, 0, 1 << (W - 1)) if (check(msk)) {
		if (msk & (1 << k)) dp[h + 1][k + 1] += dp[h][k];
		else if (0 < k and msk & (1 << (k - 1))) dp[h + 1][k - 1] += dp[h][k];
		else dp[h + 1][k] += dp[h][k];
	}

	cout << dp[H][K] << endl;
	return 0;
}

Compiler output:
a.cc:21:23: warning: overflow in conversion from 'double' to 'll' {aka 'long long int'} changes value from '1.0000000000000001e+25' to '9223372036854775807' [-Woverflow]
   21 | static const ll INF = 1e25;
      |                       ^~~~
a.cc:36:1: error: '::main' must return 'int'
   36 | ll main() {
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
#define rep(i,n) for (ll i=0;i<n;++i)
#define rep2(i,a,b) for (ll i=a;i<b;++i)
const ll MOD=1000000007;
string alp="abcdefghijklmnopqrstuvwxyz";

vector<vector<ll>> dp(H+1,vector<ll>(W,0));

int main(){
    int H,W,K;
    cin >> H >> W >> K;
    vector<vector<vector<ll>>> pos1(W,vector<vector<ll>>(W,vector<ll>(W,0)));
    vector<vector<vector<ll>>> pos2(W,vector<vector<ll>>(W,vector<ll>(W,0)));
    rep(i,W){
        rep(j,W){
            pos2[i][j][0]=1;
            if (i==0&&j==0){
                pos1[i][j][0]=1;
                pos2[i][j][0]=0;
            }
            rep(k,W-1){
                if (k+1==i||k+1==j){
                    if (i==j){
                        pos1[i][j][k+1]=0;
                        pos2[i][j][k+1]=(pos1[i][j][k]+pos2[i][j][k])%MOD;
                        if (k+2<=W-1){
                            pos1[i][j][k+2]=0;
                            pos2[i][j][k+2]=pos2[i][j][k+1];
                            k++;
                        }
                    }
                    else if ((i==0&&j==1)||(i==1&&j==0)){
                        pos1[i][j][k+1]=1;
                        pos2[i][j][k+1]=0;
                    }
                    else {
                        pos1[i][j][k+1]=0;
                        pos2[i][j][k+1]=(pos1[i][j][k]+pos2[i][j][k])%MOD;
                        pos1[i][j][k+2]=pos2[i][j][k+1];
                        pos2[i][j][k+2]=0;
                        k++;
                    }
                }
                else {
                    pos1[i][j][k+1]=pos2[i][j][k];
                    pos2[i][j][k+1]=(pos1[i][j][k]+pos2[i][j][k])%MOD;
                }
            }
        }
    }
    dp[0][0]=1;
    rep(i,H){
        rep(j,W){
            dp[i+1][j]+=dp[i][j]*(pos1[j][j][W-1]+pos2[j][j][W-1]);
            if (j>0){
                dp[i+1][j]+=dp[i][j-1]*(pos1[j-1][j][W-1]+pos2[j-1][j][W-1]);
            }
            if (j<W-1){
                dp[i+1][j]+=dp[i][j+1]*(pos1[j+1][j][W-1]+pos2[j+1][j][W-1]);
            }
            dp[i+1][j]%=MOD;
        }
    }
    cout << dp[H][K-1] << endl;
}

Compiler output:
a.cc:11:23: error: 'H' was not declared in this scope
   11 | vector<vector<ll>> dp(H+1,vector<ll>(W,0));
      |                       ^
a.cc:11:38: error: 'W' was not declared in this scope
   11 | vector<vector<ll>> dp(H+1,vector<ll>(W,0));
      |                                      ^