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

#include <iostream>
#include <cstdio>
#include <map>
#include <deque>
using namespace std;

long long d[100000];
long long h[100000];
long long s[100000];
int main(){
	long long N,H,mx;
	cin >> N >> H;
	mx = H;
	for(int i = 0 ; i < N-1 ; i++){
		cin >> d[i] >> h[i];
		s[i+1] = s[i] + d[i];
	}
	
	int ans = 0;
	deque<int> Q;
	for(int i = 0 ; i < N-1 ; i++){

		//if( i > 10 ) return 0;
		//cout << "s" << i << " " << H << " " << ans << endl;
		while( Q.size() && h[Q.back()] <= h[i]) Q.pop_back();
		Q.push_back(i);
		while( Q.size() && s[i] - s[Q.front()] > mx) Q.pop_front();
		//for(int j = 0 ; j < Q.size() ; j++) cout << h[Q[j]] << " (" << Q[j] << "," << mx - (s[i]-s[Q[j]]) << ") ";cout << endl;
		if( H <= d[i] ){
			for(int j = 0 ; j < Q.size() ; j++){
				long long heal_max = max(0ll, mx - (s[i] - s[Q[j]]) - H );
				
				//cout << i << " " << Q[j] << " " << s[i] << " " << s[Q[j]] << " " << H << " " << heal_max << endl;
				long long need = d[i] - H + 1;
				long long use = min(need,heal_max) / h[Q[j]];
				//cout << Q[j] << " : " << need << " <========== " << " " << heal_max << endl;
				//if( use == 0 ) continue;
				H += use * h[Q[j]];
				//H = min(H,mx - (s[i] - s[Q[j]]));
				ans += use;
				if( H > d[i] ) break;
				
				if( j+1 >= Q.size() || mx - (s[i] - s[Q[j]]) - H >= h[Q[j+1]] ){
					//cout << H << " " << heal_max << endl;
					ans++;
					H = min( H + h[Q[j]], mx - (s[i] - s[Q[j]]) );
					flag = 1;
				}
				if( H > d[i] ) break;
			}
		}
		H -= d[i];
		if( H <= 0 ){
			cout << -1 << endl;
			return 0;
		}
	}
	cout << ans << endl;
}

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

//Bokan ga bokka--nn!!
//Daily Lunch Special Tanoshii !!
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <deque>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
typedef long long ll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
#define s(x) scanf("%d",&x)
#define rep(i,x) for(int i=0;i<x;i++)
int main()
{
	int n;
	ll maxv;
	scanf("%d %lld",&n,&maxv);
	ll totv=maxv;
	ll totd=0LL;
	deque<pair<ll,ll> >deq;
	ll ret=0LL;
	for(int i=0;i<n;i++)
	{
		ll a,b;
		scanf("%lld %lld",&a,&b);
		while(!deq.empty() && deq.back().first<=b) deq.pop_back();
		deq.push(mp(b,totd));
		totd+=a;
		if(totv<totd)
		{
			while(totv+totd+deq.front().first-deq.front().second>maxv) deq.pop_front();
			ll kai=deq.front().first;
			ll prev=deq.front().second;
			ret+=(maxv-(totv+totd-prev))/kai;
			totv+=((maxv-(totv+totd-prev))/kai)*kai;
		}
	}
	printf("%lld\n",ret);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:21: error: 'class std::deque<std::pair<long long int, long long int> >' has no member named 'push'
   43 |                 deq.push(mp(b,totd));
      |                     ^~~~
Language: Java

import java.io.*;
import java.util.*;

public class TotalTimes {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        int sec = 0;
        for (int i = 0; i < 4; i++)
            sec += Integer.parseInt(sc.nextLine());
        System.out.println(sec / 60);
        System.out.println(sec % 60);
    }
}

Compiler output:
Main.java:4: error: class TotalTimes is public, should be declared in a file named TotalTimes.java
public class TotalTimes {
       ^
1 error
Language: C

#include<stdio.h>
int main(){
  int a,b,c,d,x,y;
  scanf("%d %d %d %d",&a,&b,&c,%d);
  x=(a+b+c+d)/60;
  y=(a+b+c+d)%60;
  printf("%d\n",x);
  printf("%d\n",y);
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:4:32: error: expected expression before '%' token
    4 |   scanf("%d %d %d %d",&a,&b,&c,%d);
      |                                ^
Language: C

#include<stdio.h>
int main(void)
{
  int a,x=0,i;
  for (i=0;i<4;i++)
    {
     scanf("%d",&a)
     x=x+a;
    }
  a=x/60
  i=x%60
  printf("%d\n%d\n",a,i);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: expected ';' before 'x'
    7 |      scanf("%d",&a)
      |                    ^
      |                    ;
    8 |      x=x+a;
      |      ~              
main.c:10:9: error: expected ';' before 'i'
   10 |   a=x/60
      |         ^
      |         ;
   11 |   i=x%60
      |   ~
Language: C

#include<stdio.h>
int main(void)
{
  int a,x=0,i;
  for (i=0;i<4;i++)
    {
     scanf("%d",&a)
     x=x+a;
    }
  a=x/60;
  i=x%60;
  printf("%d\n%d\n",a,i);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:20: error: expected ';' before 'x'
    7 |      scanf("%d",&a)
      |                    ^
      |                    ;
    8 |      x=x+a;
      |      ~
Language: C

#include<stdio.h>
int main(void){
	int a,b=0,i;
	for(i=0;i<4;i++){
		scanf("%d"&a);
		b+=a;
	}
	printf("%d\n%d\n",b/60,b%60);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:27: error: invalid operands to binary & (have 'char *' and 'int')
    5 |                 scanf("%d"&a);
      |                       ~~~~^
      |                       |
      |                       char *
Language: C

#include <stdio.h>
#include <cstring>

int main(){
  int i1[2] = {0};
  int ansers[5] = {0};
  int total = 1;
 
  for(int n = 0;n < 6; n++){
    scanf("%d",&total);
    if(total == 0){
      for(int x = 0; x < n; x++) printf("%d\n",ansers[x]); 
      return 0;
    }
    memset(i1,0,sizeof(i1));

    for(int n = 0; n < 9; n++){
      scanf("%d",&i1[1]);
      i1[0] += i1[1];
    }
    ansers[n] = total - i1[0];
  }
}

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

#include<stdio.h>
int main(){
int time[4];
int i;
for(i=0;i<4;i++){
  scanf("%d",time[i]);
}
int x;
x = time[0]+time[1]+time[2]+time[3];
x>=60 && x<=3599;
x %= 60
int a;
a = x
x = time[0]+time[1]+time[2]+time[3];
x -=a
x /= 60
printf("#d\n",x);
printf("#d\n",a);
}

Compiler output:
main.c: In function 'main':
main.c:11:8: error: expected ';' before 'int'
   11 | x %= 60
      |        ^
      |        ;
   12 | int a;
      | ~~~     
main.c:13:1: error: 'a' undeclared (first use in this function)
   13 | a = x
      | ^
main.c:13:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:6: error: expected ';' before 'x'
   13 | a = x
      |      ^
      |      ;
   14 | x = time[0]+time[1]+time[2]+time[3];
      | ~     
main.c:15:6: error: expected ';' before 'x'
   15 | x -=a
      |      ^
      |      ;
   16 | x /= 60
      | ~
Language: C

#include<stdio.h>
int main(void){
	int time[4];
	int i;
	for(i=0;i<4;i++){
		scanf("%d",time[i]);
	}
	int x;
	x = time[0]+time[1]+time[2]+time[3];
	x %= 60;
	int a;
	a = x;
	y = time[0]+time[1]+time[2]+time[3];
	y -= a;
	y /= 60;
	printf("#d\n",y);
	printf("#d\n",a);
	return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'y' undeclared (first use in this function)
   13 |         y = time[0]+time[1]+time[2]+time[3];
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

 int main(void){
    int time[4];
    int i;
    for(i=0;i<=3;i++){
        scanf("%d\n",time[i]);
    }
    int x;
    x = time[0]+time[1]+time[2]+time[3];
    a = x/60;
    b = x%60;
    printf("%d\n",a);
    printf("%d\n",b);
    return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'a' undeclared (first use in this function)
   11 |     a = x/60;
      |     ^
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:5: error: 'b' undeclared (first use in this function)
   12 |     b = x%60;
      |     ^
Language: C

#include<stdio.h>

 int main(void){
    int i;
    int a;
    int b;
    int c;
    int d;
    for(i=0;i<=3;i++){
        scanf("%d%d%d%d",a,b,c,d);
    }
    int x;
    x = time[0]+time[1]+time[2]+time[3];
    int e,f;
    e = x/60;
    f = x%60;
    printf("%d\n",e);
    printf("%d\n",f);
    return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'time' undeclared (first use in this function)
   13 |     x = time[0]+time[1]+time[2]+time[3];
      |         ^~~~
main.c:2:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>'
    1 | #include<stdio.h>
  +++ |+#include <time.h>
    2 | 
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
   13 |     x = time[0]+time[1]+time[2]+time[3];
      |         ^~~~
Language: C

#include<stdio.h>
int main(void){
    int a[4];
    int x;
for(i=0;i<=3;i++){
    scanf("%d",a[i]);
    x += a[i];
}
    printf("%d/n%d/n",x/60,x%60);
    return 0;
}  

Compiler output:
main.c: In function 'main':
main.c:5:5: error: 'i' undeclared (first use in this function)
    5 | for(i=0;i<=3;i++){
      |     ^
main.c:5:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
    int a[4];
    int x,i;
for(i=0;i<=3;i++){
    scanf("%d",a[i]);
    x += a[i];
}
    printf("%d/n%d/n",x/60,x%%60);
    return 0;
}  

Compiler output:
main.c: In function 'main':
main.c:9:30: error: expected expression before '%' token
    9 |     printf("%d/n%d/n",x/60,x%%60);
      |                              ^
Language: C

#include<stdio.h>
int main(){
int a[4];
int x;i;
x = 0;
for(i=0;i<4;i++){
scanf("%d",a[i]);
x += a[i];
}
printf("%d/n%d/n",x/60,x%60);
return 0;
}  

Compiler output:
main.c: In function 'main':
main.c:4:7: error: 'i' undeclared (first use in this function)
    4 | int x;i;
      |       ^
main.c:4:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
int a[4];
int x,i;
x = 0;
for(i=0;i<4;i++){
scanf("%d",a[i]);
x = x+a[i];
}
printf("%d/n",&x/60);
printf("%d/n",&x%60);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:17: error: invalid operands to binary / (have 'int *' and 'int')
   10 | printf("%d/n",&x/60);
      |               ~~^
      |               |
      |               int *
main.c:11:17: error: invalid operands to binary % (have 'int *' and 'int')
   11 | printf("%d/n",&x%60);
      |               ~~^
      |               |
      |               int *
Language: C

#include<stdio.h>

int main(){
  int x = 0, i, t;
  for(i = 0;i < 4;i++){
    scanf("%d", &t);
    x += t;
  }
  printf("%d\n%d\n", x / 60, x % 60)
}

Compiler output:
main.c: In function 'main':
main.c:9:37: error: expected ';' before '}' token
    9 |   printf("%d\n%d\n", x / 60, x % 60)
      |                                     ^
      |                                     ;
   10 | }
      | ~
Language: C

#include <stdio.h>

int main()
{
	int sec;
	int min;
	int total_sec=0, total_min=0;
	int i;
	for(i=0; i<4; i++){
		scanf("%d", &sec);
		total_sec += sec;
	}
	while(total_sec>=60){
		total_min+++
		total_sec-=60;
	}
	printf("%d\n%d\n", total_min, total_sec);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:26: error: lvalue required as left operand of assignment
   15 |                 total_sec-=60;
      |                          ^~
Language: C

#include <stdio.h>

int main()
{
	int sec;
	int total_sec=0, total_min=0;
	int i;
	for(i=0; i<4; i++){
		scanf("%d", &sec);
		total_sec += sec;
	}
	while(total_sec>=60){
		total_min+++
		total_sec-=60;
	}
	printf("%d\n%d\n", total_min, total_sec);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:26: error: lvalue required as left operand of assignment
   14 |                 total_sec-=60;
      |                          ^~
Language: C

#include <stdio.h>

int main(){
int i,sum=0,byo[4];
int hun,byo;
for(i=0;i<4;i++){
scanf("%d",&byo[i]);
sum+=byo[i];
}
hun=sum/60;
byo=sum%60;

printf("%d\n",hun);
printf("%d\n",byo);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: conflicting types for 'byo'; have 'int'
    5 | int hun,byo;
      |         ^~~
main.c:4:13: note: previous declaration of 'byo' with type 'int[4]'
    4 | int i,sum=0,byo[4];
      |             ^~~
Language: C++

#include<stdio.h>
int main(void)
{
	int a,b,c,d,x,y,z,ans;
	scanf(%d %d %d %d",&a,&b,&c,&d);
	x=a+b+c+d;
	y=x/60;
	z=x%60;
	printf("%d\n",y);
	printf("%d\n",z);
	return 0;
}


Compiler output:
a.cc:5:26: warning: missing terminating " character
    5 |         scanf(%d %d %d %d",&a,&b,&c,&d);
      |                          ^
a.cc:5:26: error: missing terminating " character
    5 |         scanf(%d %d %d %d",&a,&b,&c,&d);
      |                          ^~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:15: error: expected primary-expression before '%' token
    5 |         scanf(%d %d %d %d",&a,&b,&c,&d);
      |               ^
Language: C++

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

int main(){
	int ans=0, a;
	for(int i=0; i<4; ++i){
		scanf(" %d", &a);
		ans += a;
	}
	
	int x=ans/60;
	ans-=x*60;
	
	printf("%d\n%d\n", x, ans);3151

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:40: error: expected ';' before 'return'
   15 |         printf("%d\n%d\n", x, ans);3151
      |                                        ^
      |                                        ;
   16 | 
   17 |         return 0;
      |         ~~~~~~
Language: C++

#include<string>
#include<cstdio>
#include<cctype>
#include<iostream>
#include <algorithm>
#include<cmath>
#include<queue>
using namespace std;

int main(){
        int second[5]={0}, ans[3];
        cin >>a[1]>>a[2]>>a[3]>>a[4];
        ans[2]=a[1]+a[2]+a[3]+a[4];
        ans[1]=ans[3]/60;
        ans[2]%=60;
        cout <<ans[1]<<"\n"<<ans[2]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'a' was not declared in this scope
   12 |         cin >>a[1]>>a[2]>>a[3]>>a[4];
      |               ^
Language: C++

int main() {
	int t,sum=0,m,s;
	for(int i=1; i<=4; i++){
		cin>>t;
		sum+=t;
	}
	m=sum/60;
	s=sum-60*m;

	cout<<m<<endl<<s<<endl;	
		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'cin' was not declared in this scope
    4 |                 cin>>t;
      |                 ^~~
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout<<m<<endl<<s<<endl;
      |         ^~~~
a.cc:10:18: error: 'endl' was not declared in this scope
   10 |         cout<<m<<endl<<s<<endl;
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;int a,sum;
main(){for(int i=0i<4;i++){cin>>a;sum+=a;}cout<<a/60<<endl<<a%60<<endl;}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){for(int i=0i<4;i++){cin>>a;sum+=a;}cout<<a/60<<endl<<a%60<<endl;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:20: error: invalid operands of types '__complex__ int' and 'int' to binary 'operator<'
    3 | main(){for(int i=0i<4;i++){cin>>a;sum+=a;}cout<<a/60<<endl<<a%60<<endl;}
a.cc:3:26: error: expected ';' before ')' token
    3 | main(){for(int i=0i<4;i++){cin>>a;sum+=a;}cout<<a/60<<endl<<a%60<<endl;}
      |                          ^
      |                          ;
Language: C++

#include<iostream>
using namespase std;
int mian()
{
int a;
int sum=0;
int x,y;
int i;

for(i=0;i<4;i++)
{
cin >> a;
sum+=a;
}

x=sum/60;
sum%=60;
y=sum;

cout << x << endl;
cout << y << endl;

return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int mian()':
a.cc:12:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 | cin >> a;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:20:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 | cout << x << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 | cout << x << endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int mian()
{
int a;
int sum=0;
int x,y;
int i;

for(i=0;i<4;i++)
{
cin >> a;
sum+=a;
}

x=sum/60;
sum%=60;
y=sum;

cout << x << endl;
cout << y << endl;

return 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++

a;main(i){while(~scanf("%d",&i))a+=i;printf("%d\n%d\n",a/60,a%60);}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a;main(i){while(~scanf("%d",&i))a+=i;printf("%d\n%d\n",a/60,a%60);}
      | ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
    1 | a;main(i){while(~scanf("%d",&i))a+=i;printf("%d\n%d\n",a/60,a%60);}
      |       ^
Language: C++

int a;main(i){while(~scanf("%d",&i))a+=i;printf("%d\n%d\n",a/60,a%60);}

Compiler output:
a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token
    1 | int a;main(i){while(~scanf("%d",&i))a+=i;printf("%d\n%d\n",a/60,a%60);}
      |           ^
Language: C++

i;main(j){for(;~scanf("%d",&j)||!printf("%d\n%d\n",i/60,i%60);)i+=j;}

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i;main(j){for(;~scanf("%d",&j)||!printf("%d\n%d\n",i/60,i%60);)i+=j;}
      | ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
    1 | i;main(j){for(;~scanf("%d",&j)||!printf("%d\n%d\n",i/60,i%60);)i+=j;}
      |       ^
Language: C++

s;main(t){for(;~scanf("%d",&t);s+=t);printf("%d\n%d\n",s/60,s%60);exit(0);}

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s;main(t){for(;~scanf("%d",&t);s+=t);printf("%d\n%d\n",s/60,s%60);exit(0);}
      | ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
    1 | s;main(t){for(;~scanf("%d",&t);s+=t);printf("%d\n%d\n",s/60,s%60);exit(0);}
      |       ^
Language: C++

i;main(j){while(~scanf("%d",&j))i+=j;!printf("%d\n%d\n",i/60,i%60);}

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i;main(j){while(~scanf("%d",&j))i+=j;!printf("%d\n%d\n",i/60,i%60);}
      | ^
a.cc:1:7: error: expected constructor, destructor, or type conversion before '(' token
    1 | i;main(j){while(~scanf("%d",&j))i+=j;!printf("%d\n%d\n",i/60,i%60);}
      |       ^
Language: C++

main(s,i){return~scanf("%d",&i)?main(s+i):!printf("%d\n%d\n",s/60,s%60);}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(s,i){return~scanf("%d",&i)?main(s+i):!printf("%d\n%d\n",s/60,s%60);}
      |     ^
Language: C++

int main(){int a,b,c,d;scanf("%d%d%d%d",&a,&b,&c,&d);a+=b+c+d;printf("%d\n%d\n",a/60,a%60);}

Compiler output:
a.cc: In function 'int main()':
a.cc:1:24: error: 'scanf' was not declared in this scope
    1 | int main(){int a,b,c,d;scanf("%d%d%d%d",&a,&b,&c,&d);a+=b+c+d;printf("%d\n%d\n",a/60,a%60);}
      |                        ^~~~~
a.cc:1:63: error: 'printf' was not declared in this scope
    1 | int main(){int a,b,c,d;scanf("%d%d%d%d",&a,&b,&c,&d);a+=b+c+d;printf("%d\n%d\n",a/60,a%60);}
      |                                                               ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){int a,b,c,d;scanf("%d%d%d%d",&a,&b,&c,&d);a+=b+c+d;printf("%d\n%d\n",a/60,a%60);}
Language: C++

#include<cstdio>

int main(){
int res=0,t;
for(int i=0;i<4;i++){
 scanf("%d",&t);
 res+=t
}
printf("%d\n%d\n",res/60,res%60);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before '}' token
    7 |  res+=t
      |        ^
      |        ;
    8 | }
      | ~
Language: C++

#include<cstdio>

int main(){
int res=0,t;
for(int i=0;i<4;i++){
 scanf("%d",&t);
 res+=t
}
printf("%d\n%d\n",res/60,res%60);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before '}' token
    7 |  res+=t
      |        ^
      |        ;
    8 | }
      | ~
Language: C++

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int sum = 0;

    for(int i=0;i<4;i++){
      sum += sc.nextInt();
    }
    System.out.println(sum/60);
    System.out.println(sum%60);
  }
}

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++

#incloud<stdio.h>

int main(){
int a,b,c,d,sum;
scanf("%d%d%d%d",&a,&b,&c,&d);
sum = a+b+c+d;
printf("%d\n%d",sum%60,sum/60);
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incloud; did you mean #include?
    1 | #incloud<stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:1: error: 'scanf' was not declared in this scope
    5 | scanf("%d%d%d%d",&a,&b,&c,&d);
      | ^~~~~
a.cc:7:1: error: 'printf' was not declared in this scope
    7 | printf("%d\n%d",sum%60,sum/60);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #incloud<stdio.h>
Language: C++

#include "stdafx.h"

int main (){
	int a,b,c,d;
	scanf("%d%d%d%d", &a, &b, &c, &d);
	a=a+b+c+d;
	printf("%d\n%d", a/60, a%60);
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

int main (void){
	int a,b,c,d;
	scanf("%d%d%d%d", &a, &b, &c, &d);
	a=a+b+c+d;
	printf("%d\n%d", a/60, a%60);
}

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

#include <stdio.h>
   int main(void){
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    int i;
    int x;
    scanf('%d%d%d%d',&a,&b,&c,&d);
    x = a+b+c+d;
    e = x/60;
    f = x%60;
    printf('%d\n',&e);
    printf('%d\n',&f);
    return 0;
} 

Compiler output:
a.cc:11:11: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   11 |     scanf('%d%d%d%d',&a,&b,&c,&d);
      |           ^~~~~~~~~~
a.cc:15:12: warning: multi-character character constant [-Wmultichar]
   15 |     printf('%d\n',&e);
      |            ^~~~~~
a.cc:16:12: warning: multi-character character constant [-Wmultichar]
   16 |     printf('%d\n',&f);
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:11:11: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   11 |     scanf('%d%d%d%d',&a,&b,&c,&d);
      |           ^~~~~~~~~~
      |           |
      |           int
In file included from a.cc:1:
/usr/include/stdio.h:428:42: note:   initializing argument 1 of 'int scanf(const char*, ...)'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:15:12: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 |     printf('%d\n',&e);
      |            ^~~~~~
      |            |
      |            int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:16:12: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 |     printf('%d\n',&f);
      |            ^~~~~~
      |            |
      |            int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int sum = 0;
	for (int i = ; i < 4; i++) {
		int x;
		cin >> x;
		sum += x;
	}
	cout << sum / 60 << endl;
	cout << sum % 60 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: expected primary-expression before ';' token
    6 |         for (int i = ; i < 4; i++) {
      |                      ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int a;
cin >>a;
int b;
cin >>b;
int c;
cin >>c;
int d;
cin >>d;
int e;
e=a+b+c+d;
int f;
f=0;
while(e=>60){
f=f+1;
e=e-60;}
cout << e<<endl;
cout << f<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: expected primary-expression before '>' token
   17 | while(e=>60){
      |         ^
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a, b, c, d;
    int total = 0;
    cin >> a >> b >> c >> d;
    total = a + b + c + d;
    int m, s
    s = total % 60;
    m = total / 60;

    cout << m << endl << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected initializer before 's'
   11 |     s = total % 60;
      |     ^
a.cc:14:26: error: 's' was not declared in this scope
   14 |     cout << m << endl << s << endl;
      |                          ^
Language: C++

#include <iostream>
int main()
{
int a,b,c,d;
cin >> a >> b >> c >> d;
int sum=0;
sum=a+b+c+d;
cout << sum/60 << endl;
cout << sum%60 << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin >> a >> b >> c >> d;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 | cout << sum/60 << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 | cout << sum/60 << endl;
      |                   ^~~~
      |                   std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;
class Main{
    public static void main(String[] args)
    {
	Scanner in = new Scanner(System.in);
	String s,s2;
	int n,de=0;
	s = in.next();
	n = in.nextInt();
	for(int i=0;i<n;i++)
	    {
		s2 = in.next();
		int ln = s2.length();
s2 = s2 + s2;
		while(ln*2-- > 0)
		    {

			if(s2.contains(s))
			    {
				de++;
				break;
			    }
			
		    }
	    }
	System.out.println(de);
    }
} //Res***2Dツつウツづアツづ個づーツ参ツ考

Compiler output:
Main.java:15: error: unexpected type
		while(ln*2-- > 0)
		         ^
  required: variable
  found:    value
1 error
Language: Java

import java.util.*;

public class MainA {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int n = sc.nextInt();
		String[] strs = new String[n];
		String[] strss = new String[n];
		for (int i = 0; i < n; i++) {
			strs[i] = sc.next();
			strss[i] = strs[i] + strs[i];
		}
		int r = 0;
		for (int i = 0; i < n; i++)
			if (strss[i].contains(str))
				r++;
		System.out.println(r);
		sc.close();
	}
}

Compiler output:
Main.java:3: error: class MainA is public, should be declared in a file named MainA.java
public class MainA {
       ^
1 error
Language: Java

import java.io.*;
import java.util.*;

public class Ring {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int n = Integer.parseInt(sc.nextLine()), res = 0;
        for (int i = 0; i < n; i++) {
            String ring = sc.nextLine();
            ring += ring;
            if (ring.contains(s)) {
                res += 1;
                continue;
            }
        }
        System.out.println(res);
    }
}

Compiler output:
Main.java:4: error: class Ring is public, should be declared in a file named Ring.java
public class Ring {
       ^
1 error
Language: C

#include<stdio.h>
#include<string.h>
int main(){
char ch[11];
char *p;
int n,i;
int sum=0;
scanf("%s\n%d\n",&ch,&n);
char ring[n][21];
for(i=0;i<n;i++){
scanf("%s\n",&ring[i]);
ring[n+i]=ring[i];
}
for(i=0;i<n;i++){
if(strchr(ring[n],ch)==1)sum++;
}
printf("%d\n",sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:10: error: assignment to expression with array type
   12 | ring[n+i]=ring[i];
      |          ^
main.c:15:19: error: passing argument 2 of 'strchr' makes integer from pointer without a cast [-Wint-conversion]
   15 | if(strchr(ring[n],ch)==1)sum++;
      |                   ^~
      |                   |
      |                   char *
In file included from main.c:2:
/usr/include/string.h:246:43: note: expected 'int' but argument is of type 'char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                                       ~~~~^~~
main.c:15:22: warning: comparison between pointer and integer
   15 | if(strchr(ring[n],ch)==1)sum++;
      |                      ^~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
char ch[11];
int n,i;
int sum=0;
int ring[21];
int ring2[21];
scanf("%s\n%d\n",&ch,&n);
for(i=0;i<n;i++){
scanf("%s\n",&ring);
ring2 = ring;
strcat(ring,ring2);
if(strchr(ring,ch)==1)sum++;
}
printf("%d\n",sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: assignment to expression with array type
   12 | ring2 = ring;
      |       ^
main.c:13:8: error: passing argument 1 of 'strcat' from incompatible pointer type [-Wincompatible-pointer-types]
   13 | strcat(ring,ring2);
      |        ^~~~
      |        |
      |        int *
In file included from main.c:2:
/usr/include/string.h:149:39: note: expected 'char * restrict' but argument is of type 'int *'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                      ~~~~~~~~~~~~~~~~~^~~~~~
main.c:13:13: error: passing argument 2 of 'strcat' from incompatible pointer type [-Wincompatible-pointer-types]
   13 | strcat(ring,ring2);
      |             ^~~~~
      |             |
      |             int *
/usr/include/string.h:149:70: note: expected 'const char * restrict' but argument is of type 'int *'
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |                                               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
main.c:14:11: error: passing argument 1 of 'strchr' from incompatible pointer type [-Wincompatible-pointer-types]
   14 | if(strchr(ring,ch)==1)sum++;
      |           ^~~~
      |           |
      |           int *
/usr/include/string.h:246:34: note: expected 'const char *' but argument is of type 'int *'
  246 | extern char *strchr (const char *__s, int __c)
      |                      ~~~~~~~~~~~~^~~
main.c:14:16: error: passing argument 2 of 'strchr' makes integer from pointer without a cast [-Wint-conversion]
   14 | if(strchr(ring,ch)==1)sum++;
      |                ^~
      |                |
      |                char *
/usr/include/string.h:246:43: note: expected 'int' but argument is of type 'char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                                       ~~~~^~~
main.c:14:19: warning: comparison between pointer and integer
   14 | if(strchr(ring,ch)==1)sum++;
      |                   ^~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
char ch[11];
int n,i;
int sum=0;
char ring[21];
char ring2[21];
scanf("%s\n%d\n",&ch,&n);
for(i=0;i<n;i++){
scanf("%s\n",&ring);
ring2 = ring;
strcat(ring,ring2);
if(strchr(ring,ch)==1)sum++;
}
printf("%d\n",sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: assignment to expression with array type
   12 | ring2 = ring;
      |       ^
main.c:14:16: error: passing argument 2 of 'strchr' makes integer from pointer without a cast [-Wint-conversion]
   14 | if(strchr(ring,ch)==1)sum++;
      |                ^~
      |                |
      |                char *
In file included from main.c:2:
/usr/include/string.h:246:43: note: expected 'int' but argument is of type 'char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                                       ~~~~^~~
main.c:14:19: warning: comparison between pointer and integer
   14 | if(strchr(ring,ch)==1)sum++;
      |                   ^~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
char ch[11];
int n,i;
int sum=0;
char ringa[21];
char ringb[21];
scanf("%s\n%d\n",&ch,&n);
for(i=0;i<n;i++){
scanf("%s\n",&ringa);
ringb = ringa;
strcat(ringa,ringb);
if(strchr(ringa,ch)==1)sum++;
}
printf("%d\n",sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: assignment to expression with array type
   12 | ringb = ringa;
      |       ^
main.c:14:17: error: passing argument 2 of 'strchr' makes integer from pointer without a cast [-Wint-conversion]
   14 | if(strchr(ringa,ch)==1)sum++;
      |                 ^~
      |                 |
      |                 char *
In file included from main.c:2:
/usr/include/string.h:246:43: note: expected 'int' but argument is of type 'char *'
  246 | extern char *strchr (const char *__s, int __c)
      |                                       ~~~~^~~
main.c:14:20: warning: comparison between pointer and integer
   14 | if(strchr(ringa,ch)==1)sum++;
      |                    ^~
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
	char a[11],c[11],b[21];
	int i,j,n,c=0;
	scanf("%s",a[11]);
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%s",c[11]);
		for(j=0;j<20;j++){
			if(j<10){
				b[j]=a[j];
			}
			else{
				b[j]=a[j-10];
			}
		}
		if(strstr(b a){
			c++;
		}
	}
	printf("%d",&c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:19: error: conflicting types for 'c'; have 'int'
    5 |         int i,j,n,c=0;
      |                   ^
main.c:4:20: note: previous declaration of 'c' with type 'char[11]'
    4 |         char a[11],c[11],b[21];
      |                    ^
main.c:18:28: error: expected ')' before 'a'
   18 |                 if(strstr(b a){
      |                          ~ ^~
      |                            )
main.c:18:20: error: too few arguments to function 'strstr'
   18 |                 if(strstr(b a){
      |                    ^~~~~~
In file included from main.c:2:
/usr/include/string.h:350:14: note: declared here
  350 | extern char *strstr (const char *__haystack, const char *__needle)
      |              ^~~~~~
main.c:18:31: error: expected ')' before '{' token
   18 |                 if(strstr(b a){
      |                   ~           ^
      |                               )
main.c:21:9: error: expected expression before '}' token
   21 |         }
      |         ^
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:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(int argc,char* argv[]) {
	char searchfor[11];
	int ringnum;
	int i;
	int count;
	char ring[11];
	char ringbuf[21];
	scanf("%s",searchfor);
	scanf("%d",&ringnum);
	count=0;
	for(i=0;i<ringnum;i++) {
		fscanf(in,"%s",ring);
		strcpy(ringbuf,ring);
		strcat(ringbuf,ring);
		if(strstr(ringbuf,searchfor))count++;
	}
	printf("%d\n",count);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:24: error: 'in' undeclared (first use in this function); did you mean 'i'?
   14 |                 fscanf(in,"%s",ring);
      |                        ^~
      |                        i
main.c:14:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:17: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
   15 |                 strcpy(ringbuf,ring);
      |                 ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcpy'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:15:17: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
   15 |                 strcpy(ringbuf,ring);
      |                 ^~~~~~
main.c:15:17: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:16:17: error: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
   16 |                 strcat(ringbuf,ring);
      |                 ^~~~~~
main.c:16:17: note: include '<string.h>' or provide a declaration of 'strcat'
main.c:16:17: warning: incompatible implicit declaration of built-in function 'strcat' [-Wbuiltin-declaration-mismatch]
main.c:16:17: note: include '<string.h>' or provide a declaration of 'strcat'
main.c:17:20: error: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
   17 |                 if(strstr(ringbuf,searchfor))count++;
      |                    ^~~~~~
main.c:17:20: note: include '<string.h>' or provide a declaration of 'strstr'
main.c:17:20: warning: incompatible implicit declaration of built-in function 'strstr' [-Wbuiltin-declaration-mismatch]
main.c:17:20: note: include '<string.h>' or provide a declaration of 'strstr'
Language: C

#include<stdio.h>
#include<string.h>
int main(){
	char a[11];
	char b[21];
	int n;
	int i,j,k;
	bool f,f2;
	int ans=0;
	scanf("%s",a);
	scanf("%d",&n);
	for(i=0;i<n;i++){
		f=false;
		scanf("%s",b);
		for(j=0;j<10;j++)b[j+10]=b[j];
		for(j=0;j<10;j++){
			f2=true;
			for(k=0;k<strlen(a);k++){
				if(a[k]!=b[j+k])f2=false;
			}
			if(f2)f=true;
		}
		if(f)ans++;
	}
	printf("%d\n",ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: unknown type name 'bool'
    8 |         bool f,f2;
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<string.h>
  +++ |+#include <stdbool.h>
    3 | int main(){
main.c:13:19: error: 'false' undeclared (first use in this function)
   13 |                 f=false;
      |                   ^~~~~
main.c:13:19: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:13:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:28: error: 'true' undeclared (first use in this function)
   17 |                         f2=true;
      |                            ^~~~
main.c:17:28: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>

int main(){
char moji[11],moji2[20],moji3[11];
int n,i,j,k,kai=0;

gets(moji);
scanf("%d",&n);
for(i=0;i<n;i++){
gets(moji2);
for(j=0;moji2[j]!='\n';j++){
moji3[j]=moji2[j];
}
moji3[j]='\n';
for(k=0;moji3[k]!='\n';k++.j++){
moji2[j]=moji3[k];
}
moji2[j]='\n'
for(j=0;j<10;j++){
for(k=0;moji[k]==moji[k+j];k++){
if(moji[k]=='\n'){
kai++;
break;
}
}
if(moji[k]=='\n')break;
}
}
printf("%d\n",kai);


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 | gets(moji);
      | ^~~~
      | fgets
main.c:15:27: error: request for member 'j' in something not a structure or union
   15 | for(k=0;moji3[k]!='\n';k++.j++){
      |                           ^
main.c:18:14: error: expected ';' before 'for'
   18 | moji2[j]='\n'
      |              ^
      |              ;
   19 | for(j=0;j<10;j++){
      | ~~~
Language: C

#include <stdio.h>

int main(){
char moji[11]={'\0'},moji2[21]={'\0'},moji3[11]={'\0'};
int n,i,j,k,kai=0,t;

gets(moji);
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%c", &moji2[0]);
scanf("%c", &moji2[1]);
scanf("%c", &moji2[2]);
scanf("%c", &moji2[3]);
scanf("%c", &moji2[4]);
scanf("%c", &moji2[5]);
scanf("%c", &moji2[6]);
scanf("%c", &moji2[7]);
scanf("%c", &moji2[8]);
scanf("%c", &moji2[9]);
moji2[10]='\0'
for(j=0;moji2[j]!='\0';j++){
moji3[j]=moji2[j];
}
moji3[j]='\0';
for(k=0;moji3[k]!='\0';k++,j++){
moji2[j]=moji3[k];
}
moji2[j]='\0';
for(j=0;j<10;j++){
for(k=0;moji[k]==moji2[k+j];k++){
if(moji[k+1]=='\0'){
kai++;
break;
}
}
if(moji[k+1]=='\0')break;
}
}
printf("%d\n",kai);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 | gets(moji);
      | ^~~~
      | fgets
main.c:20:15: error: expected ';' before 'for'
   20 | moji2[10]='\0'
      |               ^
      |               ;
   21 | for(j=0;moji2[j]!='\0';j++){
      | ~~~
Language: C

#include <stdio.h>

int main(){
   char moji[11]={'\0'},moji2[21]={'\0'},moji3[11]={'\0'};
   int n,i=0,j,k,f=0,kai=0,t;

   scanf("%s",moji);
   scanf("%d",&n);
   for(i=0;i<n;i++){
      f=0;
      scanf("%s",moji2);
      for(j=0;j<10;j++){
         moji3[j]=moji2[j];
      }
      moji3[10]='\0';
      for(k=0;moji3[k]!='\0';k++){
         moji2[k+10]=moji3[k];
      }
      moji2[20]='\0';
      for(j=0;j<10;j++){
          for(k=0;moji[k]==moji2[k+j];k++){
          if(moji[k+1]=='\0'){
             f=1;
             break;
            }
         }
        if(moji[k+1]=='\0')break;
        }
      if(f==1){
      kai++;
      }
   printf("%d\n",kai);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:35:1: error: expected declaration or statement at end of input
   35 | }
      | ^
Language: C

#include <stdio.h>

int main(){
   char moji[11]={'\0'},moji2[21]={'\0'},moji3[11]={'\0'};
   int n,i=0,j,k,kai=0,t;

   scanf("%s",moji);
   scanf("%d",&n);
   for(i=0;i<n;i++){
      scanf("%s",moji2);
      for(j=0;j<10;j++){
         moji3[j]=moji2[j];
      }
      moji3[10]='\0';
      for(k=0;moji3[k]!='\0';k++){
         moji2[k+10]=moji3[k];
      }
      moji2[20]='\0';
      for(j=0;j<10;j++){
          for(k=0;moji[k]==moji2[k+j];k++){
          if(moji[k+1]=='\0')break;
         }
        if(moji[k+1]=='\0'){
             kai++;
             j=10;
        }
      }
   printf("%d\n",kai);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C++

#include<string>
using namespace std;

string sample;
int n, counter = 0;

bool solve()
{
	string ring;
	cin >> ring;

	for (int i = 0; i < ring.size(); i++){
		if (ring[i] == sample[0]){
			for (int j = 1; j < sample.size(); j++){
				if (sample[j] != ((ring.size() <= i + j) ? ring[i + j - ring.size()] : ring[i + j])){
					goto wrong;
				}
			}
			return 1;
		}
	wrong:;
	}
	return 0;
}

int main()
{
	cin >> sample >> n;
	for (int i = 0; i < n; i++){
		counter += solve();
	}

	cout << counter << endl;
	return 0;
}

Compiler output:
a.cc: In function 'bool solve()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> ring;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc: In function 'int main()':
a.cc:28:9: error: 'cin' was not declared in this scope
   28 |         cin >> sample >> n;
      |         ^~~
a.cc:28:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:9: error: 'cout' was not declared in this scope
   33 |         cout << counter << endl;
      |         ^~~~
a.cc:33:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:28: error: 'endl' was not declared in this scope
   33 |         cout << counter << endl;
      |                            ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string>


int main(void)
{
	char str[11], ring[100][11];
	int number, str_len;

	scanf("%s", str);
	str_len = strlen(str);
	scanf("%d", &number);
	for (int i = 0; i < number; i++) {
		scanf("%s", ring[i]);
	}

	int ring_count = 0, ring_len;
	for (int i = 0; i < number; i++) {
		ring_len = strlen(ring[i]);
		for (int j = 0; j < ring_len; j++) {
			if (ring[i][j] == str[0]) {
				bool success = true;
				int point = 0;
				for (int k = 1; k < str_len; k++) {
					if (j + k < ring_len) {
						if (ring[i][j + k] != str[k]) {
							success = false;
							break;
						}
					}
					else {
						if (ring[i][point] != str[k]) {
							point++;
							success = false;
							break;
						}
					}
				}

				if (success == true) {
					ring_count++;
					break;
				}
			}
		}
	}

	printf("%d\n", ring_count);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'strlen' was not declared in this scope
   12 |         str_len = strlen(str);
      |                   ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <string>
  +++ |+#include <cstring>
    4 |
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string>


int main()
{
	char str[11], ring[100][11];
	int number, str_len;

	scanf("%s", str);
	str_len = strlen(str);
	scanf("%d", &number);
	for (int i = 0; i < number; i++) {
		scanf("%s", ring[i]);
	}

	int ring_count = 0, ring_len;
	for (int i = 0; i < number; i++) {
		ring_len = strlen(ring[i]);
		for (int j = 0; j < ring_len; j++) {
			if (ring[i][j] == str[0]) {
				bool success = true;
				int point = 0;
				for (int k = 1; k < str_len; k++) {
					if (j + k < ring_len) {
						if (ring[i][j + k] != str[k]) {
							success = false;
							break;
						}
					}
					else {
						if (ring[i][point] != str[k]) {
							point++;
							success = false;
							break;
						}
					}
				}

				if (success == true) {
					ring_count++;
					break;
				}
			}
		}
	}

	printf("%d\n", ring_count);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'strlen' was not declared in this scope
   12 |         str_len = strlen(str);
      |                   ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <string>
  +++ |+#include <cstring>
    4 |