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

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

int main(){
  char ch[201],end[2];
  end="-";
  char **moji;
  int i,j,n,m,leng;
  while(1){
    scanf(" %s",ch);
    if(!strcmp(ch,end)) break;
    scanf(" %d",&m);
    leng=strlen(ch);
    moji=malloc(m*sizeof(char *));
    for(i=0;i<m;i++) moji[i]=malloc((leng+1)*sizeof(char));
    for(i=0;i<m;i++){
      scanf(" %d",&n);
      if(i==0){
         for(j=0;j<leng;j++){
           if(j<n) moji[i][j+leng-n]=ch[j];
           else moji[i][j-n]=ch[j];}}
      else{
        for(j=0;j<leng;j++){
           if(j<n) moji[i][j+leng-n]=moji[i-1][j];
           else moji[i][j-n]=moji[i-1][j];}}
      moji[i][leng]='\0'}
    printf("%s\n",moji[m-1]);}
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: assignment to expression with array type
    7 |   end="-";
      |      ^
main.c:27:25: error: expected ';' before '}' token
   27 |       moji[i][leng]='\0'}
      |                         ^
      |                         ;
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(int argc, const char * argv[]) {
?? ??
???? ??
?? ?? int i,j,shuffle,num,flag = 0,len;
?? ?? char Cards[20001];
???? ??
?? ?? while(1) {
???? ?? ?? ??
?? ?? ?? ?? scanf("%s",Cards);

        if(Cards[0] == ???-???){
	   break;
        }

?? ?? ?? ?? len = strlen(Cards);
???? ?? ?? ??
?? ?? ?? ?? scanf("%d",&shuffle);
???? ?? ?? ??
?? ?? ?? ?? for (i = 0; i < shuffle; i++) {
???? ?? ?? ?? ?? ??
?? ?? ?? ?? ?? ?? scanf("%d",&num);
???? ?? ?? ?? ?? ??
?? ?? ?? ?? ?? ?? flag += num;
???? ?? ?? ?? ?? ??
?? ?? ?? ?? ?? ?? for (i = 0; i < num; i++) {
???? ?? ?? ?? ?? ?? ?? ??Cards[len+i] = Cards[len+numsum+i];
?? ?? ?? ?? ?? ?? }

	   numsum += num;

?? ?? ?? ?? }

        for(i = numsum ; i < numsum+len; i++){
		printf(???%c???,Cards[i]);
        }

	printf(???\n???);
?? ?? }
?? ?? return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: expected expression before '?' token
    6 | ?? ??
      | ^
main.c:9:1: error: expected expression before '?' token
    9 | ?? ?? char Cards[20001];
      | ^
main.c:10:1: error: expected expression before '?' token
   10 | ???? ??
      | ^
main.c:15:25: warning: trigraph ??- ignored, use -trigraphs to enable [-Wtrigraphs]
   15 |         if(Cards[0] == ???-???){
main.c:15:29: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
main.c:41:19: error: stray '\' in program
   41 |         printf(???\n???);
      |                   ^
main.c:41:22: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   41 |         printf(???\n???);
Language: C

#include <string.h>
#include <stdlib.h>
??
int main(void){
	char ch[200];
	int m;
	int h,i,j,k;
	char str[200];

	while(1){
	scanf("%s", ch);
	if(ch[0]=='-')
		break;
	scanf("%d", &m);
	for(i=0; i<m; i++){
		scanf("%d", &h);
		strncpy(str,ch,h);?????????????????? 
		for(j=h; j<strlen(ch); j++){
			ch[j-h] = ch[j];
		}
		for(k=0; k<h; k++){
		ch[strlen(ch)-h+k] = str[k]; 
		}
	}
	printf("%s\n",ch);

	}

	return 0;
}

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
??
int main(void){
	char ch[200];
	int m;
	int h,i,j,k;
	char str[200];

	while(1){
	scanf("%s", ch);
	if(ch[0]=='-')
		break;
	scanf("%d", &m);
	for(i=0; i<m; i++){
		scanf("%d", &h);
		strncpy(str,ch,h);?????????????????? 
		for(j=h; j<strlen(ch); j++){
			ch[j-h] = ch[j];
		}
		for(k=0; k<h; k++){
		ch[strlen(ch)-h+k] = str[k]; 
		}
	}
	printf("%s\n",ch);

	}

	return 0;
}

Compiler output:
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#include <ctype.h>


int main(){

char A[200],ue[200];
int kaisuu,i,h;

while(1){

scanf("%s",&A);
if(hajime[0]=="_"){break;}



scanf("%d",&kaisuu);
for(i=0;i<kaisuu;i++){
    scanf("%d",h);
 strncpy(ue,A,h);

 strncat(ue,A,A);
 strcpy(A,ue);
 }
printf("%s",A);

}


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:4: error: 'hajime' undeclared (first use in this function)
   14 | if(hajime[0]=="_"){break;}
      |    ^~~~~~
main.c:14:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:15: error: passing argument 3 of 'strncat' makes integer from pointer without a cast [-Wint-conversion]
   23 |  strncat(ue,A,A);
      |               ^
      |               |
      |               char *
In file included from main.c:2:
/usr/include/string.h:153:30: note: expected 'size_t' {aka 'long unsigned int'} but argument is of type 'char *'
  153 |                       size_t __n) __THROW __nonnull ((1, 2));
      |                       ~~~~~~~^~~
Language: C

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

int main(){

char A[200],ue[200];
int kaisuu,i,h;

while(1){

scanf("%s",&A);
if(hajime[0]=="_"){break;}



scanf("%d",&kaisuu);
for(i=0;i<kaisuu;i++){
    scanf("%d",h);
 strncpy(ue,A,h);

 strncat(ue,A,A);
 strcpy(A,ue);
 }
printf("%s\n",A);

}


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:4: error: 'hajime' undeclared (first use in this function)
   12 | if(hajime[0]=="_"){break;}
      |    ^~~~~~
main.c:12:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:15: error: passing argument 3 of 'strncat' makes integer from pointer without a cast [-Wint-conversion]
   21 |  strncat(ue,A,A);
      |               ^
      |               |
      |               char *
In file included from main.c:2:
/usr/include/string.h:153:30: note: expected 'size_t' {aka 'long unsigned int'} but argument is of type 'char *'
  153 |                       size_t __n) __THROW __nonnull ((1, 2));
      |                       ~~~~~~~^~~
Language: C

int k,i,h,j,l;



while(1){
    scanf("%s",&A);

    if(A[0]=="_"){break;}

    scanf("%d",&k);

    for(i=0;i<k;i++){
        scanf("%d",&h);

    char b[strlen(A)-h];
    char ue[h];




    for(l=0;l<h;l++){
        ue[l]=A[l];}


    for(j=0;j<strlen(A)-h;j++){
        b[j]=A[j+h];}
  strcat(b,ue);
  strcpy(F,b);
  }
       printf("%s\n",F);}


return 0;
}

Compiler output:
main.c:5:1: error: expected identifier or '(' before 'while'
    5 | while(1){
      | ^~~~~
main.c:33:1: error: expected identifier or '(' before 'return'
   33 | return 0;
      | ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

#include <stdio.h>
#include <string.h>
int main(){

char A[201]={};
char F[201]={};


int k,i,h,j,l;



while(1){
    scanf("%s",&A);

    if(strcmp(A[0],"_")==0){break;}

    scanf("%d",&k);

    for(i=0;i<k;i++){
        scanf("%d",&h);

Compiler output:
main.c: In function 'main':
main.c:16:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |     if(strcmp(A[0],"_")==0){break;}
      |               ~^~~
      |                |
      |                char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:21:9: error: expected declaration or statement at end of input
   21 |         scanf("%d",&h);
      |         ^~~~~
main.c:21:9: error: expected declaration or statement at end of input
main.c:21:9: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
#include <string.h>
int main(){

char A[201]={};
char F[201]={};


int k,i,h,j,l;



while(1){
    scanf("%s",&A);

    if(strcmp(A[0],"_")==0){break;}

    scanf("%d",&k);

    for(i=0;i<k;i++){
        scanf("%d",&h);
    char b[strlen(A)-h];
    char ue[h];




    for(l=0;l<h;l++){
        ue[l]=A[l];}


    for(j=0;j<strlen(A)-h;j++){
        b[j]=A[j+h];}
  strcat(b,ue);
  strcpy(F,b);
  }
       print(f"%s\n",F);}


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   16 |     if(strcmp(A[0],"_")==0){break;}
      |               ~^~~
      |                |
      |                char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:37:8: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   37 |        print(f"%s\n",F);}
      |        ^~~~~
      |        printf
main.c:37:14: error: 'f' undeclared (first use in this function)
   37 |        print(f"%s\n",F);}
      |              ^
main.c:37:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:37:15: error: expected ')' before string constant
   37 |        print(f"%s\n",F);}
      |             ~ ^~~~~~
      |               )
Language: C

#include <string.h>
int main(){

char A[201]={};
char F[201]={};


int k,i,h,j,l;



while(1){
    scanf("%s",&A);

    if(strcmp(A[0],"_")==0){break;}

    scanf("%d",&k);

    for(i=0;i<k;i++){
        scanf("%d",&h);
    char b[strlen(A)-h];
    char ue[h];




    for(l=0;l<h;l++){
        ue[l]=A[l];}


    for(j=0;j<strlen(A)-h;j++){
        b[j]=A[j+h];}
  strcat(b,ue);
  strcpy(F,b);
  }
       print("%s\n",F);}


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   13 |     scanf("%s",&A);
      |     ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include <string.h>
  +++ |+#include <stdio.h>
    2 | int main(){
main.c:13:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   13 |     scanf("%s",&A);
      |     ^~~~~
main.c:13:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:15:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   15 |     if(strcmp(A[0],"_")==0){break;}
      |               ~^~~
      |                |
      |                char
In file included from main.c:1:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:36:8: error: implicit declaration of function 'print' [-Wimplicit-function-declaration]
   36 |        print("%s\n",F);}
      |        ^~~~~
Language: C

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


int main(){

char A[201],B[201];
int i,j,k,l,m,n;
int a,b,ka;


while(1){
scanf("%s",A);
?????? if(A[0]=='_'){break;}
?????? ka=strlen(A);


scanf("%d",&a);
?????? for(i=0;i<a;i++){


scanf("%d",&b);
char C[b],D[ka];


for(j=0;j<b;j++){
?????? C[j]=A[j];}



for(k=0;k<ka-b;k++){
?????? D[k]=A[k+b];
}


strcat(C,D);
strcpy(B,C);

for(n=0;n<ka;n++){
A[n]=B[n];}


}


?????? printf("%s",A);

}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected expression before '?' token
   14 | ?????? if(A[0]=='_'){break;}
      | ^
main.c:19:1: error: expected expression before '?' token
   19 | ?????? for(i=0;i<a;i++){
      | ^
Language: C

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


int main(){

char A[201],B[201];
int i,j,k,l,m,n;
int a,b,ka;


while(1){
scanf("%s",A);
?????? if(A[0]=='_'){break;}
?????? ka=strlen(A);


scanf("%d",&a);
?????? for(i=0;i<a;i++){


scanf("%d",&b);
char C[b],D[ka];


for(j=0;j<b;j++){
?????? C[j]=A[j];}



for(k=0;k<ka-b;k++){
?????? D[k]=A[k+b];
}


strcat(C,D);
strcpy(B,C);

for(n=0;n<ka;n++){
A[n]=B[n];}


}


?????? for(i=0;i<ka;i++){printf("%s",A);}

}
return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected expression before '?' token
   14 | ?????? if(A[0]=='_'){break;}
      | ^
main.c:19:1: error: expected expression before '?' token
   19 | ?????? for(i=0;i<a;i++){
      | ^
Language: C

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


int main(){

char A[201],B[201],D[201];
int i,j,k,l,m,n;
int a,b,ka;


while(1){
scanf("%s",A);
?????? if(A[0]=='_'){break;}
?????? ka=strlen(A);


scanf("%d",&a);
?????? for(i=0;i<a;i++){


scanf("%d",&b);



for(j=0;j<b;j++){
?????? B[j]=A[j];}



for(k=0;k<ka-b;k++){
?????? D[k]=A[k+b];
}


strcat(B,D);


for(n=0;n<ka;n++){
A[n]=B[n];}


}


?????? for(i=0;i<ka;i++){printf("%s",A);}

}
return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected expression before '?' token
   14 | ?????? if(A[0]=='_'){break;}
      | ^
main.c:19:1: error: expected expression before '?' token
   19 | ?????? for(i=0;i<a;i++){
      | ^
Language: C

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


int main(){

char A[201],B[201],D[201];
int i,j,k,l,m,n;
int a,b,ka;


while(1){
scanf("%s",A);
??????if(A[0]=='-'){break;}
?????? ka=strlen(A);


scanf("%d",&a);
?????? for(i=0;i<a;i++){


scanf("%d",&b);



for(j=0;j<b;j++){
?????? B[j]=A[j];}



for(k=0;k<ka-b;k++){
?????? D[k]=A[k+b];
}


strcat(B,D);


for(n=0;n<ka;n++){
A[n]=B[n];}


}


?????? for(i=0;i<ka;i++){printf("%s",A);}

}
return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected expression before '?' token
   14 | ??????if(A[0]=='-'){break;}
      | ^
main.c:19:1: error: expected expression before '?' token
   19 | ?????? for(i=0;i<a;i++){
      | ^
Language: C

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


int main(){

char A[201],B[201];
int k,m,n;
int a,b,i,ka;


while(1){
scanf("%s",A);
??????if(A[0]=='-'){break;}
?????? ka=strlen(A);


scanf("%d",&a);
?????? for(i=0;i<a;i++){


scanf("%d",&b);
strncpy(B,A,b);



for(k=0;k<ka;k++){
?????? A[k-b]=A[k];
}

for(m=0;m<ka-b;m++)
{A[m+b]=B[m];}





}


??????printf("%s",A)

}
return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected expression before '?' token
   14 | ??????if(A[0]=='-'){break;}
      | ^
main.c:19:1: error: expected expression before '?' token
   19 | ?????? for(i=0;i<a;i++){
      | ^
Language: C

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


int main(){

char A[201],B[201];
int k,m,n;
int a,b,i,ka;


while(1){
scanf("%s",A);
??????if(A[0]=='-')break;

?????? ka=strlen(A);


scanf("%d",&a);
?????? for(i=0;i<a;i++){


scanf("%d",&b);
strncpy(B,A,b);



for(k=0;k<ka;k++){
?????? A[k-b]=A[k];
}

for(m=0;m<ka-b;m++)
{A[m+b]=B[m];}
}
??????printf("%s",A);

}
return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected expression before '?' token
   14 | ??????if(A[0]=='-')break;
      | ^
main.c:16:1: error: expected expression before '?' token
   16 | ?????? ka=strlen(A);
      | ^
main.c:20:1: error: expected expression before '?' token
   20 | ?????? for(i=0;i<a;i++){
      | ^
Language: C

#include <stdio.h>
#include <string.h>
int main(int argc, const char * argv[]){
    int m, i, j, count;
    char card[201], copy[201];
    
    while(1){
        scanf("%s",card);
        count = (char)strlen(card);
        if( card[0] == '0' ){
            break;
        }
        scanf("%d",&m);
        for( i = 0 ; i < m ; i++ ){
            copy[i] = card[i];
        }
        for( j = 1 ; j < count - 1 ; j++ ){
            card[j-1] = card[m+j];
        }
        for( i = 0 ; i < h ; i++ ){
            card[j+1] = copy[j];
        }
        for( i = 0 ; i < count - 1 ; i++ ){
            printf("%c",&card[i]);
        }
        printf("\n");
    }
    
    return 0;
}

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

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

int main() {
    std::ios::sync_with_stdio(false);
    string cards, subcards;
    int n_shuffles, length;

    while(std::cin) {
        std::cin >> cards;
        if (cards == "-") break;

        std::cin >> n_shuffles;
        for (int i = 0; i < n_shuffles; i++) {
            std::cin >> length;
            subcards = cards.substr(0, length);
            cards = cards.substr(length) + subcards;
        }
        std::cout << cards << "\n";
    }

    return 0;
}
Contact GitHub API Training Shop Blog About

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

#include <stdio.h>
#include <string.h>
 
int main()
{
        char str[200][300];
        char tmp1[300] = { 0 };
        char tmp2[300] = { 0 };
        int input_number = 0, str_number = 0, str_len = 0;
        int shuffle_number = 0, shuffle_NO = 0, count = 0;
 
        while ( 1 )
        {
                scanf("%s", str[str_number]);
                if ( str[str_number][0] == '-' )
                {
                        break;
                }
 
                scanf("%d", &shuffle_number);
                str_len = strlen(str[str_number]);
 
                while ( shuffle_number > 0 )
                {
                        scanf("%d", &shuffle_NO);
                        strcpy(tmp1, str[str_number]);
                        strcpy(tmp2, tmp1);
                        strcpy(tmp1, tmp2+shuffle_NO);
                        strncat(tmp1, tmp2, shuffle_NO );
                        strcpy(str[str_number], tmp1);
 
                        shuffle_number = shuffle_number - 1;
                }
 
                str_number = str_number + 1;
 
        }
 
        while ( count < str_number )
        {
                printf("%s\n", str[count]);
                count++;
        }
 
        return 0;

Compiler output:
main.c: In function 'main':
main.c:45:9: error: expected declaration or statement at end of input
   45 |         return 0;
      |         ^~~~~~
Language: C



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

int main()
{
    char str1[205], str2[205];
    char *f=str1, *b=str2, *p, i;
    int m, h, len;
    while(scanf(" %s", f)) {
        if(strcmp(f, "-")==0) break;
        for(len=0; f[len]; len++);
        scanf("%d", &m);
        for(i=0; i<m; i++) {
            scanf("%d", &h);
            p=f, f=b, b=p;
            memcpy(f, b+h, len-h);
            memcpy(f+len-h, b, h);
            f[len]='\0';
        }
        puts(f);
    }
    return 0;
}


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

ステータス
Judge: 4/4 	C 	CPU: 00.00 sec 	Memory: 604 KB 	Length: 492 B 	2016-07-07 22:53 	2016-07-07 22:53
テストケースの判定結果
Case # 	Verdict 	CPU Time 	Memory 	In 	Out 	Case Name
Case #1: 	: Accepted 	00.00 sec 	596 KB 			
Case #2: 	: Accepted 	00.00 sec 	592 KB 			
Case #3: 	: Accepted 	00.00 sec 	604 KB 			
Case #4: 	: Accepted 	00.00 sec 	600 KB 			
< prev | 	1 	/ 	4 	| next > 	  		 : Accepted        00.00 sec        596 KB
 
Judge Input #1 ( | ) 		Judge Output #1 ( | )

		

Comments
 
 工事中です。
 
Categories
 
 
Free Tags
 
 

Compiler output:
main.c:28:1: error: unknown type name 'Compile'
   28 | Compile Error Logs:
      | ^~~~~~~
main.c:28:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Logs'
   28 | Compile Error Logs:
      |               ^~~~
main.c:34:6: error: stray '#' in program
   34 | Case #  Verdict         CPU Time        Memory  In      Out     Case Name
      |      ^
main.c:35:6: error: stray '#' in program
   35 | Case #1:        : Accepted      00.00 sec       596 KB
      |      ^
main.c:36:6: error: stray '#' in program
   36 | Case #2:        : Accepted      00.00 sec       592 KB
      |      ^
main.c:37:6: error: stray '#' in program
   37 | Case #3:        : Accepted      00.00 sec       604 KB
      |      ^
main.c:38:6: error: stray '#' in program
   38 | Case #4:        : Accepted      00.00 sec       600 KB
      |      ^
main.c:41:13: error: stray '#' in program
   41 | Judge Input #1 ( | )            Judge Output #1 ( | )
      |             ^
main.c:41:46: error: stray '#' in program
   41 | Judge Input #1 ( | )            Judge Output #1 ( | )
      |                                              ^
main.c:47:12: error: stray '\343' in program
   47 |  <U+5DE5><U+4E8B><U+4E2D><U+3067><U+3059><U+3002>
      |                                          ^~~~~~~~
Language: C

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


int main()
{
  char n[201],a[201];
  int h;
  int i,m;

  while(1)
  {
    scanf("%s",n);
    if(strlen(n) == 0 && n[0] == '-') break;
    
    scanf("%d",&m);
    for(i = 0; i < m; i++)
    {
      scanf("%d",&h);
      *strncpy(a,n,h);
      *strcat(n,a);
    }
    printf("%s\n",n);
  }
  retu

Compiler output:
main.c: In function 'main':
main.c:25:3: error: 'retu' undeclared (first use in this function)
   25 |   retu
      |   ^~~~
main.c:25:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:7: error: expected ';' at end of input
   25 |   retu
      |       ^
      |       ;
main.c:25:3: error: expected declaration or statement at end of input
   25 |   retu
      |   ^~~~
Language: C

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

int main(void){
    char s[200];
    char cpy[200];
    int sh, h;
    int i;

    while(1){
        scanf("%s", s);
        if(!strcmp(s, "-")) break;
        scanf("%d", &sh);
        for(i = 0; i < sh; i++){
            scanf("%d", &h);
            strncpy(cpy, s, h);
            strcat(s, cpy);
            for(j = 0; j <= strlen(s); j++){
                s[j] = s[j + h - 1];
            }
        }
        puts(s);
    }
    return 0;
}


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

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

int main()
{
    int n,m,h;

    char str[200];
    char str1[200];
    scanf("%s", str);

    while(strcmp(str, '_') != 0) {
      scanf("%d", &m);
      for(int i=0; i<m; ++i) {
          scanf("%d", &h);
          strcpy(str1, str, h);
          str1[h]='\0';
          strcat(str, str1);
      }
      printf("%s\n", str);
      scanf("%s", str);
    }
    printf("\n");

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:12:23: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   12 |     while(strcmp(str, '_') != 0) {
      |                       ^~~
      |                       |
      |                       int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:16:11: error: too many arguments to function 'strcpy'
   16 |           strcpy(str1, str, h);
      |           ^~~~~~
/usr/include/string.h:141:14: note: declared here
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
      |              ^~~~~~
Language: C

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

int main(int argc, const char * argv[]) {
    char C[201];
    char c[201];
    char c2[201];
    int m,h;
    
    int a=0,b;
    
    while(1){

        while(1){
            scanf("%c",&C[a]);
            if(C[a]=='\n'){
                break;
            }
            a++;
        }//改行まで読み込む
        if(C[0]=='-'){
            break;
        }//-でプログラム終了
        
        scanf("%d",&m);//シャッフル回数
        
        b=(int)strlen(C);
        
        for(a=0;a<m;a++){//入れ替え部分
            scanf("%d",&h);//下から何枚目か指定
            
            strncpy(c,&C[b-h-1],h);
            strncpy(c2,C,b-h-1);
            strncpy(C,c,h);
            strncpy(&C[h],c2,b-h-1);
            
        }
        
        printf("%s\n",C);
        //初期化
        memset(C, '\0', sizeof(C));
        memset(c, '\0', sizeof(c));
        memset(c2, '\0', sizeof(c2));
        a=0;
    }
    


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

#include <stdio.h>
 #include <string.h> char t[1510];
 int main(){ int i,j;
 int n,m;
 int cnt=0;
 int h;
 while(scanf("%s",&t))
{
 n=strlen(t);
 for(i=0;i<n;i++)
{
 t[n+i]=t[i];
 }
 scanf("%d",&m);
 cnt=0;
 for(i=0;
i<m;
i++)
{
 scanf("%d",&h);
 cnt+=h;
 }
 cnt%=n;
 for(i=0;
i<n;
i++)
{
 printf("%c",t[i+cnt]);
 }
 puts("");
 }
 return 0;
 } 


Compiler output:
main.c:2:22: warning: extra tokens at end of #include directive
    2 |  #include <string.h> char t[1510];
      |                      ^~~~
main.c: In function 'main':
main.c:7:20: error: 't' undeclared (first use in this function)
    7 |  while(scanf("%s",&t))
      |                    ^
main.c:7:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <iostream>
#include <string>

int main(){
	while(1){
		std::string cards;
		int m, h;
		std::cin >> cards >> m;
		if(cards == "-")
			break;
		for(int i=0; i<m; i++){
			std::cin >> h;
			cards = cards.substr(h) + cards.substr(0, h);
		}
		std::cout << cards << std::endl;
	}
	return 0;
}

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


#include<stdio.h>
#include<string.h>
main(){
  char n[1000]={0},n_new[1000]={0};
  int m,h,i,j,k,count;
  while(1){
    scanf("%999s",n);
    if(n[0]=='-')
      break;
    scanf("%d",&m);
    count=strlen(n);
    for(k=0;k<m;k++){
      scanf("%d",&h);
      for(i=h,j=0;i<count;i++,j++){
        n_new[j]=n[i];
      }
      for(i=0;i<h;i++,j++)
        n_new[j]=n[i];
      strcpy(n,n_new);
    }
    printf("%s\n",n_new);
    n[1000]={0};
    n_new[1000]={0};
  }
  return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:23:13: error: expected expression before '{' token
   23 |     n[1000]={0};
      |             ^
main.c:24:17: error: expected expression before '{' token
   24 |     n_new[1000]={0};
      |                 ^
Language: C

#include <stdio.h>

int main(void){
	char cards[201] = {0};
	char tmp[201] = {0};
	char *cp;
	char *tp;
	cp = cards;
	tp = tmp;
	int m,h,i;
	int cnt;
	int len = 0;

	while(1){
		scanf("%s", cards);

		if(cards[0] == '-'){
			break;
		}

		while(cards[len] != '\0'){
			len++;
		}

		scanf("%d", &m);

		cnt = 0;

		while(cnt != m){
			scanf("%d", &h);
			tmp[201] = {0};

			for(i = 0;i < h;i++){
				*(tp + i) = *(cp + i);
			}

			for(i = h;i < len;i++){
				*(cp + i - h) = *(cp + i);
			}

			for(i = 0;i < h;i++){
				*(cp + len - h + i) = *(tp + i);
			}

			cnt++;
		}

		puts(cards);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:36: error: expected expression before '{' token
   31 |                         tmp[201] = {0};
      |                                    ^
Language: C

while True:
    ls = raw_input()
    if ls == '-': break

    m = int(raw_input())
    for i in range(m):
        h = int(raw_input())
        ls = ls[h:] + ls[:h]
    print ls

Compiler output:
main.c:1:1: error: expected identifier or '(' before 'while'
    1 | while True:
      | ^~~~~
Language: C

#include<stdio.h>
#inlucde<string.h>

int main(int argc, char* argv[])
{
  char s[200];
  int h, i, j, k,len;

  scanf("%s", s);
  scanf("%d", &h);
  while(strcmp(s, "-")){
    i = 0;
    len = strlen(s);
    for(j = 0; j < h; j++){
      scanf("%d", &k);
      i = (i + k) % len;
    }
    j = i;
    do{
      putchar(s[i]);
      i = (i + 1) % len;
    }while(j != i);
    putchar('\n');
    scanf("%s", s);
    scanf("%d", &h);
  }
  return(0);
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    2 | #inlucde<string.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   11 |   while(strcmp(s, "-")){
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | #inlucde<string.h>
main.c:13:11: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   13 |     len = strlen(s);
      |           ^~~~~~
main.c:13:11: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:13:11: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
main.c:13:11: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C

#include <iostream>
#include <string>

using namespace std;

int main(){
while(1){
string moji;
cin >> moji;
l=moji.size();
if(moji=="-") {
break;
}
int a,i;
cin >>a;
for(i=0; i<a; ++i){
int b;
cin >>b;
string mojihi,mojimi;
mojihi = moji.substr(0,b);
mojimi = moji.substr(b);
moji= mojimi+mojihi;
}
cout<<moji<<endl;
}
    return 0;
}

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

#include <stdio.h>
#include <memory.h>

int main(void) {
	int i, j, k, n, p, size;
	char buff1[202];
	char buff2[202];
	char *ptr;
	while(1) {
		fgets(buff1, sizeof(buff1), stdin);
		if(buff1[0] == '-' && buff1[1] != '\n')
			break;
		
		/* 改行消す */	
		buff1[strlen(buff1)-1] = '\0';
			
		scanf("%d\n", &n);
		for(i=0;i<n;i++) {
			scanf("%d\n", &p);
			memset(buff2, 0x00, sizeof(buff2));
			for(j=0,size=strlen(buff1);j<size;j++) {
				if(j+p<size) {
					buff2[j] = buff1[j+p];
					k=0;
				} else {
					buff2[j] = buff1[k];
					k++;
				}
			}
			ptr = buff1;
			buff1 = buff2;
			buff2 = ptr;
		}
		printf("%s\n", buff1);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:31: error: assignment to expression with array type
   31 |                         buff1 = buff2;
      |                               ^
main.c:32:31: error: assignment to expression with array type
   32 |                         buff2 = ptr;
      |                               ^
Language: C++

#include <iostream>
using namespace std;

int main () {
	string s;
	while (cin >> str, str != "-"){
		int m, h;
		cin >> m;
		for (int i=0; i<m; i++){
			cin >> h;
			s=s.substr(h)+s.substr(0,h);
		}
		cout << str << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |         while (cin >> str, str != "-"){
      |                       ^~~
      |                       std
Language: C++

#include <iostream>
using namespace std;

int main () {
	string s;
	while (cin >> str, str != "-"){
		int m, h;
		cin >> m;
		for (int i=0;m>i;i++){
			cin >> h;
			s=s.substr(h)+s.substr(0,h);
		}
		cout << s << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |         while (cin >> str, str != "-"){
      |                       ^~~
      |                       std
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,su;
	string s;
	char a[200];
	while(1){
		cin >> s;
		if(s[0]=='-') break;
		cin >> n;
		for(int i=0;i<n;i++){
			cin >> su;
			for(int j=0;j<su;j++){
				a[j]=s[j];
			}
			for(int j=su;j<s.size();j++){
				s[j-su]=s[j];
			}
			for(int j=0;j<su;j++){
				s[s.size()-su+j]=a[j];
			}x
		}
		cout << s << endl;
	}
}		


Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'x' was not declared in this scope
   21 |                         }x
      |                          ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
	const string eot = "-";
	string w;
	while (cin >> w) {
		if (w == eot)
			break;

		unsigned int n;
		cin >> n;
		unsigned int s = 0;
		for (unsigned int i = 0; i < n; ++i) {
			cin >> l;
			s += l;
		}

		s = s % w.length();
		string ans = w.substr(s, string::npos);
		if (s > 0)
			ans += w.substr(0, s - 1);
		cout << ans << endl;
	}
	return 0;
}



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

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

string suffle(string s,int len,int num);

int main(){
        int m;
        string s ;
        string haki;
        stringstream ss;
        int count = 0;
        int h[100] = {0};
        bool q = false;
        int l = 0;
        while(1){
                getline(cin,s);
                if(s == "-") break;
                cin >> m;
                getline(cin,haki);
                int s_num = s.length();
                for(int i = 0; i < m;i++){
                        cin >>h[i];
                        getline(cin,haki);
                }
                for(int i = 0; i < m; i++){
                        s = suffle(s,s_num,h[i]);
                }
                cout << s << endl;
        }
        return 0;
}
string suffle(string s,int len,int num){
        char k[100] ={""};
        for(int i = 0; i < num; i++){
                k[i] = s[i];
        }
        for(int i = 0; i < len - num; i++){
                s[i] =  s[i+ num];
        }
        for(int i = len - num; i <len; i++ ){
                s[i] = k[i - len + num];
        }
        return s;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: aggregate 'std::stringstream ss' has incomplete type and cannot be defined
   11 |         stringstream ss;
      |                      ^~
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<cctype>
#include <string>
#include <algorithm>

using namespace std;

int main(){
string data;
string d;
int m;
int length;

while(1){

cin >> data >> m;
int h[m];
length = data.size();

for(int i = 0; i < m; i++){
  cin >> h[i];
  if(h[i] == "-")break;
  d = data.substr(0, h[i]-1);
  data.insert( length-1, d );  
}
cout << data <<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |   if(h[i] == "-")break;
      |      ~~~~~^~~~~~
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<cctype>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;

int main(){
string data;
string d;
int m;
int h0;
vector<int> h;

while(1){

cin >> data >> m;
if(data == "-")break;
length = data.size();

for(int i = 0; i < m; i++){
  cin >> h0;
  h.push_back(h0);
  d = data.substr(0, h[i]-1);
  data.insert( data.length(), d );  
  data.erase(0, h[i]-1);
}
cout << data <<endl;
data.clear();
}
return 0;
}


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

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<cctype>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;

int main(){
string data;
string d;
int m;
int h[100];

while(1){

cin >> data >> m;
if(data == "-")break;

for(int i = 0; i < m; i++){
  cin >> h[i];
  d = data.substr(0, h[i]-1);
  data.insert( data.length(), d );  
  data.erase(0, h[i]-1);
}
cout << data <<endl;
data.clear();
h.clear();
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:3: error: request for member 'clear' in 'h', which is of non-class type 'int [100]'
   30 | h.clear();
      |   ^~~~~
Language: C++

#include<iostream>
#include<stdio.h>
#include<math.h>
#include<cctype>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;

int main(){
string data;
string d;
int m;
int h[100];

while(1){

cin >> data >> m;
if(data == "-")break;

for(int i = 0; i < m; i++){
  cin >> h[i];
  d = data.substr(0, h[i]-1);
  data.insert( data.length(), d );  
  data.erase(0, h[i]-1);
}
cout << data <<endl;
data.clear();
for(int i = 0; i < m; i++){
h[i].clear();}
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:6: error: request for member 'clear' in 'h[i]', which is of non-class type 'int'
   31 | h[i].clear();}
      |      ^~~~~
Language: C++

import Control.Applicative
import Data.Function
import Control.Monad
import Data.List
import Data.Char
 
shuffle s [] = s
shuffle s (h:hs) = shuffle ((drop h s) ++ (take h s)) hs
 
main :: IO ()
main = fix $ \loop -> do
    s <- getLine
    unless (s == "-") $ do
        m <- readLn
        hs <- replicateM m readLn
        putStrLn $ shuffle s hs
        loop


Compiler output:
a.cc:11:14: error: stray '\' in program
   11 | main = fix $ \loop -> do
      |              ^
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Applicative
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

import java.util.Scanner;

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

		for (int j = 0; j < 10; j++) {
			String line = sc.next();
			if (line.charAt(0) == '-') {
				System.exit(0);
			} else if (line.length() > 200) {
				System.exit(0);
			}

			int m = sc.nextInt();
			if (m > 100 || m < 1) {
				System.exit(0);
			}

			for (int i = 0; i < m; i++) {
				int hi = sc.nextInt();
				if (hi > line.length() || hi < 1) {
					System.exit(0);
				}

				String line1 = line.substring(0, hi);
				String line2 = line.substring(hi);

				line = line2 + line1;

			}

			System.out.println(line);

		}
	}

}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
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<iostream>
#include<string>
#include<cstdio>
using namespace std;

int main() {
    string str;
    string copy[201];
    int m;
    int h;
    
    cin >> str;
    cin >> m;
    for (int i = 0; i < m; i++) {
        cin >> h;
    }
    
    while(1) {
        if (h == "-") break;
        string cat = str.substr(0,h);
        str.erase(0,h);
        str+=cat;
        }
        cout << str << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if (h == "-") break;
      |             ~~^~~~~~
a.cc: At global scope:
a.cc:26:5: error: expected unqualified-id before 'return'
   26 |     return 0;
      |     ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

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

int main() {
    string str;
    string copy[201];
    int m;
    int h;
    
    cin >> str;
    cin >> m;
    for (int i = 0; i < m; i++) {
        cin >> h;
    }
    
    while(1) {
        if (str == "-") break;
        string cat = str.substr(0,h);
        str.erase(0,h);
        str+=cat;
        }
        cout << str << endl;
    }
    return 0;
}


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

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

int main() {
    string str;
    string copy[201];
    int m;
    int h;
    
    cin >> str;
    cin >> m;
    for (int i = 0; i < m; i++) {
        cin >> h;
    }
    
    while(1) {
        if (str == "-") break;
        string cat = str.substr(0,h);
        str.erase(0,h);
        str+=cat;
        }
        cout << str << endl;
    }
}


Compiler output:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    
    
    
  string x;
  cin >> str;
  int i;
  int m,b;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> b;
      str=str.substr(b,str.size()-b)+str.substr(0,b);
    }
    cout << str << endl;
    cin >> str;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'str' was not declared in this scope; did you mean 'std'?
    9 |   cin >> str;
      |          ^~~
      |          std
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string x;
  cin >> x;
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  cin >> str;
  int i;
  int m,b;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> b;
      str=str.substr(b,str.size()-b)+str.substr(0,b);
    }
    cout << str << endl;
    cin >> str;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:10: error: 'str' was not declared in this scope; did you mean 'std'?
   46 |   cin >> str;
      |          ^~~
      |          std
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string x;
    int a,b;
    while(1){
        cin >> x;
        if(x == "-") break;
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
  int i;
  int m,b;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> b;
      str=str.substr(b,str.size()-b)+str.substr(0,b);
    }
    cout << str << endl;
    cin >> str;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:9: error: redeclaration of 'int b'
   51 |   int m,b;
      |         ^
a.cc:6:11: note: 'int b' previously declared here
    6 |     int a,b;
      |           ^
a.cc:52:9: error: 'str' was not declared in this scope; did you mean 'std'?
   52 |   while(str!="-"){
      |         ^~~
      |         std
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string x;
    int a,b;
    while(1){
        cin >> x >> a;
        if(x == "-") break;
        for(int i=0;i<a;i++){
            cin >> b;
            
        }
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
  int i;
  int m,b;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> b;
      str=str.substr(b,str.size()-b)+str.substr(0,b);
    }
    cout << str << endl;
    cin >> str;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:9: error: redeclaration of 'int b'
   55 |   int m,b;
      |         ^
a.cc:6:11: note: 'int b' previously declared here
    6 |     int a,b;
      |           ^
a.cc:56:9: error: 'str' was not declared in this scope; did you mean 'std'?
   56 |   while(str!="-"){
      |         ^~~
      |         std
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string x;
    int a,b;
    while(1){
        cin >> x >> a;
        if(x == "-") break;
        for(int i=0;i<a;i++){
            cin >> b;
            x=x.substr(b,x.size()-b)+x.substr(0,b);
            
        }
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
  int i;
  int m,b;
  while(str!="-"){
    cin >> m;
    for(i=0;i<m;i++){
      cin >> b;
      str=str.substr(b,str.size()-b)+str.substr(0,b);
    }
    cout << str << endl;
    cin >> str;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:9: error: redeclaration of 'int b'
   56 |   int m,b;
      |         ^
a.cc:6:11: note: 'int b' previously declared here
    6 |     int a,b;
      |           ^
a.cc:57:9: error: 'str' was not declared in this scope; did you mean 'std'?
   57 |   while(str!="-"){
      |         ^~~
      |         std
Language: C++

#include<iostream>
#include<cstdio>
#include<string>

using namespace std;

int main() {
    string str, str1, str2;
    int m, h:
    cin >> str >> m;
    for (imt i = 0; i < m; i++) {
        cin >> h;
        str1 = substr(0, h);
        str2 = substr(h, str.size()-h);
        str = str1 + str2;
    }
    cout << str << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: found ':' in nested-name-specifier, expected '::'
    9 |     int m, h:
      |             ^
      |             ::
a.cc:9:12: error: 'h' has not been declared
    9 |     int m, h:
      |            ^
a.cc:10:9: error: qualified-id in declaration before '>>' token
   10 |     cin >> str >> m;
      |         ^~
a.cc:11:10: error: 'imt' was not declared in this scope; did you mean 'int'?
   11 |     for (imt i = 0; i < m; i++) {
      |          ^~~
      |          int
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     for (imt i = 0; i < m; i++) {
      |                     ^
a.cc:12:16: error: 'h' was not declared in this scope
   12 |         cin >> h;
      |                ^
a.cc:13:16: error: 'substr' was not declared in this scope
   13 |         str1 = substr(0, h);
      |                ^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>

using namespace std;

int main() {
    string str, str1, str2;
    int m, h:
    cin >> str >> m;
    for (imt i = 0; i < m; i++) {
        cin >> h;
        str1 = substr(0, h-1);
        str2 = substr(h, str.size()-h);
        str = str1 + str2;
    }
    cout << str << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: found ':' in nested-name-specifier, expected '::'
    9 |     int m, h:
      |             ^
      |             ::
a.cc:9:12: error: 'h' has not been declared
    9 |     int m, h:
      |            ^
a.cc:10:9: error: qualified-id in declaration before '>>' token
   10 |     cin >> str >> m;
      |         ^~
a.cc:11:10: error: 'imt' was not declared in this scope; did you mean 'int'?
   11 |     for (imt i = 0; i < m; i++) {
      |          ^~~
      |          int
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     for (imt i = 0; i < m; i++) {
      |                     ^
a.cc:12:16: error: 'h' was not declared in this scope
   12 |         cin >> h;
      |                ^
a.cc:13:16: error: 'substr' was not declared in this scope
   13 |         str1 = substr(0, h-1);
      |                ^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>

using namespace std;

int main() {
    string str, str1, str2;
    int m, h;
    cin >> str >> m;
    for (imt i = 0; i < m; i++) {
        cin >> h;
        str1 = substr(0, h-1);
        str2 = substr(h, str.size()-h);
        str = str1 + str2;
    }
    cout << str << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'imt' was not declared in this scope; did you mean 'int'?
   11 |     for (imt i = 0; i < m; i++) {
      |          ^~~
      |          int
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     for (imt i = 0; i < m; i++) {
      |                     ^
a.cc:13:16: error: 'substr' was not declared in this scope
   13 |         str1 = substr(0, h-1);
      |                ^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>

using namespace std;

int main() {
    string str, str1, str2;
    int m, h;
    cin >> str >> m;
    for (imt i = 0; i < m; i++) {
        cin >> h;
        str1 = str.substr(0, h-1);
        str2 = str.substr(h, str.size()-h);
        str = str1 + str2;
    }
    cout << str << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'imt' was not declared in this scope; did you mean 'int'?
   11 |     for (imt i = 0; i < m; i++) {
      |          ^~~
      |          int
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     for (imt i = 0; i < m; i++) {
      |                     ^