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

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

int n={},k={};
string integer[11]={};
vector<string>num={};
int chousen[11]={};
string complete_integer[10000]={};
string answer={};
int integer_count=0;


void operation(){
    for(int i=1;i<=n;i++){
        if (chousen[i]==0){
            
            chousen[i]=1;
            num.push_back(integer[i]);
        
            if(num.size()==k){
                for(int i=1;i<=k;i++){
                    answer+=num[i-1];
                }
                for(int i=1;i<=integer_count;i++){
                    if(answer==complete_integer[i]){
                        goto none;
                    }
                }
                integer_count+=1;
                complete_integer[integer_count]=answer;

                none:;
                answer={};
            }else{
                operation();
            }
            num.pop_back();
            chousen[i]=0;
        }
        
    }

}

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

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

int main(){
    int n,k;
    while(1){
        cin>>n>>k;
        string S[11];
        if(n==0&&k==0) break;
        for(int i=0; i<n; i++) cin>>S[i];
        sort(S,S+n);
        set<string> SS;
        do{
            string str;
            for(int i=0; i<k; i++) str+=S[i];
            SS.insert(str);
        }while(next_permutation(S, S+n));
        cout<<SS.size()<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |         sort(S,S+n);
      |         ^~~~
      |         short
a.cc:19:16: error: 'next_permutation' was not declared in this scope
   19 |         }while(next_permutation(S, S+n));
      |                ^~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<set>

using namespace std;

int main(){
  int n,k;
  while(scanf("%d%d",&n,&k),n+k){
    int card[n];
    set<int> s;
    for(int i=0; i<n; i++)
      scanf("%d",&card[i]);
    vector<int> v(n);
    for(int i=0; i<k; i++)
      v[n-k+i] = i+1;
    do{
      int a[k];
      for(int i=0; i<n; i++){
	if(card[i]!=0)
	  a[v[i]-1]=card[i];
      }
      int nn = 0;
      for(int i=0; i<k; i++){
	int tmp = a[i];
	int keta = 1;
	while(tmp!=0){
	  keta*=10;
	  tmp/=10;
	}
	nn*=keta;
	nn+=a[i];
      }
      s.insert(nn);
    }while(next_permutation(v.begin(), v.end()));
    cout << s.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:12: error: 'next_permutation' was not declared in this scope
   35 |     }while(next_permutation(v.begin(), v.end()));
      |            ^~~~~~~~~~~~~~~~
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
#include<sstream>
#include<cstdlib>

using namespace std;

int main(){
	while(1){
		int n,k;
		scanf("%d%d",&n,&k);
		
		if(n==0)
			break;
		
		vector<int> card(n);
		for(int i=0;i<n;i++){
			scanf("%d",&card[i]);
		}
		
		sort(card.begin(),card.end());
		
		vector<int> data;
		do{
			
			stringstream sst;
			for(int i=0;i<k;i++){
				sst<<card[i];
			}
			data.push_back(atoi(sst.str().begin()));
			
			
			reverse( card.begin()+k,card.end());
		}while( next_permutation(card.begin(),card.end()) );
		
		sort(data.begin(),data.end());
		
		
		printf("%d\n",distance(data.begin(),unique(data.begin(),data.end())) );
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:60: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'const char*'
   31 |                         data.push_back(atoi(sst.str().begin()));
      |                                             ~~~~~~~~~~~~~~~^~
      |                                                            |
      |                                                            std::__cxx11::basic_string<char>::iterator
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/bits/stl_algo.h:71,
                 from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<cstdlib>
#include<set>

using namespace std;

int arr[10];
int sub[10];
int n,k;
int now = 0;
int cont;
int c = 0;

set<int> visit2;

void saiki(int[],int);

int main()
{
	for(;;)
	{
		visit2.clear();
		int i;
		c = 0;
		now = 0;
		
		scanf("%d",&n);
		scanf("%d",&k);
		if(n == 0 && k == 0){
			break;
		}
		
		for(i = 0; i < n; i++){
			scanf("%d",&arr[i]);
		}
		for(i = 0; i < n; i++){
			sub[0] = arr[i];
	//		printf("\næªJ[hF%d\n",arr[i]);
			saiki(sub,1);
			now++;
		}
		cout <<visit2.size()-c << endl;
	}
}

void saiki(int temp[], int kk)
{
	//k:TõK
	int used[50] = {0};
	int i;
	int t = 0;
	char str[256] = "";
	
	for(i = 0; i < kk; i++){
		sprintf(str+strlen(str),"%d",temp[i]);
	}
	
	t = atoi(str);
	
	if(kk == k){
		
		visit2.insert(t);
		return;
	}
	else{ 
		int j;
		
//		cout << "*t = " << t << endl;
		
		for(i = 0; i < kk; i++){
			for(j = 0; j < n; ++j ){     
				if( used[j] == 0 && arr[j] == temp[i] ){
//					printf("J[h%dÍgpÏÝ\n",arr[j]);
					used[j] = 1;
					break;
				}
			}
		}
		
		for(i = 0; i < n; i++){
			if(used[i] == 0){
				temp[kk] = arr[i];
				used[i] = 1;
				saiki(temp, kk+1);
				used[i] = 0;
			}
		}
	}
}
			

Compiler output:
a.cc: In function 'void saiki(int*, int)':
a.cc:57:29: error: 'strlen' was not declared in this scope
   57 |                 sprintf(str+strlen(str),"%d",temp[i]);
      |                             ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include<set>
  +++ |+#include <cstring>
    6 |
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<set>
#include<ctype.h>
#include<cstdlib>

using namespace std;

int arr[10];
int sub[10];
int n,k;
int now = 0;
int cont;
int c = 0;

set<int> visit2;

void saiki(int[],int);

int main()
{
	for(;;)
	{
		visit2.clear();
		int i;
		c = 0;
		now = 0;
		
		scanf("%d",&n);
		scanf("%d",&k);
		if(n == 0 && k == 0){
			break;
		}
		
		for(i = 0; i < n; i++){
			scanf("%d",&arr[i]);
		}
		for(i = 0; i < n; i++){
			sub[0] = arr[i];
			saiki(sub,1);
			now++;
		}
		cout <<visit2.size()-c << endl;
	}
}

void saiki(int temp[], int kk)
{
	//k:TõK
	int used[50] = {0};
	int i,j;
	int t = 0;
	char str[256] = "";
	
	for(i = 0; i < kk; i++){
		sprintf(str+strlen(str),"%d",temp[i]);
	}
	
	t = atoi(str);
	
	if(kk == k){
		visit2.insert(t);
		return;
	}
	else{
		for(i = 0; i < kk; i++){
			for(j = 0; j < n; ++j ){     
				if( used[j] == 0 && arr[j] == temp[i] ){
					used[j] = 1;
					break;
				}
			}
		}
		
		for(i = 0; i < n; i++){
			if(used[i] == 0){
				temp[kk] = arr[i];
				used[i] = 1;
				saiki(temp, kk+1);
				used[i] = 0;
			}
		}
	}
}
			

Compiler output:
a.cc: In function 'void saiki(int*, int)':
a.cc:57:29: error: 'strlen' was not declared in this scope
   57 |                 sprintf(str+strlen(str),"%d",temp[i]);
      |                             ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include<cstdlib>
  +++ |+#include <cstring>
    7 |
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <set>
using namespace std;
typedef vector<int> comb;

int s_to_i(string s){
	bool flag = false;
	int n = 0;

	for(unsigned int i=0 ; i < s.size() ; ++i ){
		if( i == 0 && s[i] == '-' ){
			flag = true;
		}else if( s[i] >= '0' && s[i] <= '9' ){
			n *= 10;
			n += s[i] - '0';
		}else{
			break;
		}
	}
	return (flag)? -n : n ;
}

string i_to_s(int n){
	bool flag = false;
	string s;
	if( n < 0 ){
		flag = true;
		n *= -1;
	}
	do{
		s.push_back( (n%10)+'0' );
		n /= 10;
	}while( n != 0 );

	reverse( s.begin() , s.end() );
	if( flag ) s.insert( s.begin() , 1 , '-' );

	return s;
}

inline int first(int n){
	return ((1 << n) - 1);
}

inline int nextSet(int x){
	int small, ripple, newSmall,ones;
	
	small = x & -x;
	ripple = x + small;
	newSmall = ripple & -ripple;
	ones = (( newSmall / small ) >> 1) - 1;
	
	return ( ripple | ones );
}

comb setComb(int s, int n, comb a){
	comb c;
	for(int i=0 ; i<n ; i++){
		if( s & 1 ) c.push_back( a[i] );
		s >>= 1;
	}
	return c;
}

int main(){
	int n, k, x, s;
	comb c;
	
	while( cin >> n >> k , n || k ){
		vector<int> a;
		set<int> ans;
		
		for(int i=0 ; i<n ; i++ ){
			cin >> s;
			a.push_back( s );
		}
		
		x = first(k);
		while( !(x & ~first(n) ) ){
			c = setComb( x , n , a );
			
			do{
				string s = "";
				for(int i=0 ; i < (int)c.size() ; i++ ){
					s += i_to_s( c[i] );
				}
				int num = s_to_i(s);
				
				//if( !count(ans.begin(),ans.end(),num) )
					//ans.push_back( num );
				ans.insert( num );
    		}while( next_permutation( c.begin() , c.end() ) );
			
			x = nextSet( x );
		}
		cout << "ans : ";
		cout << ans.size() << endl;
	}
}

Compiler output:
a.cc: In function 'std::string i_to_s(int)':
a.cc:38:9: error: 'reverse' was not declared in this scope
   38 |         reverse( s.begin() , s.end() );
      |         ^~~~~~~
a.cc: In function 'int main()':
a.cc:95:25: error: 'next_permutation' was not declared in this scope
   95 |                 }while( next_permutation( c.begin() , c.end() ) );
      |                         ^~~~~~~~~~~~~~~~
Language: C++

#include <cstdio>
#include <algorithm>
#include <set>
#include <string>
using namespace std;

int N, K;
set<int> result;
int card[16];
bool used[16];

void solve(int k, int ans) {
	if(k == K) {
		result.insert(ans);
		return;
	}
	for(int i = 0; i < N; i++) {
		if(used[i] == true) continue;
		used[i] = true;
		int t = card[i];
		int next;
		if(t < 10) {
			next = ans * 10;
		} else {
			next = ans * 100;
		}
		next += t;
		solve(k + 1, next);
		used[i] = false;
	}
}

int main() {
	for(;;) {
		result.clear();
		memset(used, 0, sizeof used);

		scanf("%d %d", &N, &K);
		if(N == 0 && K == 0)
			break;

		for(int i = 0; i < N; i++) {
			scanf(" %d", &card[i]);
		}

		solve(0, 0);
		printf("%d\n", result.size());
	}
	return 0;
}

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

#include <cstdio>
#include <set>
using namespace std;

int N, K;
set<int> result;
int card[16];
bool used[16];

void solve(int k, int ans) {
	if(k == K) {
		result.insert(ans);
		return;
	}
	for(int i = 0; i < N; i++) {
		if(used[i] == true) continue;
		used[i] = true;
		int t = card[i];
		int next;
		if(t < 10) {
			next = ans * 10;
		} else {
			next = ans * 100;
		}
		next += t;
		solve(k + 1, next);
		used[i] = false;
	}
}

int main() {
	for(;;) {
		result.clear();
		memset(used, 0, sizeof used);

		scanf("%d %d", &N, &K);
		if(N == 0 && K == 0)
			break;

		for(int i = 0; i < N; i++) {
			scanf(" %d", &card[i]);
		}

		solve(0, 0);
		printf("%d\n", result.size());
	}
	return 0;
}

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

#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

int count(int n)
{
int ret = 1;
for(int mul = 10; mul <= n; mul *= 10) ++ret; 
return ret;
}

void add(int k, int sum, vector<int> &c, vector<int> &result)
{
if(k == 0) {
result.push_back(sum);
return;
}
for(int i = pos + 1; i < c.size(); ++i) {
if(c[i] == 0)
continue;
int tmp = c[i];
c[i] = 0;
add(k - 1, sum * count(tmp) + tmp, c, result);
c[i] = tmp;
}
return;
}

int main()
{
while(true) {
int n, k;
vector<int> c;
vector<int> result;
scanf("%d%d", &n, &k);
if(n == 0)
break;
c.resize(n);
for(int i = 0; i < n; ++i) 
scanf("%d", &c[i]);
count(k, 0, c, result);
sort(result.begin(), result.end());
result.remove(unique(result.begin(), result.end()), result.end());
printf("%d\n", result.size());
}
return 0;
}

Compiler output:
a.cc: In function 'void add(int, int, std::vector<int>&, std::vector<int>&)':
a.cc:19:13: error: 'pos' was not declared in this scope
   19 | for(int i = pos + 1; i < c.size(); ++i) {
      |             ^~~
a.cc: In function 'int main()':
a.cc:42:6: error: no matching function for call to 'count(int&, int, std::vector<int>&, std::vector<int>&)'
   42 | count(k, 0, c, result);
      | ~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: candidate: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:   candidate expects 3 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note:   template argument deduction/substitution failed:
a.cc:42:6: note:   deduced conflicting types for parameter '_ForwardIterator' ('int' and 'std::vector<int>')
   42 | count(k, 0, c, result);
      | ~~~~~^~~~~~~~~~~~~~~~~
a.cc:6:5: note: candidate: 'int count(int)'
    6 | int count(int n)
      |     ^~~~~
a.cc:6:5: note:   candidate expects 1 argument, 4 provided
a.cc:44:8: error: 'class std::vector<int>' has no member named 'remove'
   44 | result.remove(unique(result.begin(), result.end()), result.end());
      |        ^~~~~~
Language: C++

#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

int count(int n)
{
int ret = 1;
for(int mul = 10; mul <= n; mul *= 10) ++ret; 
return ret;
}

void add(int k, int sum, vector<int> &c, vector<int> &result)
{
if(k == 0) {
result.push_back(sum);
return;
}
for(int i = 0; i < c.size(); ++i) {
if(c[i] == 0)
continue;
int tmp = c[i];
c[i] = 0;
add(k - 1, sum * count(tmp) + tmp, c, result);
c[i] = tmp;
}
return;
}

int main()
{
while(true) {
int n, k;
vector<int> c;
vector<int> result;
scanf("%d%d", &n, &k);
if(n == 0)
break;
c.resize(n);
for(int i = 0; i < n; ++i) 
scanf("%d", &c[i]);
count(k, 0, c, result);
sort(result.begin(), result.end());
result.remove(unique(result.begin(), result.end()), result.end());
printf("%d\n", result.size());
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:6: error: no matching function for call to 'count(int&, int, std::vector<int>&, std::vector<int>&)'
   42 | count(k, 0, c, result);
      | ~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: candidate: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:   candidate expects 3 arguments, 4 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note:   template argument deduction/substitution failed:
a.cc:42:6: note:   deduced conflicting types for parameter '_ForwardIterator' ('int' and 'std::vector<int>')
   42 | count(k, 0, c, result);
      | ~~~~~^~~~~~~~~~~~~~~~~
a.cc:6:5: note: candidate: 'int count(int)'
    6 | int count(int n)
      |     ^~~~~
a.cc:6:5: note:   candidate expects 1 argument, 4 provided
a.cc:44:8: error: 'class std::vector<int>' has no member named 'remove'
   44 | result.remove(unique(result.begin(), result.end()), result.end());
      |        ^~~~~~
Language: C++

#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

int count(int n)
{
int ret = 1;
for(int mul = 10; mul <= n; mul *= 10) ++ret; 
return ret;
}

void add(int k, int sum, vector<int> &c, vector<int> &result)
{
if(k == 0) {
result.push_back(sum);
return;
}
for(int i = 0; i < c.size(); ++i) {
if(c[i] == 0)
continue;
int tmp = c[i];
c[i] = 0;
add(k - 1, sum * count(tmp) + tmp, c, result);
c[i] = tmp;
}
return;
}

int main()
{
while(true) {
int n, k;
vector<int> c;
vector<int> result;
scanf("%d%d", &n, &k);
if(n == 0)
break;
c.resize(n);
for(int i = 0; i < n; ++i) 
scanf("%d", &c[i]);
add(k, 0, c, result);
sort(result.begin(), result.end());
result.remove(unique(result.begin(), result.end()), result.end());
printf("%d\n", result.size());
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:8: error: 'class std::vector<int>' has no member named 'remove'
   44 | result.remove(unique(result.begin(), result.end()), result.end());
      |        ^~~~~~
Language: C++

#include<cstdio>
#include<set>

using namespace std;

set<int> se;

int N,K;

int card[10];
bool used[10];

void rec(int num,int k)
{
	if(k==K)
	{
		se.insert(num);
		return;
	}
	for(int i=0;i<N;i++)
	{
		if(used[i]==true) continue;
		used[i]=true;
		int nnum;
		if(card[i]<10) nnum=num*10+card[i];
		else nnum=num*100+card[i];
		rec(nnum,k+1);
		used[i]=false;
	}
}

int main()
{
	scanf("%d%d",&N,&K);
	for(int i=0;i<N;i++)
	{
		scanf("%d",card+i);
	}
	memset(used,false,sizeof(used));
	rec(0,0);
	printf("%d\n",se.size());
	return 0;
}

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

#include "stdio.h"
#include <vector>
#include <queue>
#include <set>

using namespace std;

int x[10];

int main()
{
while(1)
{
int n,k;
scanf("%d",&n);
scanf("%d",&k);
if(n == 0 && k == 0)
{
break;
}
for(int i = 0; i < n; i++)
{
scanf("%d",&x[i]);
}

int w = 1;
for(int i = 0; i < k; i++)
{
w *= n;
}

set<int> sw;
for(int i = 0; i < w; i++)
{
priority_queue<int> q1;
vector<int> q2;
int s = i;
for(int i = 0; i < k; i++)
{
int l = s % n;
q1.push(l);
q2.push_back(l);
s /= n;
}

int flgw = 0;
int mae = -1;
for(int ii = 0; ii < k; ii++)
{
if(mae == q1.top())
{
flgw = 1;
break;
}
mae = q1.top();
q1.pop();
}
if(flgw == 1)
{
continue;
}

int g = 0;
for(int ii = 0; ii < k; ii++)
{
if(x[q2[ii]] < 10)
{
g = g * 10 + x[q2[ii]];
}
else
{
g = g * 100 + x[q2[ii]];
}
}
sw.insert(g);
}

printf("%d\n",sw.size());
{
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:81:2: error: expected '}' at end of input
   81 | }
      |  ^
a.cc:13:1: note: to match this '{'
   13 | {
      | ^
a.cc:81:2: error: expected '}' at end of input
   81 | }
      |  ^
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
Language: C

#include<stdio.h>int main(void){
int i,j,w,h,a[101][101][2];
while(scanf("%d%d",&w,&h),w+h){
h++;w++;
for(i=0;i<h;i++){
for(j=0;j<w;j++){
if(i==1||j==1){
a[i][j][0]=1;
a[i][j][1]=1;
}else{
a[i][j][0]=0;
a[i][j][1]=0;
}
}
}

for(i=2;i<h;i++){
for(j=2;j<w;j++){
a[i][j][0]=a[i-2][j][1]+a[i][j-2][0]+a[i-2][j-1][1];
a[i][j][1]=a[i-2][j][1]+a[i][j-2][0]+a[i-1][j-2][0];
a[i][j][0]%=100000;
a[i][j][1]%=100000;
}
}
printf("%d/n",(a[i][j-1][0]+a[i-1][j][1])%100000);
}

return 0;}

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>int main(void){
      |                  ^~~
main.c:3:1: error: expected identifier or '(' before 'while'
    3 | while(scanf("%d%d",&w,&h),w+h){
      | ^~~~~
main.c:28:1: error: expected identifier or '(' before 'return'
   28 | return 0;}
      | ^~~~~~
main.c:28:10: error: expected identifier or '(' before '}' token
   28 | return 0;}
      |          ^
Language: C++

#include<iostream>
using namespace std;

#define MOD 100000;

int main(){
	int x[101][101][2][2];
	int h,w,sum;
	while(true){
		memset(x,0,sizeof(x));
		for(int i=1;i<=100;i++){
			x[i][1][0][0]=1;
		}
		for(int i=1;i<=100;i++){
			x[1][i][1][0]=1;
		}
		cin>>h>>w;
		if(h==0 && w==0){
			break;
		}
		for(int i=2;i<=h;i++){
			for(int j=2;j<=w;j++){
				x[i][j][0][0]=(x[i-1][j][0][0]+x[i-1][j][0][1])%MOD;
				x[i][j][0][1]=x[i-1][j][1][0]%MOD;
				x[i][j][1][0]=(x[i][j-1][1][0]+x[i][j-1][1][1])%MOD;
				x[i][j][1][1]=x[i][j-1][0][0]%MOD;
			}
		}
		sum=(x[h][w][0][0]+x[h][w][0][1]+x[h][w][1][0]+x[h][w][1][1])%MOD;
		cout<<sum<<endl;
	}
	return 0;
}

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

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

const int mod = 100000;

int main(){
  int w,h;
  while(cin >> w >> h, w){
    int dp[100][100][2] = {};

    dp[0][0][0] = dp[0][0][1] = 1;
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
        if(i>0) dp[i][j][0] += dp[i-1][j][0]) %= mod;
        if(i>1) dp[i][j][0] += dp[i-2][j][1]) %= mod;
        if(j>0) dp[i][j][1] += dp[i][j-1][1]) %= mod;
        if(j>1) dp[i][j][1] += dp[i][j-2][0]) %= mod;
      }
    }
    cout << (dp[h-1][w-1][0] + dp[h-1][w-1][0])%mod << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:45: error: expected ';' before ')' token
   14 |         if(i>0) dp[i][j][0] += dp[i-1][j][0]) %= mod;
      |                                             ^
      |                                             ;
a.cc:15:45: error: expected ';' before ')' token
   15 |         if(i>1) dp[i][j][0] += dp[i-2][j][1]) %= mod;
      |                                             ^
      |                                             ;
a.cc:16:45: error: expected ';' before ')' token
   16 |         if(j>0) dp[i][j][1] += dp[i][j-1][1]) %= mod;
      |                                             ^
      |                                             ;
a.cc:17:45: error: expected ';' before ')' token
   17 |         if(j>1) dp[i][j][1] += dp[i][j-2][0]) %= mod;
      |                                             ^
      |                                             ;
Language: C++

# include <iostream>
# include <string>

constexpr int MAX_W = 100;
constexpr int MAX_H = 100;
constexpr int MOD = 100000;

int h, w;
int dp[MAX_H][MAX_W][4];

int main() {
	while (1) {
		std::cin >> w >> h;
		if (w + h == 0)
			break;
		std::memset(dp, 0, sizeof(dp));
		for (int i = 1; i < w; ++i)
			dp[0][i][0] = 1;
		for (int i = 1; i < h; ++i)
			dp[i][0][4] = 1;
		dp[1][1][2] = 1;
		dp[1][1][1] = 1;
		for (int i = 2; i < w; ++i) {
			dp[1][i][0] = 1;
			dp[1][i][2] = 1;
		}
		for (int i = 2; i < h; ++i) {
			dp[i][1][1] = 1;
			dp[i][1][3] = 1;
		}
		for (int i = 2; i < h; ++i) {
			for (int j = 2; j < w; ++j) {
				for (int k = 0; k < 4; ++k) {
					dp[i][j][0] += dp[i][j - 2][k];
					dp[i][j][0] %= MOD;
					dp[i][j][3] += dp[i - 2][j][k];
					dp[i][j][3] %= MOD;
				}
				dp[i][j][1] = dp[i - 1][j - 1][2] + dp[i - 1][j - 1][3];
				dp[i][j][1] %= MOD;
				dp[i][j][2] = dp[i - 1][j - 1][0] + dp[i - 1][j - 1][1];
				dp[i][j][2] %= MOD;
			}
		}
		int ans = 0;
		for (int i = 0; i < 4; ++i) {
			ans += dp[h - 1][w - 1][i];
			ans %= MOD;
		}
		std::cout << ans << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
   16 |                 std::memset(dp, 0, sizeof(dp));
      |                      ^~~~~~
      |                      wmemset
Language: C++

#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <algorithm>
using namespace std;

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

typedef long long ll;

#define mod 100000

int dp[100][100][4]={};
// 0:rr 1:ru 2:ur 3:uu

int main(void) {
    int n,m;
    while(cin >> n >> m && n>0)
    REP(i,n){
        dp[i][0][0]=1;
    }
    REP(i,m){
        dp[0][i][3]=1;
    }
    FOR(i,1,n-1){
        FOR(j,1,m-1){
            dp[i][j][0]=dp[i-1][j][0]+dp[i-1][j][2];
            dp[i][j][3]=dp[i][j-1][1]+dp[i][j-1][3];
            dp[i][j][1]=dp[i][j-1][0];
            dp[i][j][2]=dp[i-1][j][3];
            REP(k,4){
                dp[i][j][k]%=mod;
            }
        }
    }
    
    int ans=0;
    REP(i,4){
        ans = ans+dp[n-1][m-1][i];
    }
    ans %= mod;
    
    cout << ans << endl;
}

    return 0;
}

Compiler output:
a.cc:53:5: error: expected unqualified-id before 'return'
   53 |     return 0;
      |     ^~~~~~
a.cc:54:1: error: expected declaration before '}' token
   54 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<algorithm>
using namespace std;
int a[101][101][3][3];//??????,??????,???????????????,?????????????????????0???1
int main(){
	int h,w;
	while(1){
		scanf("%d%d",&w,&h);
		if(w==0&&h==0)break;
		memset(a,0,sizeof(a));
		for(int i=1;i<101;i++){
			a[1][i][0][0]=1;
			a[i][1][1][1]=1;
		}
		for(int i=2;i<101;i++){
			for(int j=2;j<101;j++){
				a[i][j][0][0]=(a[i][j-2][0][0]+a[i][j-2][1][0]+a[i][j-2][1][1])%100000;
				a[i][j][1][0]=(a[i-1][j-1][0][1]+a[i-1][j-1][1][1])%100000;
				a[i][j][0][1]=(a[i-1][j-1][0][0]+a[i-1][j-1][1][0])%100000;
				a[i][j][1][1]=(a[i-2][j][0][0]+a[i-2][j][0][1]+a[i-2][j][1][1])%100000;
			}
		}
		
		cout<<(a[w][h][0][0]+a[w][h][0][1]+a[w][h][1][0]+a[w][h][1][1])%100000<<endl;
	}	
}

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

#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<algorithm>
using namespace std;
int a[101][101][3][3];
int main(){
	int h,w;
	while(1){
		scanf("%d%d",&w,&h);
		if(w==0&&h==0)break;
		memset(a,0,sizeof(a));
		for(int i=1;i<101;i++){
			a[1][i][0][0]=1;
			a[i][1][1][1]=1;
		}
		for(int i=2;i<101;i++){
			for(int j=2;j<101;j++){
				a[i][j][0][0]=(a[i][j-2][0][0]+a[i][j-2][1][0]+a[i][j-2][1][1])%100000;
				a[i][j][1][0]=(a[i-1][j-1][0][1]+a[i-1][j-1][1][1])%100000;
				a[i][j][0][1]=(a[i-1][j-1][0][0]+a[i-1][j-1][1][0])%100000;
				a[i][j][1][1]=(a[i-2][j][0][0]+a[i-2][j][0][1]+a[i-2][j][1][1])%100000;
			}
		}
		
		cout<<(a[w][h][0][0]+a[w][h][0][1]+a[w][h][1][0]+a[w][h][1][1])%100000<<endl;
	}	
}

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

#include<cstdio>
#define rep(i,a) for(i=0;i<a;i++)
int MOD=100000,i;
int main(){
    int n,m;
    while(scanf("%d%d",&n,&m),n){
        int dp[110][110][2]={0};
        dp[1][0][0]=dp[0][1][1]=1;
        rep(i,n)rep(j,m)rep(k,2){
			dp[i+1+k][j][0]=(dp[i+1+k][j][0]+dp[i][j][k])%MOD;
			dp[i][j+1+(1^k)][1]=(dp[i][j+1+(1^k)][1]+dp[i][j][k])%MOD;
        }
		printf("%d\n",(dp[n][m-1][0]+dp[n-1][m][1])%MOD);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'j' was not declared in this scope
    9 |         rep(i,n)rep(j,m)rep(k,2){
      |                     ^
a.cc:2:22: note: in definition of macro 'rep'
    2 | #define rep(i,a) for(i=0;i<a;i++)
      |                      ^
a.cc:9:29: error: 'k' was not declared in this scope
    9 |         rep(i,n)rep(j,m)rep(k,2){
      |                             ^
a.cc:2:22: note: in definition of macro 'rep'
    2 | #define rep(i,a) for(i=0;i<a;i++)
      |                      ^
Language: C++

#define rep(i,a) for(i=0;i<a;i++)
MOD=100000,i,j,k,n,m;
int main(){
    while(scanf("%d%d",&n,&m),n){
        int dp[110][110][2]={0};
        dp[1][0][0]=dp[0][1][1]=1;
        rep(i,n)rep(j,m)rep(k,2){
			dp[i+1+k][j][0]=(dp[i+1+k][j][0]+dp[i][j][k])%MOD;
			dp[i][j+1+(1^k)][1]=(dp[i][j+1+(1^k)][1]+dp[i][j][k])%MOD;
        }
		printf("%d\n",(dp[n][m-1][0]+dp[n-1][m][1])%MOD);
    }
}

Compiler output:
a.cc:2:1: error: 'MOD' does not name a type
    2 | MOD=100000,i,j,k,n,m;
      | ^~~
a.cc: In function 'int main()':
a.cc:4:25: error: 'n' was not declared in this scope
    4 |     while(scanf("%d%d",&n,&m),n){
      |                         ^
a.cc:4:28: error: 'm' was not declared in this scope
    4 |     while(scanf("%d%d",&n,&m),n){
      |                            ^
a.cc:4:11: error: 'scanf' was not declared in this scope
    4 |     while(scanf("%d%d",&n,&m),n){
      |           ^~~~~
a.cc:7:13: error: 'i' was not declared in this scope
    7 |         rep(i,n)rep(j,m)rep(k,2){
      |             ^
a.cc:1:22: note: in definition of macro 'rep'
    1 | #define rep(i,a) for(i=0;i<a;i++)
      |                      ^
a.cc:7:21: error: 'j' was not declared in this scope
    7 |         rep(i,n)rep(j,m)rep(k,2){
      |                     ^
a.cc:1:22: note: in definition of macro 'rep'
    1 | #define rep(i,a) for(i=0;i<a;i++)
      |                      ^
a.cc:7:29: error: 'k' was not declared in this scope
    7 |         rep(i,n)rep(j,m)rep(k,2){
      |                             ^
a.cc:1:22: note: in definition of macro 'rep'
    1 | #define rep(i,a) for(i=0;i<a;i++)
      |                      ^
a.cc:8:71: error: 'MOD' was not declared in this scope
    8 |                         dp[i+1+k][j][0]=(dp[i+1+k][j][0]+dp[i][j][k])%MOD;
      |                                                                       ^~~
a.cc:11:61: error: 'MOD' was not declared in this scope
   11 |                 printf("%d\n",(dp[n][m-1][0]+dp[n-1][m][1])%MOD);
      |                                                             ^~~
a.cc:11:17: error: 'printf' was not declared in this scope
   11 |                 printf("%d\n",(dp[n][m-1][0]+dp[n-1][m][1])%MOD);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define rep(i,a) for(i=0;i<a;i++)
Language: C++

#include <iostream>

using namespace std;

const int mod = 100000;

int dp[102][102][4];

int main()
{
    int w, h;
    
    while (cin >> w >> h, w) {
        memset(dp, 0, sizeof(dp));

        dp[0][1][1] = 1;
        dp[1][0][0] = 1;

        for (int i = 0; i < h; ++i) {
            for (int j = 0; j < w; ++j) {
                // k == 0: ?????????????¶?????????????
                // k == 1: ?????????????¶?????????????
                // k == 2: ??´????????????????????£???
                // k == 3: ??´????????????????????£???

                if (i - 1 >= 0) {
                    (dp[i][j][0] += dp[i - 1][j][0] + dp[i - 1][j][2]) %= mod;;
                    (dp[i][j][2] += dp[i - 1][j][1]) %= mod;
                }

                if (j - 1 >= 0) {
                    (dp[i][j][1] += dp[i][j - 1][1] + dp[i][j - 1][3]) %= mod;
                    (dp[i][j][3] += dp[i][j - 1][0]) %= mod;
                }
            }
        }

        int ans = 0;

        for (int i = 0; i < 4; ++i) ans += dp[h - 1][w - 1][i];

        ans %= mod;
        cout << ans << endl;
    }
}

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

#include<iostream>
#include<algorithm>
#define mod 100000
using namespace std;
int main(){
 
        int w,h;
        while(cin>>w>>h,w||h){
            int dp[101][101][2][2]={{{{0}}}},sum=0;
            dp[0][0][0][1]=dp[0][0][1][1]=1;
            for(int i=0;i<h;i++){
                for(int j=0;j<w;j++){
                    for(int k=0;k<2;k++)for(int l=0;l<2;l++)dp[i][j][k][l]%=mod;
 
                    dp[i+1][j][0][0]+=dp[i][j][0][1];
                    dp[i][j+1][1][0]+=dp[i][j][1][1];
 
                    dp[i+1][j][0][0]+=dp[i][j][0][0];
                    dp[i][j+1][1][0]+=dp[i][j][1][0];
 
                    dp[i+1][j][0][1]+=dp[i][j][1][0];
                    dp[i][j+1][1][1]+=dp[i][j][0][0];
                }
            }
            for(int i=0;i<2;i++)
                for(int j=0;j<2;j++)
                    sum+=dp[h-1][w-1][i][j];
 
            sum%=mod;
            cout<<sum<<endl;
        }
}

Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 1/1	C++	CPU: 00.00 sec	Memory: 1324 KB	Length: 928 B	2014-12-08 19:42	2014-12-08 19:42
Results for testcases
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1:	: Accepted	00.00 sec	1324 KB	33 B	25 B	test_case_1

< prev |	1	/	1	| next >	 		 : Accepted        00.00 sec        1324 KB
 
Judge Input #1 ( in1.txt | 33 B)		Judge Output #1 ( out1.txt | 25 B)
4 6
13 6
17 21
96 87
100 100
0 0
14
266
11162
50240
71084
Comments
 
 Under Construction.
 
Categories
 
 
Free Tags
 
 

Compiler output:
a.cc:38:81: error: invalid digit "8" in octal constant
   38 | Judge: 1/1      C++     CPU: 00.00 sec  Memory: 1324 KB Length: 928 B   2014-12-08 19:42        2014-12-08 19:42
      |                                                                                 ^~
a.cc:38:105: error: invalid digit "8" in octal constant
   38 | Judge: 1/1      C++     CPU: 00.00 sec  Memory: 1324 KB Length: 928 B   2014-12-08 19:42        2014-12-08 19:42
      |                                                                                                         ^~
a.cc:40:6: error: stray '#' in program
   40 | Case #  Verdict CPU Time        Memory  In      Out     Case Name
      |      ^
a.cc:41:6: error: stray '#' in program
   41 | Case #1:        : Accepted      00.00 sec       1324 KB 33 B    25 B    test_case_1
      |      ^
a.cc:45:13: error: stray '#' in program
   45 | Judge Input #1 ( in1.txt | 33 B)                Judge Output #1 ( out1.txt | 25 B)
      |             ^
a.cc:45:62: error: stray '#' in program
   45 | Judge Input #1 ( in1.txt | 33 B)                Judge Output #1 ( out1.txt | 25 B)
      |                                                              ^
a.cc:34:1: error: 'Compile' does not name a type
   34 | Compile Error Logs:
      | ^~~~~~~
Language: C++

#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<cstdlib>
#include<list>
#include<set>
#include<numeric>
#include<intrin.h>

#define MOD 1000000007

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

int W, H, dp[100][100][4];
const int mod = 100000;

int rec(int y, int x, int j) {
	if (y >= H || x >= W)return 0;
	if (dp[y][x][j])return dp[y][x][j];
	if (y == H - 1 && x == W - 1)return 1;

	int ret;
	if (!y && !x) ret = rec(y + 1, x, 0) + rec(y, x + 1, 1);
	else if (j == 0)ret = rec(y + 1, x,0) + rec(y, x + 1, 3);
	else if (j == 1)ret = rec(y + 1, x, 2) + rec(y, x + 1, 1);
	else if (j == 2)ret = rec(y + 1, x, 0);
	else if (j == 3)ret = rec(y, x + 1, 1);

	return dp[y][x][j] = ret % mod;
}

int main() {
	while (cin >> W >> H, W) {
		for (int i = 0; i < 100; i++) {
			for (int j = 0; j < 100; j++) {
				for (int k = 0; k < 4; k++) {
					dp[i][j][k] = -1;
				}
			}
		}
	}
	cout << rec(0, 0, 0) << endl;
	return 0;
}

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

#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<cstdlib>
#include<list>
#include<set>
#include<numeric>
#include<intrin.h>

#define MOD 1000000007

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

int W, H, dp[100][100][4];
const int mod = 100000;

int rec(int y, int x, int j) {
	if (y >= H || x >= W)return 0;
	if (!dp[y][x][j])return dp[y][x][j];
	if (y == H - 1 && x == W - 1)return 1;

	int ret;
	if (!y && !x) ret = rec(y + 1, x, 0) + rec(y, x + 1, 1);
	else if (j == 0)ret = rec(y + 1, x,0) + rec(y, x + 1, 3);
	else if (j == 1)ret = rec(y + 1, x, 2) + rec(y, x + 1, 1);
	else if (j == 2)ret = rec(y + 1, x, 0);
	else if (j == 3)ret = rec(y, x + 1, 1);

	return dp[y][x][j] = ret % mod;
}

int main() {
	while (cin >> W >> H, W) {
		for (int i = 0; i < 100; i++) {
			for (int j = 0; j < 100; j++) {
				for (int k = 0; k < 4; k++) {
					dp[i][j][k] = -1;
				}
			}
		}
		cout << rec(0, 0, 0) << endl;
	}
	return 0;
}

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

#include <stdio.h>

int main(void){
	int i,j,w,h;
	while(scanf("%d%d",&w,&h),w,h){
		unsigned __int64 dp[101][101][5]={0};
		
		for(i=1;i<=h;i++) dp[i][1][4]=1;
		for(j=1;j<=w;j++) dp[1][j][4]=1;
		
		for(i=2;i<=h;i++){
			for(j=2;j<=w;j++){
				dp[i][j][0]=dp[i-1][j][3]+dp[i-1][j][4];
				dp[i][j][1]=dp[i][j-1][2]+dp[i][j-1][4];
				dp[i][j][2]=dp[i-1][j][0]+dp[i-1][j][2];
				dp[i][j][3]=dp[i][j-1][1]+dp[i][j-1][3];
			}
		}
		/*
		for(i=1;i<=h;i++){
			for(j=1;j<=w;j++){
				printf("(%I64d,%I64d,%dI64,%I64d,%I64d) ",dp[i][j][0],dp[i][j][1],dp[i][j][2],dp[i][j][3],dp[i][j][4]);
			}
			puts("");
		}
		*/
		printf("%I64d\n",(dp[h][w][0]+dp[h][w][1]+dp[h][w][2]+dp[h][w][3])%100000);
		
	}
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: expected initializer before 'dp'
    6 |                 unsigned __int64 dp[101][101][5]={0};
      |                                  ^~
a.cc:8:35: error: 'dp' was not declared in this scope
    8 |                 for(i=1;i<=h;i++) dp[i][1][4]=1;
      |                                   ^~
a.cc:9:35: error: 'dp' was not declared in this scope
    9 |                 for(j=1;j<=w;j++) dp[1][j][4]=1;
      |                                   ^~
a.cc:13:33: error: 'dp' was not declared in this scope
   13 |                                 dp[i][j][0]=dp[i-1][j][3]+dp[i-1][j][4];
      |                                 ^~
a.cc:27:35: error: 'dp' was not declared in this scope
   27 |                 printf("%I64d\n",(dp[h][w][0]+dp[h][w][1]+dp[h][w][2]+dp[h][w][3])%100000);
      |                                   ^~
Language: C++

#include <cstring>
#include <iostream>

using namespace std;

inline int rem(int n) {
  return n % 100000;
}

int main() {
  for (;;) {
    int w, h, streets[100][100][4];
    cin >> w >> h;
    if (!w && !h) return 0;
    memset(streets, 0, sizeof streets);
    streets[0][0] = { 1, 0, 1, 0 };
    for (int i = 1; i < w; i++)
      streets[0][i] = { 1, 0, 0, 1 };
    for (int j = 1; j < h; j++)
      streets[j][0] = { 0, 1, 1, 0 };
    for (int j = 1; j < h; j++)
      for (int i = 1; i < w; i++)
        streets[j][i] = {
          rem(streets[j][i-1][0] + streets[j][i-1][1]),
          streets[j-1][i][2],
          rem(streets[j-1][i][2] + streets[j-1][i][3]),
          streets[j][i-1][0]
        };
    cout << rem(streets[h-1][w-1][0] + streets[h-1][w-1][2]) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: assigning to an array from an initializer list
   16 |     streets[0][0] = { 1, 0, 1, 0 };
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
a.cc:18:21: error: assigning to an array from an initializer list
   18 |       streets[0][i] = { 1, 0, 0, 1 };
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
a.cc:20:21: error: assigning to an array from an initializer list
   20 |       streets[j][0] = { 0, 1, 1, 0 };
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
a.cc:23:23: error: assigning to an array from an initializer list
   23 |         streets[j][i] = {
      |         ~~~~~~~~~~~~~~^~~
   24 |           rem(streets[j][i-1][0] + streets[j][i-1][1]),
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |           streets[j-1][i][2],
      |           ~~~~~~~~~~~~~~~~~~~
   26 |           rem(streets[j-1][i][2] + streets[j-1][i][3]),
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   27 |           streets[j][i-1][0]
      |           ~~~~~~~~~~~~~~~~~~
   28 |         };
      |         ~
Language: C++

#include <cstdio>
#include <algorithm>

const int mod = 100000;
const int maxx = 128, maxy = 128;

int main()
{
int w1[maxx][maxy] = {0};
int w2[maxx][maxy] = {0};
int s1[maxx][maxy] = {0};
int s2[maxx][maxy] = {0};

for(int i = 0; i < maxx)
w2[i][0] = 1;
for(int i = 0; i < maxy)
s2[0][i] = 1;

for(int x = 1; x < maxx) {
for(int y = 1; y < maxy) {
w1[x][y] = s1[x - 1][y] + s2[x - 1][y];
w2[x][y] = w1[x - 1][y] + w2[x - 1][y];
s1[x][y] = w1[x][y - 1] + w2[x][y - 1];
s2[x][y] = s1[x][y - 1] + s2[x][y - 1];
}
}

while(true) {
int w, h;
scanf("%d%d", &w, &h);
if(w == 0)
break;
w -= 1, h -= 1;
int ans = s1[w][h] + s2[w][h] + w1[w][h] + w2[w][h]; 
printf("%d\n", ans);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before ')' token
   14 | for(int i = 0; i < maxx)
      |                        ^
      |                        ;
a.cc:16:24: error: expected ';' before ')' token
   16 | for(int i = 0; i < maxy)
      |                        ^
      |                        ;
a.cc:19:24: error: expected ';' before ')' token
   19 | for(int x = 1; x < maxx) {
      |                        ^
      |                        ;
a.cc:20:24: error: expected ';' before ')' token
   20 | for(int y = 1; y < maxy) {
      |                        ^
      |                        ;
Language: C++

#include <cstdio>
#include <algorithm>

const int mod = 100000;
const int maxx = 128, maxy = 128;

int main()
{
int w1[maxx][maxy] = {0};
int w2[maxx][maxy] = {0};
int s1[maxx][maxy] = {0};
int s2[maxx][maxy] = {0};

for(int i = 0; i < maxx; ++i)
w2[i][0] = 1;
for(int i = 0; i < maxy; ++i)
s2[0][i] = 1;

for(int x = 1; x < maxx) {
for(int y = 1; y < maxy) {
w1[x][y] = s1[x - 1][y] + s2[x - 1][y];
w2[x][y] = w1[x - 1][y] + w2[x - 1][y];
s1[x][y] = w1[x][y - 1] + w2[x][y - 1];
s2[x][y] = s1[x][y - 1] + s2[x][y - 1];
}
}

while(true) {
int w, h;
scanf("%d%d", &w, &h);
if(w == 0)
break;
w -= 1, h -= 1;
int ans = s1[w][h] + s2[w][h] + w1[w][h] + w2[w][h]; 
printf("%d\n", ans);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: expected ';' before ')' token
   19 | for(int x = 1; x < maxx) {
      |                        ^
      |                        ;
a.cc:20:24: error: expected ';' before ')' token
   20 | for(int y = 1; y < maxy) {
      |                        ^
      |                        ;
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
#define mod 100000
int w,h,memo[101][101][5];
int solve(int y,int x,int shine){
  if(y<0 || y >= h || x < 0 || x >= w) return 0;
  if(memo[y][x][shine]) return memo[y][x][shine];
  if(y == h - 1 && x == w - 1) return 1;
  if(!shine) //生きてる☆
    return memo[y][x][shine] = solve(y+1,x,1) + solve(y,x+1,2) % mod;
  if(shine == 1) // 死にそう^v^
    return memo[y][x][shine] = solve(y+1,x,1) + solve(y,x+1,4) % mod;
  if(shine == 2) // 死にそう^v^
    return memo[y][x][shine] = solve(y+1,x,3) + solve(y,x+1,2) % mod;
  if(shine == 3) //死んでる(・^・)
    return memo[y][x][shine] = solve(y+1,x,1) % mod;
  if(shine == 4) //死んでる(・^・)
    return memo[y][x][shine] = solve(y,x+1,2) % mod;
}
int main(){
  while(cin >> w >> h , w){
    fill_n(memo[0][0],101*101*4,0)
    cout << solve(0,0,0) % mod <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:35: error: expected ';' before 'cout'
   23 |     fill_n(memo[0][0],101*101*4,0)
      |                                   ^
      |                                   ;
   24 |     cout << solve(0,0,0) % mod <<endl;
      |     ~~~~                           
a.cc: In function 'int solve(int, int, int)':
a.cc:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | }
      | ^
Language: C++

#include <iostream>

using namespace std;
int dp[102][102][2];

void solve()
{
	memset(dp, 0, sizeof(dp));
	for(int i = 1; i <= 100; ++i)
	{
		dp[1][i][0] = 1;
		dp[1][i][1] = 1;
		dp[i][1][0] = 1;
		dp[i][1][1] = 1;
	}
	for(int i = 2; i <= 100; ++i)
	{
		for(int j = 2; j <= 100; ++j)
		{
			dp[i][j][0] = (dp[i][j - 1][0] + dp[i - 2][j][1]) % 100000;
			dp[i][j][1] = (dp[i][j - 2][0] + dp[i - 1][j][1]) % 100000;
		}
	}
	int w, h;
	while(cin >> w >> h, w || h)
	{
		cout << (dp[h][w - 1][0] + dp[h - 1][w][1]) % 100000 << endl;
	}
}

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

Compiler output:
a.cc: In function 'void solve()':
a.cc:8:9: error: 'memset' was not declared in this scope
    8 |         memset(dp, 0, sizeof(dp));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |