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

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

int main(){
	int ringCount = 0;
	int findCount = 0;
	char targetStr[11];
	char tempRing[11];
	int targetStringLength;
	int tempStringLength;
	bool isSame = true;
	cin >> targetStr >> ringCount;
	targetStringLength = strlen(targetStr);
	for(int i=0;i<ringCount;i++){
		cin >> tempRing;
		tempStringLength = strlen(tempRing);
		isSame = true;
		for(int j=0;j<tempStringLength;j++){
			for(int k=0;k<targetStringLength;k++){
				if(targetStr[k] != tempRing[(j+k)%stringLength]){
					isSame = false;
					break;
				}
			}
			if(isSame){
				findCount++;
				break;
			}
		}
	}
	cout << findCount << '\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:67: error: 'stringLength' was not declared in this scope; did you mean 'tempStringLength'?
   21 |                                 if(targetStr[k] != tempRing[(j+k)%stringLength]){
      |                                                                   ^~~~~~~~~~~~
      |                                                                   tempStringLength
Language: C++

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

int main(){

	string char1,ring;
	cin>>char1;
	
	int num=0;
	cin>>num;

	for(int i=0;i<num;i++){
		cin>>ring;
		ring=ring+ring;
		string::size_type index=ring.find(char1);
		if(index==string::npos){
			num--;
		}
	}
	cout<<num2<<endl;
	return 0;
}
	
		
		

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

#include<iostream>
#include<string>
using namespace std;
string S,T;
int main(){
	int n;cin>>S>>n;int c=0;
	for(int i=0;i<n;i++){
		cin>>T;T+=T;
		int flag=0;
		for(int i=0;i<T.size()-S.size()+1;i++){
			if(T.substr(i,S.size())==S){flag=1;}
		}
		c+=flag;
	}
	cout<<flag<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'flag' was not declared in this scope
   15 |         cout<<flag<<endl;
      |               ^~~~
Language: C++

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

int main()
{
  string w, s;
  cin >> N;
  int cnt = 0;
  Rep(i,N) {
    cin >> s;
    cnt += s.find(w) != string::npos;
  }
  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'N' was not declared in this scope
    7 |   cin >> N;
      |          ^
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   Rep(i,N) {
      |       ^
a.cc:9:3: error: 'Rep' was not declared in this scope
    9 |   Rep(i,N) {
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define Rep(i,N) for(int i = 0;i < N;i++)
int main()
{
  string w, s;
  cin >> N;
  int cnt = 0;
  Rep(i,N) {
    cin >> s;
    cnt += s.find(w) != string::npos;
  }
  cout << cnt << endl;
  return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
	char a[100], b[100], str[100];
	int i, j, cnt = 0, n;
	scanf("%s", str);
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%s", a);
		strcpy(b, a)
			if (strstr(b, str) != 0) {
				cnt++;

			}
	}
	printf("%d\n", cnt);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: expected ';' before 'if'
   11 |                 strcpy(b, a)
      |                             ^
      |                             ;
   12 |                         if (strstr(b, str) != 0) {
      |                         ~~
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char a[100], b[100], str[100];
	int i, j, cnt = 0, n;
	scanf("%s", str);
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%s", a);
		strcpy(a, a);
			if (strstr(a, str) != 0) {
				cnt++;

			}
	}\\
	printf("%d\n", cnt);
}

Compiler output:
a.cc:16:10: error: stray '\' in program
   16 |         }\\
   17 |         printf("%d\n", cnt);
Language: C++

#include <stdio.h>
#include <stdlib.h>

int main(){
  char find_str[10];
  int ling_qty;

  scanf("%s",&find_str);
  scanf("%d",&ling_qty);
 
  char str_buff[11];
  char str_sum[20];

  int find_count = 0;
  for(int i = 0; i < ling_qty; i++){
    scanf("%s",str_buff);
    strcpy(str_sum,str_buff); 
    strcat(str_sum,str_buff);
    if(strstr(str_sum,find_str) != NULL) find_count++;
  }
  printf("%d\n",find_count); 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'strcpy' was not declared in this scope
   17 |     strcpy(str_sum,str_buff);
      |     ^~~~~~
a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 | 
a.cc:18:5: error: 'strcat' was not declared in this scope
   18 |     strcat(str_sum,str_buff);
      |     ^~~~~~
a.cc:18:5: note: 'strcat' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:19:8: error: 'strstr' was not declared in this scope
   19 |     if(strstr(str_sum,find_str) != NULL) find_count++;
      |        ^~~~~~
a.cc:19:8: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;
#include<string>
int main()
{
	string ryuta,ryutan[101];
	int n,i,m,r=0;
	cin>>ryuta>>n;
	for(i=1;i<=n;i++)
	{
		cin>>ryutan[i];
	}
	for(i=1;i<=n;i++)
	{
		m=0;
		m=ryutan[i].find(ryuta);
		if(m>=0)
		{
			r++;
		}
		cout<<r<<endl;
		return 0;
	}

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

#include<iostream>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)

string rotate(string &in){
  string ret=in.substr(1);
  return ret+in[0];
}

bool isc(string tar,string a){
  rep(i,a.size()){
    if (search(a.begin(),a.end(),tar.begin(),tar.end()) != a.end())return true;
    a=rotate(a);
  }
  return false;
}

main(){

  string tar;
  while(cin>>tar){
    int ret=0;
    int n;
    cin>>n;
    rep(i,n){
      string tmp;
      cin>>tmp;
      if (isc(tar,tmp))ret++;
    }
    cout << ret << endl;
  }
  
}

Compiler output:
a.cc: In function 'bool isc(std::string, std::string)':
a.cc:13:15: error: no matching function for call to 'search(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator)'
   13 |     if (search(a.begin(),a.end(),tar.begin(),tar.end()) != a.end())return true;
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:2332:5: note: candidate: 'template<class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> _ForwardIterator1 std::search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate)'
 2332 |     search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:2332:5: note:   candidate expects 5 arguments, 4 provided
a.cc: At global scope:
a.cc:19:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   19 | main(){
      | ^~~~
Language: C++

a,C;main(b){for(;~scanf("%s",a?&b:&a);)strstr(strcat(strdup(&b),&b),&a)&&C++;C=!printf("%d\n",C);}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,C;main(b){for(;~scanf("%s",a?&b:&a);)strstr(strcat(strdup(&b),&b),&a)&&C++;C=!printf("%d\n",C);}
      | ^
a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token
    1 | a,C;main(b){for(;~scanf("%s",a?&b:&a);)strstr(strcat(strdup(&b),&b),&a)&&C++;C=!printf("%d\n",C);}
      |         ^
Language: C++

a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      | ^
a.cc:1:10: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |          ^~~~
a.cc: In function 'int main()':
a.cc:1:17: error: 'a' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                 ^
a.cc:1:33: error: 'b' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                                 ^
a.cc:1:20: error: 'scanf' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                    ^~~~~
a.cc:1:58: error: 'strdup' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                                                          ^~~~~~
a.cc:1:51: error: 'strcat' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                                                   ^~~~~~
a.cc:1:1: note: 'strcat' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
a.cc:1:44: error: 'strstr' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                                            ^~~~~~
a.cc:1:44: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:1:76: error: 'C' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                                                                            ^
a.cc:1:82: error: 'printf' was not declared in this scope
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
      |                                                                                  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | a,b[9],C;main(){a=~scanf("%s",a?b:&a)?main(strstr(strcat(strdup(b),b),&a)&&C++):!printf("%d\n",C);}
Language: C++

#include<cstdio>
#include<cstring>

int main(){
int a,res=0;
char x[20],y[40],z[20];
scanf("%s",&x);
scanf("%d",&a);
for(int i=0;i<a;i++){
scanf("%s",&y);
strcpy(z,y);
strcat(y,);
if(strstr(y,x)){
 res++;
}
}
printf("%d\n",res);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected primary-expression before ')' token
   12 | strcat(y,);
      |          ^
Language: C++

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

char str[11];
int n;
const int MAX_N = 100;
char s[MAX_N][11];
char t[MAX_N][22];
int count = 0;

void check(int i){
	for(int j=0;t[i][j]!='\0';j++){
		int k;
		for(k=0;str[k] != '\0';k++){
			if(t[i][j+k] != str[k]){
				break;
			}
		}
		if(str[k] == '\0'){
			count++;
			return;
		}
	}
	return;
}
int main()
{
	cin >> str;
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> s[i];
		strcpy(t[i],s[i]);
		strcat(t[i],s[i]);
	}

	for(int i=0;i<n;i++){
		check(i);
	}
	cout << count <<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: 'strcpy' was not declared in this scope
   33 |                 strcpy(t[i],s[i]);
      |                 ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:34:17: error: 'strcat' was not declared in this scope
   34 |                 strcat(t[i],s[i]);
      |                 ^~~~~~
a.cc:34:17: note: 'strcat' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String args[]) {
		String tar = sc.next();
		int N = sc.nextInt();
		int ans = 0;
		for(int i = 0; i < N; i++) {
			String s = sc.next();
			String con = s + s;
			if(con.contains(tar)) ans++;
		}
		System.out.println(ans);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <cstdio>
#include <string.h>

	int i;
	int n,num=0;

int main(){
	char search[10];
	while(search[i]!=NULL) scanf("%c\n",&search[i]);
	scanf("%d\n",&n); 
	for(int j=0;j<n;j++){
		char array[10];
		char array2[20];
		scanf("%c",&array[i]);
		strncat(array2,array,10);
		strncpy(array2,array,10);
		if (strpbrk(array2,search )!=0) num++;

{
		}
	}
		return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: warning: NULL used in arithmetic [-Wpointer-arith]
    9 |         while(search[i]!=NULL) scanf("%c\n",&search[i]);
      |                          ^~~~
a.cc:22:26: error: expected '}' at end of input
   22 |                 return 0;
      |                          ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

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

int main(void)
{
	string fin,model;
	int n,ans=0;

	cin >> fin;
	cin >> n;

	for(int i = 0; i < n; i++){
		cin >> model;
		model += model;

		if(strstr(model.c_str(), fin.c_str()))
			ans++;
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'strstr' was not declared in this scope
   17 |                 if(strstr(model.c_str(), fin.c_str()))
      |                    ^~~~~~
a.cc:2:1: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include<stdio.h>
#include<algorithm>

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)

using namespace std;


int main(){
	char k[11];
	int n,cnt=0;;
	char s[21];
	size_t l=sizeof(char)*10;
	scanf("%s%d",k,&n);
	rep(i,n){
		scanf("%s",s);
		memcpy(s+10,s,l);
		if(strstr(s,k)!=NULL)cnt++;
	}
	printf("%d\n",cnt);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'memcpy' was not declared in this scope
   18 |                 memcpy(s+10,s,l);
      |                 ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | 
a.cc:19:20: error: 'strstr' was not declared in this scope
   19 |                 if(strstr(s,k)!=NULL)cnt++;
      |                    ^~~~~~
a.cc:19:20: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<stdio.h>
#include<string.h>
int main(void)
{
	int s,m[10],mz;
	int k,i;
	int cnt;
	cnt=0;
	scanf("%s",&s);
	scanf("%d",&k);
	for(i=0;i<k;i++){
		scanf("%s",&m[i]);
	}
	for(i=0;i<k;i++){
		strcat(mz,m[i]);
		if(strstr(mz,s)){
		cnt++;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: invalid conversion from 'int' to 'char*' [-fpermissive]
   15 |                 strcat(mz,m[i]);
      |                        ^~
      |                        |
      |                        int
In file included from a.cc:2:
/usr/include/string.h:149:39: note:   initializing argument 1 of 'char* strcat(char*, const char*)'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:15:30: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 |                 strcat(mz,m[i]);
      |                           ~~~^
      |                              |
      |                              int
/usr/include/string.h:149:70: note:   initializing argument 2 of 'char* strcat(char*, const char*)'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:16:26: error: no matching function for call to 'strstr(int&, int&)'
   16 |                 if(strstr(mz,s)){
      |                    ~~~~~~^~~~~~
/usr/include/string.h:330:14: note: candidate: 'char* strstr(char*, const char*)' (near match)
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |              ^~~~~~
/usr/include/string.h:330:14: note:   conversion of argument 2 would be ill-formed:
a.cc:16:30: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 |                 if(strstr(mz,s)){
      |                              ^
      |                              |
      |                              int
/usr/include/string.h:332:20: note: candidate: 'const char* strstr(const char*, const char*)' (near match)
  332 | extern const char *strstr (const char *__haystack, const char *__needle)
      |                    ^~~~~~
/usr/include/string.h:332:20: note:   conversion of argument 2 would be ill-formed:
a.cc:16:30: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 |                 if(strstr(mz,s)){
      |                              ^
      |                              |
      |                              int
Language: C++

#include<stdio.h>
#include<string.h>
int main(void)
{
	int s,m[10],mz;
	int k,i;
	int cnt;
	cnt=0;
	scanf("%s",s);
	scanf("%d",&k);
	for(i=0;i<k;i++){
		scanf("%s",m[i]);
	}
	for(i=0;i<k;i++){
		strcat(mz,m[i]);
		if(strstr(mz,s)){
		cnt++;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: invalid conversion from 'int' to 'char*' [-fpermissive]
   15 |                 strcat(mz,m[i]);
      |                        ^~
      |                        |
      |                        int
In file included from a.cc:2:
/usr/include/string.h:149:39: note:   initializing argument 1 of 'char* strcat(char*, const char*)'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
a.cc:15:30: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 |                 strcat(mz,m[i]);
      |                           ~~~^
      |                              |
      |                              int
/usr/include/string.h:149:70: note:   initializing argument 2 of 'char* strcat(char*, const char*)'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:16:26: error: no matching function for call to 'strstr(int&, int&)'
   16 |                 if(strstr(mz,s)){
      |                    ~~~~~~^~~~~~
/usr/include/string.h:330:14: note: candidate: 'char* strstr(char*, const char*)' (near match)
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |              ^~~~~~
/usr/include/string.h:330:14: note:   conversion of argument 2 would be ill-formed:
a.cc:16:30: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 |                 if(strstr(mz,s)){
      |                              ^
      |                              |
      |                              int
/usr/include/string.h:332:20: note: candidate: 'const char* strstr(const char*, const char*)' (near match)
  332 | extern const char *strstr (const char *__haystack, const char *__needle)
      |                    ^~~~~~
/usr/include/string.h:332:20: note:   conversion of argument 2 would be ill-formed:
a.cc:16:30: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 |                 if(strstr(mz,s)){
      |                              ^
      |                              |
      |                              int
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;

int main()
{
	char* sr[10];
	int slr;
	char* sa[100][10];
	int sla;
	int kazoe=0;
	int syokazoe=0;
	
	printf("%s",sr);
	cin>>sla;
	for(int i=0;i<sla;i++){
		printf("%s",sa[i]);
	}
	slr=(int)strlen(sr);
	//いっこずつ
	for(int i=0;i<sla;i++){
		//開始位置
		for(int j=0;j<10;j++){
			//文字
			for(int k=0;k<slr;k++){
				if(sr[k]!=sa[i][j%10]){
					break;
				}
				else{
					syokazoe++;
				}
			}
			if(syokazoe==slr){
				kazoe++;
				break;
			}
			syokazoe=0;
		}
		
	}
	cout<<kazoe;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: cannot convert 'char**' to 'const char*'
   20 |         slr=(int)strlen(sr);
      |                         ^~
      |                         |
      |                         char**
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
    int N;
    string str;
    cin >> str;
    cin >> N;
    int goodR=0;
    for(int i=0;i<N;i++){
        string ring;
        cin >> ring;
        ring+=ring;
        int now=0;
        for(int j=0;j<20;j++){
            if(str[now]==ring[j])
            now++;
            else if(str[0]==ring[j])
            now=1;
            else
            now=0;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:19: error: expected '}' at end of input
   21 |             now=0;
      |                   ^
a.cc:15:30: note: to match this '{'
   15 |         for(int j=0;j<20;j++){
      |                              ^
a.cc:21:19: error: expected '}' at end of input
   21 |             now=0;
      |                   ^
a.cc:10:25: note: to match this '{'
   10 |     for(int i=0;i<N;i++){
      |                         ^
a.cc:21:19: error: expected '}' at end of input
   21 |             now=0;
      |                   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: Java

import java.util.*;class Main{public static void main(String[]n){Scanner s=new Scanner(System.in);for(int n=s.nextInt()+1,m=n/2,a,b,i=s.nextInt();i-->0;)System.out.println((m-1-Math.max(Math.abs((a=s.nextInt()-m)>0&&n%2>0?a-1:a),Math.abs((b=s.nextInt()-m)>0&&n%2>0?b-1:b)))%3+1);}}

Compiler output:
Main.java:1: error: variable n is already defined in method main(String[])
import java.util.*;class Main{public static void main(String[]n){Scanner s=new Scanner(System.in);for(int n=s.nextInt()+1,m=n/2,a,b,i=s.nextInt();i-->0;)System.out.println((m-1-Math.max(Math.abs((a=s.nextInt()-m)>0&&n%2>0?a-1:a),Math.abs((b=s.nextInt()-m)>0&&n%2>0?b-1:b)))%3+1);}}
                                                                                                          ^
1 error
Language: C

#include<stdio.h>
int main(){
	int n,k,ai,bi,i,k,c;
	scanf("%d",&n);
	scanf("%d",&k);
	for(i=0;i<k;i++){
		scanf("%d%d",&ai,&bi);
		if(n+1-ai<ai)ai=n+1-ai;
		if(n+1-bi<bi)bi=n+1-bi;
		if(ai>bi)c=(ai-1)%3+1;
		else c=(bi-1)%3+1;
		printf("%d\n",c);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:25: error: redeclaration of 'k' with no linkage
    3 |         int n,k,ai,bi,i,k,c;
      |                         ^
main.c:3:15: note: previous declaration of 'k' with type 'int'
    3 |         int n,k,ai,bi,i,k,c;
      |               ^
Language: C

#include<stdio.h>
int main(){
	int n,k,ai,bi,i,k,c;
	scanf("%d",&n);
	scanf("%d",&k);
	for(i=0;i<k;i++){
		scanf("%d%d",&ai,&bi);
		if(n+1-ai<ai)ai=n+1-ai;
		if(n+1-bi<bi)bi=n+1-bi;
		if(ai>bi)c=(bi-1)%3+1;
		else c=(ai-1)%3+1;
		printf("%d\n",c);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:25: error: redeclaration of 'k' with no linkage
    3 |         int n,k,ai,bi,i,k,c;
      |                         ^
main.c:3:15: note: previous declaration of 'k' with type 'int'
    3 |         int n,k,ai,bi,i,k,c;
      |               ^
Language: C

#include<stdio.h>
int main()
{
	int n,k,i,j,c,e,d,f,t,a,b;
	scanf("%d %d",&n,&k);
	e=n/2;
	f=n%2;
	for(i=0;i<k;i++){
		scanf("%d %d",&a,&b);
		if(f==0){
		if(a==e){
			c=n-a;
			c=c%3;
		}
		else if(b==e){
			c=n-b;
			c=c%3;
		}
		}
		if(a<e && b<e){
			c=min(a,b);
			c=c%3;
		}
		else if(a>e && b<e){
			c=min(a,b);
			c=c%3;
		}
		else if(a<e && b>e){
			c=min(a,b);
			t=c+1;
			t=n-t;
			c=t%3;
		}
		else if(a>e && b>e){
			c=max(a,b);
			t=c+1;
			t=n-t;
			c=t%3;
		}
		if(c==0){
			c=3;
		}
		printf("%d\n",c);
	}
	return 0;
}
int max(int a,int b)
{
	int c;
	if(a<b){
		c=b;
	}
	else{
		c=a;
	}
	return c;
}
int min(int a,int b)
{
	int c;
	if(a<b){
		c=a;
	}
	else{
		c=b;
	}
	return c;
}}


Compiler output:
main.c: In function 'main':
main.c:21:27: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   21 |                         c=min(a,b);
      |                           ^~~
      |                           main
main.c:35:27: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   35 |                         c=max(a,b);
      |                           ^~~
main.c: At top level:
main.c:68:2: error: expected identifier or '(' before '}' token
   68 | }}
      |  ^
Language: C

#include<stdio.h>
volatile int N
//int N=0;
int KIMOCHI(int a,int b)
{
	//int N;
	// A
	if(a<b){
		if(a+b<=N){
			if(a%3==0){
				return 3;
			}
			else{
				return a%3;
			}
		}
		else{
			//int cy=N-b+1;
			if((N-b+1)%3==0){
				return 3;
			}
			else{
				return (N-b+1)%3;
			}
		}
	}
	// B
	else {
		//int cy;
		//cy=N-a+1;
		if(a+b<=N){
			if(b%3==0){
				return 3;
			}
			else{
				return b%3;
			}
		}
		else{
			if((N-a+1)%3==0){
				return 3;
			}
			else{
				//不安↓
				return (N-a+1)%3;
			}
		}
	}
}

int main(void)
{
	//int N;
	int a,b,cy;
	int K,i;
	scanf("%d%d",&N,&K);
	for(i=0;i<K;i++){
		scanf("%d%d",&a,&b);
		//不安↓
		printf("%d\n",KIMOCHI(a,b));
	}
	return 0;
}


Compiler output:
main.c:2:15: error: expected ';' before 'int'
    2 | volatile int N
      |               ^
      |               ;
    3 | //int N=0;
    4 | int KIMOCHI(int a,int b)
      | ~~~            
main.c: In function 'KIMOCHI':
main.c:9:25: error: 'N' undeclared (first use in this function)
    9 |                 if(a+b<=N){
      |                         ^
main.c:9:25: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:56:23: error: 'N' undeclared (first use in this function)
   56 |         scanf("%d%d",&N,&K);
      |                       ^
Language: C

#include <stdio.h>
#defaine N 1000000000

int main(){
int kabe[N][N],a[N],b[N];
int nagasa,naga,i,j,k,l,m=0,n;
int t,f;
scanf("%d",&nagasa);
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a[i],&b[i]);
}

naga=nagasa-1;
if(nagasa%2==1){
for(i=0;i<nagasa/2+1;i++){
if(m%3==0){
for(j=m;j<naga-i;j++){
for(k=m;k<naga-i;k++){
kabe[j][k]=1;
}
}
}
else if(m%3==1){
for(j=m;j<naga-i;j++){
for(k=m;k<naga-i;k++){
kabe[j][k]=2;
}
}
}
else if(m%3==1){
for(j=m;j<naga-i;j++){
for(k=m;k<naga-i;k++){
kabe[j][k]=2;
}
}
}
m++;
}
}

else if(nagasa%2==0){
for(i=0;i<nagasa/2;i++){
if(m%3==0){
for(j=m;j<naga-i;j++){
for(k=m;k<naga-i;k++){
kabe[j][k]=1;
}
}
}
else if(m%3==1){
for(j=m;j<naga-i;j++){
for(k=m;k<naga-i;k++){
kabe[j][k]=2;
}
}
}
else if(m%3==1){
for(j=m;j<naga-i;j++){
for(k=m;k<naga-i;k++){
kabe[j][k]=2;
}
}
}
m++;
}
}

for(i=0;i<n;i++){
t=b[i];
f=a[i];
printf("%d\n",kabe[t][f]);
}

return 0;
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #defaine; did you mean #define?
    2 | #defaine N 1000000000
      |  ^~~~~~~
      |  define
main.c: In function 'main':
main.c:5:10: error: 'N' undeclared (first use in this function)
    5 | int kabe[N][N],a[N],b[N];
      |          ^
main.c:5:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <algorithm>
#include<vector>
int main() {
	int n;
	int b;
	std::cin >> n >> b;
	std::vector<int> v(b);
	for (int i = 0; i < b; ++i) {
		int x, y;
		int a = 0;
		std::cin >> x >> y;
		a = std::min(n - x, std::min(n - y, std::min(x-1, y-1)));
		v[i] = a % 3;
	}
	for (int i = 0; i < b; ++i) {
		if (v[i] == 0) {
			std::cout << v[i] + 1 << std::endl;
		}
		if (v[i] == 1) {
			std::cout << v[i] + 1 << std::endl;
		}
		if (v[i] == 2) {
			std::cout << v[i] + 1 << std::endl;
		}
	}
	

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

int main(){
	int i,i2,n,m,a,b,core,aa,bb,ans;
	scanf("%d%d",&n,&m);
	for(i=1;i<=m;i++){
		scanf("%d%d",&a,&b);
		aa=a;
		bb=b;
		core=n/2;
		if(n%2==1)core++;
		if(a>core)aa=n-aa+1;
		if(b>core)bb=n-bb+1;
		if(aa>bb){
			ans=bb;
		}
		else{
			ans=aa;
		}
		ans%=3;
		if(ans==0)ans=3;
		printf("%d\n",ans);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d%d",&n,&m);
      |         ^~~~~
a.cc:20:17: error: 'printf' was not declared in this scope
   20 |                 printf("%d\n",ans);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
Language: C++

#include <stdio.h>
int main(){
  long int N,K,a,b,i,j,A,B;
  scanf("%ld",&N);
  scanf(" %ld",&K);
  if(N%2==0){
    for(a=0;a<K;a++){
      scanf(" %ld %ld",&A,&B);
      for(b=1;b<=N/2;b++){
        if(A==b||B==b||A==(N-b+1)||B==(N-b+1)){
          for(i=0;i<3;i++){
            if(b%3==i){
              printf("%ld\n",i+1);
              break;
            }
          }
        }
      }
    }
  }
  if(N%2!=0){
    for(a=0;a<K;a++){
      scanf(" %ld %ld",&A,&B);
      for(b=1;b<N/2;b++){
        if(A==b||B==b||A==(N-b+1)||B==(N-b+1)){
          for(i=0;i<3;i++){
            if(b%3==i){
              printf("%ld\n",i+1);
              break;
            }
          }
        } else if (N/2+1==A){
          for(i=1;i<N/2;i++){
            if(B==i){
              for(j=0;j<3;j++){
                if(B%3==j){
                  printf("%ld\n",j+1);
                  break;
                }
              }
            }
          }
        } else if (N/2+1==B){
          for(i=1;i<N/2;i++){
            if(A==i){
              for(j=0;j<3;j++){
                if(B%3==j){
                  printf("%ld\n",j+1);
                  break;
                }
              }
            }
          }
        } else {
          for(j=0;j<3;j++){
            if(A%3=j){
              printf("%ld\n",j+1);
              break;
            }
          }
        }
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:17: error: lvalue required as left operand of assignment
   56 |             if(A%3=j){
      |                ~^~
Language: C++

#include<stdio.h>
int main()
{
	int n,k,i,j,c,e,d,f,t,a[10000],b[10000];
	scanf("%d %d",&n,&k);
	for(i=0;i<k;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	e=n/2;
	f=n%2;
	for(i=0;i<k;i++){
		if(f==0){
		if(a[i]==e){
			c=n-a[i];
			c=c%3;
		}
		else if(b[i]==e){
			c=n-b[i];
			c=c%3;
		}
		}
		if(a[i]<e && b[i]<e){
			c=min(a[i],b[i]);
			c=c%3;
		}
		else if(a[i]>e && b[i]<e){
			c=min(a[i],b[i]);
			c=c%3;
		}
		else if(a[i]<e && b[i]>e){
			c=min(a[i],b[i]);
			c=c%3;
		}
		else if(a[i]>e && b[i]>e){
			c=max(a[i],b[i]);
			t=n-c+1;
			c=t%3;
		}
		if(c==0){
			c=3;
		}
		printf("%d\n",c);
	}
	return 0;
}
int max(int a,int b)
{
	int c;
	if(a<b){
		c=b;
	}
	else{
		c=a;
	}
	return c;
}
int min(int a,int b)
{
	int c;
	if(a<b){
		c=a;
	}
	else{
		c=b;
	}
	return c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:27: error: 'min' was not declared in this scope; did you mean 'main'?
   23 |                         c=min(a[i],b[i]);
      |                           ^~~
      |                           main
a.cc:27:27: error: 'min' was not declared in this scope; did you mean 'main'?
   27 |                         c=min(a[i],b[i]);
      |                           ^~~
      |                           main
a.cc:31:27: error: 'min' was not declared in this scope; did you mean 'main'?
   31 |                         c=min(a[i],b[i]);
      |                           ^~~
      |                           main
a.cc:35:27: error: 'max' was not declared in this scope
   35 |                         c=max(a[i],b[i]);
      |                           ^~~
Language: C++

#include<iostream>
using namespace std;
main(n,k,x,y,w){
	cin>>n>>k;
	while(k--){
		cin>>x>>y;
		cout<<(min(min(x,y),min(n-x+1,n-y+1))-1)%3+1<<endl;
	}
}

Compiler output:
a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token
    3 | main(n,k,x,y,w){
      |     ^
Language: C++

#include<iostream>
using namespace std;
main(n,k,x,y,w){
	cin>>n>>k;
	while(k--){
		cin>>x>>y;
		cout<<(min(min(x,y),min(n-x+1,n-y+1))-1)%3+1<<endl;
	
	}
	return 0;
}

Compiler output:
a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token
    3 | main(n,k,x,y,w){
      |     ^
Language: C++

#include <cstdio>
#include <algorithm>

using namespace std;

int n,k;//nÍ¢ÁØñÉA^CÌBkÍÍªê½
int a,b;

int main(){

	scanf("%d\n",&n);
	scanf("%d\n",&k);
	for (int j=0;j<k;j++){
		scanf("%d",&a);
		scanf("%d",&b);
	  int x = a-1;
      int y = b-1;
      int z = n-x-1;
      int w = n-y-1;
      int m = min(min(x,y),min(z,w));
	  printf("%d\n",m%3+1);
	}

	retur

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'retur' was not declared in this scope
   24 |         retur
      |         ^~~~~
a.cc:24:14: error: expected '}' at end of input
   24 |         retur
      |              ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

#include <stdio.h>
#define N 1000000000

int main(){
int n,i,j,f,t,a[N][N];
int k,h,w;

f=0;
t=3;
scanf("%d",&n);
while(1){
if(t<=2)break;
t=0;
if(f%3==0){
for(i=f;i<n-f;i++){
t++;
for(j=f;j<n-f;j++){
a[i][j]=1;
}
}
f++;
continue;
}
else if(f%3==1){
for(i=f;i<n-f;i++){
t++;
for(j=f;j<n-f;j++){
a[i][j]=2;
}
}
f++;
continue;
}
else if(f%3==2){
for(i=f;i<n-f;i++){
t++;
for(j=f;j<n-f;j++){
a[i][j]=3;
}
}
f++;
continue;
}

scanf("%d",&k);
for(i=0;i<k;i++){
scanf("%d %d",&h,&w);
printf("%d\n",a[h-1][w-1]);
}

return 0;
}

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

#define N 1000000000

int main(){
int n,i,j,f,t,a[N][N];
int k,x,y,h[1001],w[1001];

f=0;
t=3;
scanf("%d",&n);
while(1){
if(t<=2)break;
t=0;
if(f%3==0){
for(i=f;i<n-f;i++){
t++;
for(j=f;j<n-f;j++){
a[i][j]=1;
}
}
f++;
continue;
}
else if(f%3==1){
for(i=f;i<n-f;i++){
t++;
for(j=f;j<n-f;j++){
a[i][j]=2;
}
}
f++;
continue;
}
else if(f%3==2){
for(i=f;i<n-f;i++){
t++;
for(j=f;j<n-f;j++){
a[i][j]=3;
}
}
f++;
continue;
}
}

scanf("%d",&k);
for(i=1;i<=k;i++){
scanf("%d %d",&h[i],&w[i]);
}

for(i=1;i<=k;i++){
x=h[i];
y=w[i];
printf("%d\n",a[x-1][y-1]);
}


return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'scanf' was not declared in this scope
    9 | scanf("%d",&n);
      | ^~~~~
a.cc:53:1: error: 'printf' was not declared in this scope
   53 | printf("%d\n",a[x-1][y-1]);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define N 1000000000
Language: C++

#include <stdio.h>

int min(int,int);

int main(){
int n,k,i,x,y,f;

scanf("%d%d",&n,&k);
for(i=0;i<k;i++){
scanf("%d %d",&x,&y);
x= x>=n/2 ? n-x+1:x;
y= y>=n/2 ? n-y+1:y;
f=(min(x,y)%3 ? min(x,y)%3:3;
printf("%d\n",f);
}

return 0;
}


int min(int a,int b)
{
if(a>b){
return b;
}
return a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: expected ')' before ';' token
   13 | f=(min(x,y)%3 ? min(x,y)%3:3;
      |   ~                         ^
      |                             )
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
	int n,k;
	vector<int> ans;

	cin >> n >> k;

	while(k--){
		cin >> x >> y;

		int h = min(x,n-x+1);
		int w = min(y,n-y+1);

		if(h > w){
			ans.push_back(w-1)%3+1;
		}
		else{
			ans.push_back(h-1)%3+1;
		}
	}
	int len = ans.size();

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'x' was not declared in this scope
   14 |                 cin >> x >> y;
      |                        ^
a.cc:14:29: error: 'y' was not declared in this scope
   14 |                 cin >> x >> y;
      |                             ^
a.cc:20:43: error: invalid operands of types 'void' and 'int' to binary 'operator%'
   20 |                         ans.push_back(w-1)%3+1;
      |                         ~~~~~~~~~~~~~~~~~~^~
      |                                      |     |
      |                                      void  int
a.cc:23:43: error: invalid operands of types 'void' and 'int' to binary 'operator%'
   23 |                         ans.push_back(h-1)%3+1;
      |                         ~~~~~~~~~~~~~~~~~~^~
      |                                      |     |
      |                                      void  int
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
	int n,k;
	vector<int> ans;

	cin >> n >> k;

	while(k--){
		int x,y;
		cin >> x >> y;

		int h = min(x,n-x+1);
		int w = min(y,n-y+1);

		if(h > w){
			ans.push_back(w-1)%3+1;
		}
		else{
			ans.push_back(h-1)%3+1;
		}
	}
	int len = ans.size();

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:43: error: invalid operands of types 'void' and 'int' to binary 'operator%'
   21 |                         ans.push_back(w-1)%3+1;
      |                         ~~~~~~~~~~~~~~~~~~^~
      |                                      |     |
      |                                      void  int
a.cc:24:43: error: invalid operands of types 'void' and 'int' to binary 'operator%'
   24 |                         ans.push_back(h-1)%3+1;
      |                         ~~~~~~~~~~~~~~~~~~^~
      |                                      |     |
      |                                      void  int
Language: C++

#include <stdio.h>
#include <algorithm>

int ans[1005];

int main(void)
{
	int n, k, a, b;
	int i, j, s;
	int lenl, lenr, lent, lenb;
	
	scanf("%d", &n);
	scanf("%d", &k);
	
	for (i = 0; i < k; i++){
		scanf("%d %d", &a, &b);
		lenl = a - 1;
		lenr = n - a;
		lent = b - 1;
		lenb = n - b;
		
		s = min(min(lenl, lenr), min(lent, lenb));
		ans[i] = s % 3 + 1;
	}
	
	for (i = 0; i < k; i++){
		
		printf("%d\n", ans[i]);
	}
	return (0);
}
	
		
	

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'min' was not declared in this scope; did you mean 'std::min'?
   22 |                 s = min(min(lenl, lenr), min(lent, lenb));
      |                         ^~~
      |                         std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:22:21: error: 'min' was not declared in this scope; did you mean 'std::min'?
   22 |                 s = min(min(lenl, lenr), min(lent, lenb));
      |                     ^~~
      |                     std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: Java

import java.util.Scanner;

// First Grader
public class Main2 {
	public static void main(String[] args) {
		new Main2().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] number = new int[n];
		for (int i = 0; i < n; i++)
			number[i] = sc.nextInt();
		long[][] dp = new long[n][21];
		dp[0][0] = 1;
		for (int i = 0; i < n - 1; i++) {
			for (int j = 0; j < 21; j++) {
				if (dp[i][j] > 0) {
					if (j + number[i] < 21)
						dp[i + 1][j + number[i]] += dp[i][j];
					if (j - number[i] >= 0)
						dp[i + 1][j - number[i]] += dp[i][j];
				}
			}
		}
		System.out.println(dp[n - 1][number[n - 1]]);
		sc.close();
	}
}
import java.util.Scanner;

// First Grader
public class Main2 {
	public static void main(String[] args) {
		new Main2().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] number = new int[n];
		for (int i = 0; i < n; i++)
			number[i] = sc.nextInt();
		long[][] dp = new long[n][21];
		dp[0][0] = 1;
		for (int i = 0; i < n - 1; i++) {
			for (int j = 0; j < 21; j++) {
				if (dp[i][j] > 0) {
					if (j + number[i] < 21)
						dp[i + 1][j + number[i]] += dp[i][j];
					if (j - number[i] >= 0)
						dp[i + 1][j - number[i]] += dp[i][j];
				}
			}
		}
		System.out.println(dp[n - 1][number[n - 1]]);
		sc.close();
	}
}

Compiler output:
Main.java:31: error: class, interface, enum, or record expected
import java.util.Scanner;
^
1 error
Language: Java

import java.util.Scanner;

// First Grader
public class Main {
	public static void main(String[] args) {
		new Main2().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] number = new int[n];
		for (int i = 0; i < n; i++)
			number[i] = sc.nextInt();
		long[][] dp = new long[n][21];
		dp[0][0] = 1;
		for (int i = 0; i < n - 1; i++) {
			for (int j = 0; j < 21; j++) {
				if (dp[i][j] > 0) {
					if (j + number[i] < 21)
						dp[i + 1][j + number[i]] += dp[i][j];
					if (j - number[i] >= 0)
						dp[i + 1][j - number[i]] += dp[i][j];
				}
			}
		}
		System.out.println(dp[n - 1][number[n - 1]]);
		sc.close();
	}
}
import java.util.Scanner;

// First Grader
public class Main2 {
	public static void main(String[] args) {
		new Main2().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] number = new int[n];
		for (int i = 0; i < n; i++)
			number[i] = sc.nextInt();
		long[][] dp = new long[n][21];
		dp[0][0] = 1;
		for (int i = 0; i < n - 1; i++) {
			for (int j = 0; j < 21; j++) {
				if (dp[i][j] > 0) {
					if (j + number[i] < 21)
						dp[i + 1][j + number[i]] += dp[i][j];
					if (j - number[i] >= 0)
						dp[i + 1][j - number[i]] += dp[i][j];
				}
			}
		}
		System.out.println(dp[n - 1][number[n - 1]]);
		sc.close();
	}
}

Compiler output:
Main.java:31: error: class, interface, enum, or record expected
import java.util.Scanner;
^
1 error
Language: Java

import java.util.Scanner;

// First Grader
public class Main {
	public static void main(String[] args) {
		new Main2().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] number = new int[n];
		for (int i = 0; i < n; i++)
			number[i] = sc.nextInt();
		long[][] dp = new long[n][21];
		dp[0][0] = 1;
		for (int i = 0; i < n - 1; i++) {
			for (int j = 0; j < 21; j++) {
				if (dp[i][j] > 0) {
					if (j + number[i] < 21)
						dp[i + 1][j + number[i]] += dp[i][j];
					if (j - number[i] >= 0)
						dp[i + 1][j - number[i]] += dp[i][j];
				}
			}
		}
		System.out.println(dp[n - 1][number[n - 1]]);
		sc.close();
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		new Main2().run();
		    ^
  symbol:   class Main2
  location: class Main
1 error
Language: C

#include<stdio.h>
int main(void) {
	longlong kaz[101][21] = { 0 };
	int n,su[101];
	int i,j;
	scanf("%d", &n);
	for (i = 0;i < n;i++) {
		scanf("%d", &su[i]);
	}
	kaz[0][su[0]]++;
	for (i = 1;i < n - 1;i++) {
		for (j = 0;j < 21;j++) {
			if (kaz[i-1][j] >= 1) {
				if (j + su[i] < 21) {
					kaz[i][j + su[i]] += kaz[i - 1][j];
				}
				if (j - su[i] >= 0) {
					kaz[i][j - su[i]] += kaz[i - 1][j];
				}
			}
		}
	}
	printf("%lld\n", kaz[n - 2][su[n - 1]]);
	for (i = 0;i < n;i++) {
		for (j = 0;j < 21;j++) {
			printf("%lld", kaz[i][j]);
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:9: error: unknown type name 'longlong'
    3 |         longlong kaz[101][21] = { 0 };
      |         ^~~~~~~~
Language: C

a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}
      |   ^~~~
main.c: In function 'main':
main.c:1:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}
      |          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}
main.c:1:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}
      |          ^~~~~
main.c:1:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:25: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}
      |                         ^~~~
main.c:1:25: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:1:49: error: invalid operands to binary - (have 'int' and 'char *')
    1 | a;main(){scanf("%d",&a);puts(a-=20?a-=20?a-=10?a-=40?"671013170798012928":"31320243434344576":"1671496112":"3443144":"488");}
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                          |
      |                                                                          char *
Language: C

#include<cstdio>

int i,j,k,n;
long long int a[110][25],x;
//long long int b;

int main(){
	scanf("%d%lld",&n,&x);
	for(i=0;i<n-1;i++)for(j=0;j<=20;j++)a[i][j]=0;
	a[0][x]=1;
	for(i=1;i<n-1;i++){
		scanf("%lld",&x);
		for(j=0;j<=20;j++){
			if(a[i-1][j]>0){
				if(j+x<=20 && j+x>=0)a[i][j+x]+=a[i-1][j];
				if(j-x<=20 && j-x>=0)a[i][j-x]+=a[i-1][j];
			}
		}
	}
	scanf("%lld",&x);
	printf("%lld",a[n-2][x]);
	
	return 0;
}

Compiler output:
main.c:1:9: fatal error: cstdio: No such file or directory
    1 | #include<cstdio>
      |         ^~~~~~~~
compilation terminated.
Language: C

#include<iostream>
long long a[2][40],i,n,j;main(){for(a[1][9]=1;std::cin>>n;++i)for(j=8;i&&++j-30;)a[~i&1][j]=a[i&1][j-n]+a[i&1][j+n];std::cout<<a[~i&1][n+9]<<'\n';}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.