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

#include <stdio.h>
#include <cstdio>
#include <string.h>
#include <algorithm>
using namespace std;
int main()
{
    char s[40],s1[40],s2[40];
    int p,i,n,j;
    gets(s);
    n=strlen(s);
    if(n==26)
        printf("-1\n");
    else
    {
        for(i=0,j=0;s[i];i++,j++)
        {
            s2[j]=s[i];
        }
        s2[j]='\0';
        sort(s,s+n);
        for(i=0;i<n;i++)
        {
            if(s[i+1]-s[i]>1)
            {
                p=s[i]+1;
                break;
            }
            if(i==n-2)
                p=s[i+1]+1;
        }
        for(i=0,j=0;;)
        {
            s1[i++]=s2[j++];
            if(j==n)
            {
                s1[j++]=p;
                break;
            }
        }
        s1[j]='\0';
        puts(s1);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include <cstdio>
#include <cstdlib>
#include <string>
#include <iostream>
#include <algorithm>
#include <array>


bool isTasai(char buf[],int mojisu) {
	if (mojisu < 0) {
		return false;
	}
	if (mojisu == 1) {
		return true;
	}

	char buf2[27];
	strcpy(buf2, buf);

	std::sort(buf2,buf2+mojisu);
	for (int i = 0; i < mojisu-1; i++) {
		if (buf2[i] == buf2[i + 1]) {
			return false;
		}
	}
	
	return true;
}

char SmallestUnseen(char buf[], int mojisu) {
	char remain[26];
	remain[0] = 'a';
	for (int i = 1; i < 26; i++) {
		remain[i] = remain[i - 1] + 1;
	}

	for (int i = 0; i < mojisu; i++) {
		remain[buf[i] - 'a'] = 0;
	}

	for (int i = 0; i < 26; i++) {
		if (remain[i] != 0) {
			return remain[i];
		}
	}
	return 0;
}


int main()
{
	char buf[27];
	scanf("%s", buf);

	int mojisu = strlen(buf);

	if (strcmp(buf, "zyxwvutsrqponmlkjihgfedcba")==0) {
		printf("-1");
		return 0;
	}

	while (1) {

		if (mojisu < 26) {
			buf[mojisu] = SmallestUnseen(buf,mojisu); buf[mojisu + 1] = '\0'; mojisu++;
			goto check;
		}

		if (mojisu == 26) {
			for (int i = 0; i < 26; i++) {
				if (buf[25 - i] != 'z') {
					buf[25 - i]++;
					goto check;
				}
				if (buf[25 - i] == 'z') {
					buf[25 - i] = '\0';
					mojisu--;
				}
			}
		}


	

	check:
		if (isTasai(buf, mojisu)) {
			printf("%s", buf);
			return 0;
		}
	}






    return 0;
}

Compiler output:
a.cc: In function 'bool isTasai(char*, int)':
a.cc:18:9: error: 'strcpy' was not declared in this scope
   18 |         strcpy(buf2, buf);
      |         ^~~~~~
a.cc:7:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <array>
  +++ |+#include <cstring>
    7 | 
a.cc: In function 'int main()':
a.cc:55:22: error: 'strlen' was not declared in this scope
   55 |         int mojisu = strlen(buf);
      |                      ^~~~~~
a.cc:55:22: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:57:13: error: 'strcmp' was not declared in this scope
   57 |         if (strcmp(buf, "zyxwvutsrqponmlkjihgfedcba")==0) {
      |             ^~~~~~
a.cc:57:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int main()
{
    char s[40],s1[40],s2[40];
    int p,i,n,j;
    gets(s);
    n=strlen(s);
    if(n==26)
        printf("-1\n");
    else
    {
        for(i=0,j=0;s[i];i++,j++)
        {
            s2[j]=s[i];
        }
        s2[j]='\0';
        sort(s,s+n);
        for(i=0;i<n;i++)
        {
            if(s[i+1]-s[i]>1)
            {
                p=s[i]+1;
                break;
            }
            if(i==n-2)
                p=s[i+1]+1;
        }
        for(i=0,j=0;;)
        {
            s1[i++]=s2[j++];
            if(j==n)
            {
                s1[j++]=p;
                break;
            }
        }
        s1[j]='\0';
        puts(s1);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

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

int main(){
	int i;
	int a[200];
	string s;
	cin>>s;
	if(s=="zyxwvutsrqponmlkjihgfedcba"){
		cout<<"-1"<<endl;
		return 0;
	}
	int len=s.size();
	else if(len!=26){
		string ans;
		for(i=0; i<len; i++){
			a[s[i]]++;
		}
		for(i=100; i<126; i++){
			if(a[i]==0){
				ans='a'+i-100;
				break;
			}
		}
		for(i=0; i<len; i++) cout<<s[i];
		cout<<ans<<endl;
		return 0;
	}
	else{
		int num;
		for(i=25; i>1; i--){
			if(s[i-1]<s[i]){
				num=i;
				break;
			}
		}
		string t=s.substr(num);
		sort(t.begin(), t.end());
		for(i=0; i<num-1; i++) cout<<s[i];
		cout<<t[0]<<endl;
		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'else' without a previous 'if'
   15 |         else if(len!=26){
      |         ^~~~
Language: Java

import java.util.*;

public class Main{

	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		String s = in.nextInt();
		char[] a = s.toCharArray();
		char[] b = new int[26];
		if(s.length() == 26){
			for(int i=25; i>0; i--){
				if(a[i-1]-a[i] != 1){
					a[i-1] = a[i-1]+1;
					a[i] = '';
					System.out.println(a);
					break;
				}
				a[i] = '';
			}
			System.out.println(-1);
		} else{
			for(int i=0; i<s.length(); i++){
				b[a[i]-'a'] = a[i];
			}
			for(int i=0; i<26; i++){
				if(b[i] == 0){
					b[i] = b[i-1] + 1;
					System.out.println(s+b[i]);
					break;
				}
			}
		}
	}
}


Compiler output:
Main.java:14: error: empty character literal
					a[i] = '';
					       ^
Main.java:18: error: empty character literal
				a[i] = '';
				       ^
2 errors
Language: C++

#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int main()
{
    char s[30],s1[30];
    int p,i,n,j;
    gets(s);
    n=strlen(s);
    if(n==26)
        printf("-1\n");
    else
    {
        sort(s,s+n);
        for(i=0;i<n;i++)
        {
            if(s[i+1]-s[i]>1)
            {
                p=s[i]+1;
                break;
            }
            if(i==n-2)
                p=s[i+1]+1;
        }
        for(i=0,j=0;;)
        {
            s1[i++]=s[j++];
            if(j==n)
            {
                s1[j++]=p;
                break;
            }
        }
        s1[j]='\0';
        puts(s1);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(s);
      |     ^~~~
      |     getw
Language: Java

s=input()
a='abcdefghijklmnopqrstuvwxyz'
b=[i for i in a if i not in s]
if s == 'zyxwvutsrqponmlkjihgfedcba':
    print(-1)
elif b:
    print(s + b[0])
else:
    for i in range(1, len(s)+1):
        if s[-i:][0] != sorted(s[-i:], reverse=True)[0]:
            b=[str(j) for j in a if j not in s[:-i] + s[-i:][0]]
            print(s[:-i] + b[0])
            break


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
s=input()
^
Main.java:2: error: unclosed character literal
a='abcdefghijklmnopqrstuvwxyz'
  ^
Main.java:2: error: illegal line end in character literal
a='abcdefghijklmnopqrstuvwxyz'
                             ^
Main.java:4: error: unclosed character literal
if s == 'zyxwvutsrqponmlkjihgfedcba':
        ^
Main.java:4: error: unclosed character literal
if s == 'zyxwvutsrqponmlkjihgfedcba':
                                   ^
5 errors
Language: C++

# -*- coding :utf-8 -*-

s = input()
s_list = list(s.split(""))


# 文字チェック
alphabet_dict = {}
for i, c in enumerate(range(ord('a'), ord('z') + 1)):
    alpha_dict[chr(c)] = i

check_list = [0 for i in range(26)]

for i in range(len(s)):
    k = alphabet_dict.values(s_list[i])
    check_list[k] = i + 1

key = 1
for i in range(26):
    if check_list[k] == 0:
        key = 0
        break

# 
if key == 1:
    key2 = 1
    for i in range(25):
        if check_list[i] < check_list[i + 1]:
            key2 = 0
            t = i
    
    if key2 == 1: 
        print(-1)
    
    else:
        s = s[:t - 1]
        s = s + alphabet_dict.keys(t + 1)

        print(s)


else:
    i = 0
    while key == 0:
        if check_list[i] == 0:
            s = s + alphabet_dict.keys(check_list[i])
            key = 1
        i = i + 1

    print(s)

        


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding :utf-8 -*-
      |   ^
a.cc:7:3: error: invalid preprocessing directive #\U00006587\U00005b57\U000030c1\U000030a7\U000030c3\U000030af
    7 | # 文字チェック
      |   ^~~~~~~~~~~~
a.cc:3:1: error: 's' does not name a type
    3 | s = input()
      | ^
a.cc:9:1: error: expected unqualified-id before 'for'
    9 | for i, c in enumerate(range(ord('a'), ord('z') + 1)):
      | ^~~
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <cstdio>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

typedef long long LL;
typedef vector<int> VI;
typedef vector<LL>  VL;

typedef pair<int,int> PII;
typedef pair<LL,LL>   PLL;
typedef vector<PII> VII;
typedef vector<PLL> VLL;
bool operator<(const PII& p1, const PII& p2){
    return p1.first < p2.first;
    //return p1.second < p2.second;
}
bool operator<(const PLL& p1, const PLL& p2){
    return p1.first < p2.first;
    //return p1.second < p2.second;
}

#define r0(i,n) for(int i=0; i<n; i++)
#define R0(i,n) for(int i=0; i<=n; i++)
#define r1(i,n) for(int i=1; i<n; i++)
#define R1(i,n) for(int i=1; i<=n; i++)

string alphabet="abcdefghijklmnopqrstuvwxyz";

int main(){
    string s;
    cin >> s;
    VI si(26);
    fill(s.begin(),s.end(),0);
    r0(i,s.length()){
        si[(int)s[i]-'a']++;
    }
    if(s.length()!=26){
        r0(i,26){
            if(si[i]==0) s += (char)((int)'a'+i);
            cout << s << endl;
            return 0;
        }
    }else if("zyxwvutsrqponmlkjihgfedcba"==s){
        cout << "-1\n";
        return 0;
    }else{
        string t;
        t = s;
        next_permutation(s.begin(),s.end());
        r(i,t.length()){
            if(s[i]!=t[i]){
                cout << s.substr(0,i) << endl;
                return 0;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:11: error: 'i' was not declared in this scope
   57 |         r(i,t.length()){
      |           ^
a.cc:57:9: error: 'r' was not declared in this scope
   57 |         r(i,t.length()){
      |         ^
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
      System.out.println("-1");
      return;
        if("zyxwvutsrqponmlkjihgfedcba".equals(S)){
            System.out.println("-1");
            return;
        }
        int tmp = 0;
        String ans = null;
        String C = "abcdefghijklmnopqrstuvwxyz";
        char s[] = S.toCharArray();
        char c[] = C.toCharArray();
        if (S.length() != 26) {
            Arrays.sort(s);
            for (int i = 0; i < 26; i++) {
                if (S.length() == i || s[i] != c[i]) {
                    ans = String.valueOf(c[i]);
                    break;
                }
            }
            System.out.println(S + ans);
        } else {
            int a = 25;
            for (int i = 0; i < 26; i++) {
                if (s[i] == c[a]) {
                    int ch = i;
                    int ca=a;
                    while (a >= 0) {
                        if (s[i] != c[a]) {
                            s[i] = c[a];
                            for (int j = 0; j <= i; j++) {
                                System.out.print(s[j]);
                            }
                            System.out.println();
                            return;
                        }
                        i++;
                        a--;
                    }
                    s[ch-1] = c[0];
                    for (int j = 0; j <= ch-1; j++) {
                        System.out.print(s[j]);
                    }
                    System.out.println();
                    return;
                } else {
                    for (int j = 0; j < 26; j++) {
                        if (s[i] == c[j]) {
                            c[j] = 'z';
                            a--;
                            Arrays.sort(c);
                        }
                    }
                }
            }
        }
    }

}

Compiler output:
Main.java:15: error: unreachable statement
        if("zyxwvutsrqponmlkjihgfedcba".equals(S)){
        ^
1 error
Language: C++

#include<iostream>
#include<string>

int main(){
  char s[26],c;
  bool a[26]={};
  unsigned int i,j;
  std::cin>>s;
  if(strlen(s)==26){
    for(i=0;i<strlen(s);i++){
      if(s[i]!='a'+(int)i){
        if(strcmp(&s[1],"yxwvutsrqponmlkjihgfedcba")==0)break;
        a[1]=1;
        c='a'+i;
        break;
      }
    }
    if(a[1])  {
      for(j=0;j<i-1;j++)std::cout<<s[j];
      std::cout<<c<<std::endl;
    }
    else std::cout<<"-1"<<std::endl;
  }
  else {
    for(i=0;i<strlen(s);i++){
      a[s[i]-'a']=1;
    }
    i=0;
    while(a[i])i++;
    c='a'+i;
    std::cout<<s<<c<<std::endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'strlen' was not declared in this scope
    9 |   if(strlen(s)==26){
      |      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
a.cc:12:12: error: 'strcmp' was not declared in this scope
   12 |         if(strcmp(&s[1],"yxwvutsrqponmlkjihgfedcba")==0)break;
      |            ^~~~~~
a.cc:12:12: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<stdio.h>
#include<string.h>
char s[30];
main(){
	gets(s);
	int len=strlen(s);
	int isok,temp;
	if(strcmp(s,"zyxwvutsrqponmlkjihgfedcba")==0){
		printf("-1");
		return 0;
	}
	
	if(len!=26){//在不加新数的情况下已经达到最大值；需要在后面加一个尽可能小的新数 
		for(int j='a';j<='z';j++){
			isok=1;
			for(int k=0;k<len;k++){
				if(s[k]==j){
					isok=0;
					break;
				}
			}
			if(isok){
				printf("%s%c\n",s,j);
				return 0;
			}
		}
		
	}else{//重新排序 
			int j=len-1;
			int k;
			while(s[j-1]>s[j]){
				j--;
			}//前面的数字比他小，这时候就要尽可能小的扩大他前面的数字
			for(k=s[j-1]+1;k<=26;k++){
				for(int l=0;l<j-1;l++){
					if(s[l]==k)break;
				}
			}
			s[j]='\0';
			s[j-1]=k;
			puts(s);
		
		
	} 
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

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

int main()
{
	char  a[30];
	char  b[30]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
	gets(a);
	int len=strlen(a);
	int i,j,flag=0;
	if(len!=26)
	{
		for(i=0;i<len;i++)
		{
			for(j=0;j<26;j++)
				if(b[j]==a[i])
				{
					b[j]=0;
					break;
				}
		}
		for(i=0;i<26;i++)
		{
			if(b[i]!=0)
				break;
		}
		a[len]=b[i];
		a[len+1]='\0';
	}
	else
	{
			for(i=len-2;i>=0;i--)
			{
				for(j=i+1;j<len;j++)
				{
					if(a[i]<a[j])
					{
						for(j=i+1;j<len;j++)
							a[i]=a[i]>a[j]?a[j]:a[j];
						a[i+1]='\0';
						flag=1;
						break;
					}

				}
				if(flag)
						break;
				if(i==0)
				{
					a[0]='-';
					a[1]='1';
					a[2]='\0';
				}
			}

	}
	printf("%s\n",a);
	
	return 0;
} 

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

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

int main(){
  char s[26],c;
  bool a[26]={};
  unsigned int i,j;
  cin>>s;
  if(strlen(s)==26){
    for(i=0;i<strlen(s);i++){
      if(s[i]!='a'+(int)i){
        if(strcmp(&s[1],"yxwvutsrqponmlkjihgfedcba")==0)break;
        a[1]=1;
        c='a'+i;
        break;
      }
    }
    if(a[1])  {
      for(j=0;j<i-1;j++)cout<<s[j];
      cout<<c<<endl;
    }
    else cout<<"-1"<<endl;
  }
  else {
    for(i=0;i<strlen(s);i++){
      a[s[i]-'a']=1;
    }
    i=0;
    while(a[i])i++;
    c='a'+i;
    cout<<s<<c<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'strlen' was not declared in this scope
   11 |   if(strlen(s)==26){
      |      ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<iostream>
  +++ |+#include <cstring>
    3 | #include<string>
a.cc:14:12: error: 'strcmp' was not declared in this scope
   14 |         if(strcmp(&s[1],"yxwvutsrqponmlkjihgfedcba")==0)break;
      |            ^~~~~~
a.cc:14:12: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main(){
  char s[26];
  char c;
  bool a[26]={};
  int i,j;
  cin>>s;
  if(strlen(s)==26){
    for(i=0;i<(int)strlen(s);i++){
      if(s[i]!='a'+i){
        if(strcmp(s,"zyxwvutsrqponmlkjihgfedcba")==0)break;
        a[1]=1;
        c='a'+i;
        break;
      }
    }
    if(a[1])  {
      for(j=0;j<i-1;j++)cout<<s[j];
      cout<<c<<endl;
    }
    else cout<<"-1"<<endl;
  }
  else {
    for(i=0;i<(int)strlen(s);i++){
      a[s[i]-'a']=1;
    }
    i=0;
    while(a[i])i++;
    c='a'+i;
    cout<<s<<c<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: 'strlen' was not declared in this scope
   12 |   if(strlen(s)==26){
      |      ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<iostream>
  +++ |+#include <cstring>
    3 | #include<string>
a.cc:15:12: error: 'strcmp' was not declared in this scope
   15 |         if(strcmp(s,"zyxwvutsrqponmlkjihgfedcba")==0)break;
      |            ^~~~~~
a.cc:15:12: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main(){
  char s[26];
  char c;
  bool a[26]={};
  int i,j;
  cin>>s;
  if(strlen(s)==26){
    for(i=0;i<(int)strlen(s);i++){
      if(s[i]!='a'+i){
        if(strcmp(s,"zyxwvutsrqponmlkjihgfedcba")==0)break;;
        a[1]=1;
        c='a'+i;
        break;
      }
    }
    if(a[1])  {
      for(j=0;j<i-1;j++)cout<<s[j];
      cout<<c<<endl;
    }
    else cout<<"-1"<<endl;
  }
  else {
    for(i=0;i<(int)strlen(s);i++){
      a[s[i]-'a']=1;
    }
    i=0;
    while(a[i])i++;
    c='a'+i;
    cout<<s<<c<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: 'strlen' was not declared in this scope
   12 |   if(strlen(s)==26){
      |      ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<iostream>
  +++ |+#include <cstring>
    3 | #include<string>
a.cc:15:12: error: 'strcmp' was not declared in this scope
   15 |         if(strcmp(s,"zyxwvutsrqponmlkjihgfedcba")==0)break;;
      |            ^~~~~~
a.cc:15:12: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <math.h>
#include <climits>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <map> 
#include <set>
#include <string>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
const ll MD = 1000000007;

/* sample input

*/

int main()
{
	int num[26] = {};
	int num2[26] = {};
	string str;
	cin >> str;

	for (int i = 0; i < str.length(); i++){
		for (int j = 0; j < 26; j++) {
			if (str[i] == 'a' + j) {
				num[j]++;
			}
		}
	}

	if (str.length() <26 ) {

		for (int j = 0; j < 26; j++) {
			if (num[j] == 0) {
				cout << str << char('a' + j )<< endl;
				return 0;
			}
		}
	}
	else if (str._Equal("zyxwvutsrqponmlkjihgfedcba")) {
		cout << -1 << endl;
		return 0;
	}
	else if (str.length() == 26) {
		for (int j = 0; j < 26; j++) {
			if (str[j] == 'z') {
				bool flag = false;//zの後ろに昇順部分があるかのフラグ
				int pos = -1;
				for (int k = j + 1; k < 25; k++) {
					if (str[k + 1] > str[k]) {
						flag = true;
						pos = k;
					}
				}
				if (flag) {
					for (int k = pos; k < 26; k++) {
						for (int ii = 0; ii < 26; ii++) {
							if (str[k] == 'a' + ii) {
								num2[ii]++;
							}
						}
					}
					for (int k = 0; k < 26; k++) {
						if (num2[k] == 1 && 'a'+ k > str[pos]) {
							str[pos] = char('a' + k);
							break;
						}
					}
					for (int k = 0; k <= pos; k++) {
						cout << str[k];
					}
					cout << endl;
					return 0;
				}
				else {
					//zの後ろに使われている文字
					for (int k = j; k < 26; k++) {
						for (int ii = 0; ii < 26; ii++) {
							if (str[k] == 'a' + ii) {
								num2[ii]++;
							}
						}
					}
					num2[25]++;
					for (int k = 0; k < 26; k++) {
						if (num2[k] > 0 && 'a' + k > str[j - 1]) {
							str[j - 1] = char('a' + k);
							break;
						}
					}
					for (int k = 0; k < j; k++) {
						cout << str[k];
					}
					cout << endl;
					return 0;
				}
			}

		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:22: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named '_Equal'
   47 |         else if (str._Equal("zyxwvutsrqponmlkjihgfedcba")) {
      |                      ^~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    char a[27];
    gets(a);
    if(strcmp(a,"zyxwvutsrqponmlkjihgfedcba")==0)
        printf("-1\n");
    else
    {
        int l=strlen(a);
        int i;
        if(l<26)
        {
            for(i=0; i<l; i++)
                printf("%c",a[i]);
            char key='a';
            for(i=0; i<l; i++)
            {
                 int flag=1;
                for(key='a'; key<='z'; key++)
                {
                    if(a[i]!=key)
                    {
                        printf("%c",key);
                        flag=0;
                        break;
                    }

                }
                if(flag==0)
                    break;
            }
        }
        if(l==26)
        {
            for(i=0; i<l; i++)
            {
                if(a[i]-a[l-1]==-1)
                {
                    printf("%c",a[l-1]);
                    break;
                }
                else
                    printf("%c",a[i]);
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

#define forn(i, x, n) for (int i = x; i < n; i++)
#define all(a) (a).begin(), (a).end()
#define nl '\n'
#define precision(n) setprecision(n)
#define pii pair<int, int>
#define pll pair<ll, ll>
typedef long double ld;
typedef long long ll;

int MAX_LEN = 26;

int main() { _
    string s; cin >> s;
    int n = (int)s.length();
    char ch = 'a';
    set<char> seen;
    
    forn(i, 0, n) {
        seen.insert(s[i]);
        while(seen.count(ch)) {
            ch++;
        }
    }
    
    if (n < 26) {
        cout << s << ch <<nl;
    } else {
//        int index = -1;
        seen.erase(s[n - 1]);
        for (int i = n - 2; i > -1; i--) {
            char cur = s[i];
            while (seen.count(cur)) {
                cur++;
            }
            if (cur <= 'z') {
                s[i] = cur;
                cout << s.substr(0, i + 1) << nl;
                return 0;
            } else {
                seen.erase(s[i]);
            }
        }
        cout << -1 << nl;
//        if (index == -1 && s[0] == 'z') {
//            cout << "-1" << nl;
//            return 0;
//        } else {
//            if (index == -1) index = 0;
//            char last = s[index];
//            while(seen.count(last)) {
//                last++;
//                if (last > 'z') {
//                    seen.insert(s[index]);
//                    index++;
//                    last = s[index];
//                }
//            }
//            s[index] = last;
//            s = s.substr(0, index + 1);
//            cout << s << nl;
//        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: '_' was not declared in this scope
   12 | int main() { _
      |              ^
a.cc:13:15: error: 'cin' was not declared in this scope
   13 |     string s; cin >> s;
      |               ^~~
a.cc:13:22: error: 's' was not declared in this scope
   13 |     string s; cin >> s;
      |                      ^
a.cc:16:5: error: 'set' was not declared in this scope
   16 |     set<char> seen;
      |     ^~~
a.cc:16:9: error: expected primary-expression before 'char'
   16 |     set<char> seen;
      |         ^~~~
a.cc:19:9: error: 'seen' was not declared in this scope
   19 |         seen.insert(s[i]);
      |         ^~~~
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout << s << ch <<nl;
      |         ^~~~
a.cc:29:9: error: 'seen' was not declared in this scope
   29 |         seen.erase(s[n - 1]);
      |         ^~~~
a.cc:37:17: error: 'cout' was not declared in this scope
   37 |                 cout << s.substr(0, i + 1) << nl;
      |                 ^~~~
a.cc:43:9: error: 'cout' was not declared in this scope
   43 |         cout << -1 << nl;
      |         ^~~~
Language: C++

//#include <bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<cstdio>
#include<string>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
using namespace std;
typedef long long ll;//int64
typedef unsigned long long ull;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
//----------program from here----------



int main(){
  int ansi,Temp;
  string s,ans;
  cin>>s;
  int ibox[s.size()];
  for(int i=0;i<s.size();++i{
    ibox[i]=int(s[i]);
  }
  for(int i=0;i<s.size();++i){
    int checki = ibox[i];
    for(int z=0;z<s.size();++z){
      if(i!=z){
        if(checki==ibox[z]){
          Temp=-1;
        }else{
          for(int x=0;x<s.size();++x){
            ansi=97;
            if(ansi==ibox[x]){
              ++ansi;
            }
          }
        }
      }
    }
  }
  if(Temp==-1){
    cout << -1;
  }else{
    string sans(1, char(ansi));
    cout << s << sans;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:29: error: expected ')' before '{' token
   28 |   for(int i=0;i<s.size();++i{
      |      ~                      ^
      |                             )
Language: Java

import java.util.*;

public class diveseWords
{
    public static void main(String[] args) {
	Scanner in = new Scanner(System.in);
	
	String s = in.nextLine();
	if (s.length() < 26) {
	    HashSet<Character> t = new HashSet<>();
	    for (int i = 0; i < s.length(); i++) {
		t.add(s.charAt(i));
	    }
	    for (int i = 0; i < 26; i++) {
		if(!t.contains((char)(i + 'a'))) {
		    System.out.println(s += (char)(i + 'a'));
		    break;
		}
	    }
	} else {
	    for (int i = 1; i < s.length(); i++) {
		if(s.charAt(i) - s.charAt(i-1) > 1) {
		    char x = s.charAt(i - 1);
		    s = s.substring(0, i - 1);
		    System.out.println(s + (char)(x + 1));
		    System.exit(0);
		}
	    }
	    System.out.println(-1);
	}
    }
}


Compiler output:
Main.java:3: error: class diveseWords is public, should be declared in a file named diveseWords.java
public class diveseWords
       ^
1 error
Language: C++

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

#include <cmath>
#include <cstdlib>
#include <climits>

//#include <stdio.h>
//#include <stdlib.h>
#include "show_vector.hh"


using namespace std;

#define debug false

int main(int argc, char *argv[]){

  string S;
  cin >> S;
  int length = S.length();
  string NG = "zyxwvutsrqponmlkjihgfedcba";
  if (S == NG) {
    printf("-1\n");
    return 0;
  }

  if(length < 26){
    int array[26] = {};
    for (int i = 0; i < length; i++){
      array[ S[i]-97 ]++;
    }
    char SS;
    for(int i = 0; i < 26; i++){
      if(array[i] == 0){
        SS = i+97;
        break;
      }
    }
    cout << S << SS << endl;
  }else{
    string stack, comp;
    for(int i = 0; i < 26; i++){
      if(S[24-i] > S[25-i]){
        stack = stack + S[25-i];
        continue;
      }else{
        // S[24-i]をこえる 最小値を求める。
        char c = S[24-i];
        for(int j = 0; j < stack.length(); j++){
          if( c < stack[j] ){
            S[24-i] = stack[j];
            for(int l = 0; l <= 24-i; l++){
              comp = comp + S[l];
            }
            goto END;
          }
        }
      }
    }
    END :
      cout << comp << endl;
  }


  return 0;
}

// abcdefghijklmnopqrstuv wzyx
// abcdefghijklmnopqrstuv x


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

# coding: utf-8
# Your code here!
S=input()
L=len(S)+1

ascii_lowercase=[chr(i) for i in range(97,97+26)]
#print(ascii_lowercase)

flag=0

S=S+'A'
for i in range(L):
    for letter in ascii_lowercase:
  #      print(S[:L-i-1],S[L-i-1],letter)
        if (letter not in S[:L-i-1]) and letter > S[L-i-1]:
            flag = 1
            answer = S[:L-i-1]+letter
            break
    if flag==1:
        break

if flag==1:
    print(answer)
else:
    print('-1')





Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:2:3: error: invalid preprocessing directive #Your
    2 | # Your code here!
      |   ^~~~
a.cc:7:2: error: invalid preprocessing directive #print
    7 | #print(ascii_lowercase)
      |  ^~~~~
a.cc:14:10: error: invalid preprocessing directive #print
   14 |   #      print(S[:L-i-1],S[L-i-1],letter)
      |          ^~~~~
a.cc:25:11: warning: multi-character character constant [-Wmultichar]
   25 |     print('-1')
      |           ^~~~
a.cc:3:1: error: 'S' does not name a type
    3 | S=input()
      | ^
Language: C++

#ifdef debug
#define _GLIBCXX_DEBUG
#endif

#include <bits/stdc++.h>
#include "optimization.h"

using namespace std;

#define vec vector
#define ALL(x) (x).begin(), (x).end()

typedef unsigned int ui;
typedef long long ll;
typedef long double ld;
typedef pair< int, int > pii;
typedef pair< long long, long long > pll;

const int inf = 1e9;
const ll inf64 = 1e18;

int main() {

#ifdef debug
    freopen("input.txt", "r", stdin);
#endif

    string s;

    cin >> s;

    vec< int > have(26);

    for(char c : s) {
        have[c - 'a'] = 1;
    }

    for(int i = 0;i < 26;i++) {
        if(!have[i]) {
            cout << s << char(i + 'a') << "\n";
            return 0;
        }
    }

    for(int i = (int)s.size() - 1;i >= 0;i--) {
        for(char c = s[i] + 1;c <= 'z';c++) {
            if(!have[c - 'a']) {
                cout << s.substr(0, i) << c << "\n";
                return 0;
            }
        }
        have[s[i] - 'a'] = 0;
    }

    cout << "-1\n";

    return 0;
}



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

#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int main()
{
    char s[30],q,s2[30];
    int s1[30],p,i,n,j;
    gets(s);
    n=strlen(s);
    if(n==26)
        printf("-1\n");
    else
    {
        for(i=0,j=0; s[i]; i++,j++)
        {
            s1[j]=s[i]-'0';
        }
        sort(s1,s1+n);
        for(i=0; i<n; i++)
        {
            if(s1[i+1]-s1[i]>1)
            {
                p=s1[i]+1;
                break;
            }
            if(i==n-2)
                p=s1[i+1]+1;
        }
        q=p+48;
        for(i=0,j=0;;)
        {
            s2[i++]=s[j++];
            if(j==n)
            {
                s2[j++]=q;
                break;
            }
        }
        s2[j]='\0';
        puts(s2);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(s);
      |     ^~~~
      |     getw
Language: C

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sys/time.h>
#include <cmath>
#include <tuple>
#include <queue>
#include <bitset>

using namespace std;

void solve(string S){
    vector<bool> used(26, false);
    char a;
    if (S.size() == 26) {
        int n = S.size();
        a = S.back();
        for (int i = 0; i < n; i++) {
            if (S.back() < a) {
                S.pop_back();
                S.push_back(a);
                std::cout << S << std::endl;
                return;
            } else if (S.back() >= a) {
                S.pop_back();
            }
        }
        std::cout << -1 << std::endl;
        return;
    } else {
        for (auto c : S) {
            used[c - 'a'] = true;
        }
        for (int i = 0; i < 26; i++) {
            if (!used[i]) {
                S.push_back('a' + i);
                std::cout << S << std::endl;
                return;
            }
        }
    }

}

int main(){	
    struct timeval start,end;
    long long span;
    gettimeofday(&start,NULL);

    string S;
    cin >> S;
    solve(S);

    gettimeofday(&end,NULL);
    span = (end.tv_sec -start.tv_sec)*1000000LL + (end.tv_usec - start.tv_usec);
    std::cerr << "--Total Time: " << span/1000 << "ms" << 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 <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define rep2(i,a,b)for(int i=a;i<b;i++)
#define mp make_pair
#define pb push_back
#define P pair<int,int>
#define ll __int64
//#define ll long long
const ll M=1000000007;

string s;
int t[30];

int main(){
	cin>>s;
	rep(i,s.size())t[(int)(s[i]-'a')]=1;

	int in=-1;

	rep(i,26){
		if(!t[i]){
			in=i;
			break;
		}
	}



	if(s=="zyxwvutsrqponmlkjihgfedcba"){
		cout<<-1<<endl;
		return 0;
	}

	

	if(in==-1){
		int ns=s.size();
		for(int i=ns-1;i>=0;i--){
			int ma=1000;
			for(int j=i+1;j<ns;j++){
				if(s[j]-'a'>s[i]-'a')ma=min(ma,s[j]-'a');
			}
				
			if(ma!=1000&&ma>s[i]-'a'){
				rep(j,i)cout<<s[j];
				cout<<(char)('a'+ma)<<endl;
				return 0;
			}
		}	
	}	

	else{
		s.push_back('a'+in);
		cout<<s<<endl;
	}	
	return 0;
}


Compiler output:
a.cc:17:12: error: '__int64' does not name a type; did you mean '__int64_t'?
   17 | #define ll __int64
      |            ^~~~~~~
a.cc:19:7: note: in expansion of macro 'll'
   19 | const ll M=1000000007;
      |       ^~
Language: C++

fn read_line() -> String {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_owned()
}

fn reads<T>() -> Vec<T>
where
    T: std::str::FromStr,
    <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    read_line()
        .split_whitespace()
        .map(|w| w.parse().unwrap())
        .collect()
}

fn main() {
    let s = read_line();

    if s.len() == 26 {
        let mut cs: Vec<u8> = s.as_bytes().to_owned();
        let mut cand = vec![];
        while let Some(last) = cs.pop() {
            cand.push(last);
            cand.sort();

            for c in cand.iter() {
                let t = format!("{}{}", String::from_utf8(cs.clone()).unwrap(), *c as char);
                // eprintln!("* {}", t);

                if t > s {
                    println!("{}", t);
                    return;
                }
            }
        }

        println!("-1");
    } else {
        for i in 0..26 {
            let c = ('a' as u8 + i) as char;
            if !s.contains(c) {
                println!("{}{}", s, c);
                return;
            }
        }
    }
}


Compiler output:
a.cc:41:18: error: too many decimal points in number
   41 |         for i in 0..26 {
      |                  ^~~~~
a.cc:1:1: error: 'fn' does not name a type
    1 | fn read_line() -> String {
      | ^~
a.cc:7:1: error: 'fn' does not name a type
    7 | fn reads<T>() -> Vec<T>
      | ^~
a.cc:18:1: error: 'fn' does not name a type
   18 | fn main() {
      | ^~
Language: C++

#define _CRT_SECURE_NO_WARNINGS

#include <iostream>

#include <iomanip>

#include <algorithm>

#include <vector>

#include <stack>

#include <queue>

#include <cmath>

#include <set>

#include <map>

#include <string>

#include <numeric>

#include <cstdio>

#include <cstdlib>

#include <ctime>

#include <iterator>

using namespace std;


const int INF = 10000000;

typedef pair<int, int> P;
typedef long long ll;
#define PB push_back
#define rep(i, a) for (int i = 0; i < (a); i++)

//char maze[100][101];

ll n, m;

int sx, sy;

int gx, gy;

int qqq;

//各座標までの最短距離

int d[100][100];


//移動方向のベクトル

int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };

int ans = 0;
pair<int, int> red[101], blue[101];
//ll a[200000], b[20000];

//ユークリッドの互除法
ll gcd(ll x, ll y) {
	if (x < y) swap(x, y);
	if (y == 0) return x;
	return gcd(y, x%y);
}

int isPrime(int x) {
	int i;
	if (x < 2) return 0;
	else if (x == 2) return 1;
	if (x % 2 == 0) return 0;
	for (int i = 3; i*i <= x; i += 2)
		if (x%i == 0) return 0;
	return 1;
}

int v_find(std::vector<int> vec, int number) {
	auto itr = std::find(vec.begin(), vec.end(), number);
	if (itr != vec.end()) { // 発見できたとき
		return 1;
	}
	else { // 発見できなかったとき
		return 0;
	}
}

int ok = 1000; //解が存在する値
int ng = -1;   //解が存在しない値

ll BIG = 10000000000;

ll POW(ll a, ll b) {
	if (b == 0) return 1;
	return (a*POW(a, b - 1)) % BIG;
}

int Kaijou(int a) {
	if (a < 2) return 1;
	return a * Kaijou(a - 1);
}


ll aa[51];

int main() {
	char s[27] = { "" };
	cin >> s;
	if (strcmp(s,"zyxwvutsrqponmlkjihgfedcba")==0) {
		cout << -1 << endl;
		return 0;
	}
	if (strlen(s) == 26) {
		int ff = 0;
		for (int i = 0; i < strlen(s); ++i) {
			if (s[i] == 'z') ff = i;
		}
		vector<int> v(26);
		iota(v.begin(), v.end(), 0);
		for (int i = 0; i < 26; ++i) {
			v[i] = (int)s[i] - 97;
		}
		int f = 0;
		do {
			if (f) break;
			f = 1;
		} while (next_permutation(v.begin(), v.end()));
		char c[26] = { "" };
		for (int i = 0; i < ff; ++i) {
			c[i] = (char)(v[i] + 97);
			cout << c[i];
		}
		cout << endl;
		return 0;
	}
	int aa[26] = { 0 };
	for (int i = 0; i < strlen(s); ++i) {
		aa[(int)s[i] - 97] = 1;
	}
	cout << s;
	for (int i = 0; i < 26; ++i)
		if (aa[i] == 0) {
			cout << char(i+ 97) << endl;
			break;
		}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:114:13: error: 'strcmp' was not declared in this scope
  114 |         if (strcmp(s,"zyxwvutsrqponmlkjihgfedcba")==0) {
      |             ^~~~~~
a.cc:32:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   31 | #include <iterator>
  +++ |+#include <cstring>
   32 | 
a.cc:118:13: error: 'strlen' was not declared in this scope
  118 |         if (strlen(s) == 26) {
      |             ^~~~~~
a.cc:118:13: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:142:29: error: 'strlen' was not declared in this scope
  142 |         for (int i = 0; i < strlen(s); ++i) {
      |                             ^~~~~~
a.cc:142:29: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

s=input()
a='abcdefghijklmnopqrstuvwzyx'
b=[i for i in a if i not in s]
if s == 'zyxwvutsrqponmlkjihgfedcba':
    print(-1)
elif b:
    print(s + b[0])
else:
    for i in range(1, len(s)):
        if s[-i:][0] != sorted(s[-i:], reverse=True)[0]:
            print(s[:-i] + chr(ord(s[-i:][0]) + 1))
            break

Compiler output:
a.cc:2:3: warning: multi-character literal with 26 characters exceeds 'int' size of 4 bytes
    2 | a='abcdefghijklmnopqrstuvwzyx'
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:4:9: warning: multi-character literal with 26 characters exceeds 'int' size of 4 bytes
    4 | if s == 'zyxwvutsrqponmlkjihgfedcba':
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 's' does not name a type
    1 | s=input()
      | ^
Language: C++

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

#include <cmath>
#include <cstdlib>
#include <climits>

//#include <stdio.h>
//#include <stdlib.h>
#include "show_vector.hh"


using namespace std;

#define debug false

int main(int argc, char *argv[]){

  string S;
  cin >> S;
  int length = S.length();
  if (length == 26) {
    printf("-1\n");
    return 0;
  }
  int array[26] = {};
  for (int i = 0; i < length; i++){
    array[ S[i]-97 ]++;
  }
  char SS;
  for(int i = 0; i < 26; i++){
    if(array[i] == 0){
      SS = i+97;
      break;
    }
  }
  cout << S << SS << endl;

  return 0;
}


Compiler output:
a.cc:12:10: fatal error: show_vector.hh: No such file or directory
   12 | #include "show_vector.hh"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: Java


import java.lang.Math;
import java.util.*;
import java.io.*;

public class Solution {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Problem solver = new Problem();
		solver.solve(in, out);
		out.close();
	}

	// Problem Solver
	static class Problem {
		public void solve(InputReader in, PrintWriter out) {
			String s = in.next();
			boolean[] seen = new boolean[26];
			for(int i=0;i<s.length();i++){
				seen[(int)s.charAt(i)-97]=true;
			}
			for(int i=0;i<26;i++){
				if(!seen[i]){
					s=s+Character.getNumericValue('a'+i);
					System.out.print(s);
					return;
				}
			}
		}
	}
	// Insert any additional methods/classes below below

	// Do not touch
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 500000);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

	}
}

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

#define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:108777216")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("fast-math")
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <bitset>
#include <queue>
#include <deque>
#include <utility>
#include <algorithm>
#include <ctime>
using namespace std;

int const MAX_N = 512 * 1024;
char st[MAX_N], init_st[MAX_N];
int nnew[MAX_N];

int main() {
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
	
	gets(st);
	int n = (int) strlen(st);
	if (n < 26) {
		for (int i=0; st[i]; i++) nnew[st[i]-'a'] = 1;
		for (int i=0; i<26; i++)
			if (!nnew[i]) {
				printf("%s%c",st,(char) 'a'+i);
				return 0;
			}
	}

	strcpy(init_st, st);
	if (!next_permutation(st,st+n)) printf("-1");
	else {
		int qq = 0;
		while (st[qq]) {
			if (st[qq] > init_st[qq]) {
				st[qq+1] = 0;
				break;
			}
			qq++;
		}
		printf("%s",st);
	}
    return 0;
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   33 |         gets(st);
      |         ^~~~
      |         getw
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> iint;
typedef pair<ll,ll> llll;
#define ALL(x) (x).begin(),(x).end()
const ll zero = 0;
const ll INF = 3000000000000000000; //10^18
const int inINF = 1000000000; //10^9
const ll MOD = 1000000007; //10^9+7
const ll MOD2 = 998244353;
void Yes() {printf("Yes\n");}
void No() {printf("No\n");}
void YES() {printf("YES\n");}
void NO() {printf("NO\n");}

int main(){
    int N;
    cin >> N;
    for (int i = 0; i < N/2 - 1; i++) {
        printf("2 3 ");
    }
    int n;
    if(N % 2 == 1){
        printf("2 3 ");
        n = N / 2;
        printf("%d\n", (6-(n%6))*5;
    }
    else{
        printf("5 ");
                n = N / 2;
        printf("%d\n", (6-(n%6))*5;
    }
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:27:35: error: expected ')' before ';' token
   27 |         printf("%d\n", (6-(n%6))*5;
      |               ~                   ^
      |                                   )
a.cc:32:35: error: expected ')' before ';' token
   32 |         printf("%d\n", (6-(n%6))*5;
      |               ~                   ^
      |                                   )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n;
int main()
{
  scanf("%d",&n);
  if(n<8)
  {
    if(n==3) printf("2 5 63\n")
    else if(n==4) printf("2 5 20 63\n")
    else if(n==5) printf("3 3 2 2 2\n");
    else if(n==6) printf("")
    else if(n==7) printf("3 3 3 3 2 2 2\n")
    else if(n==8) printf("3 3 3 3 3 5 5 5\n")
  }
  else
  {
    if(n%2==0)
    {
        printf("2 2 2 2 2 2 ")；
        for(int i=7;i<=n;i++) printf("3 ")；
        printf("\n");
    }    
    else 
    {
      printf("2 2 2 ");
      for(int i=4;i<=n;i++) printf("3 ")
      printf("\n");
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before 'else'
    9 |     if(n==3) printf("2 5 63\n")
      |                                ^
      |                                ;
   10 |     else if(n==4) printf("2 5 20 63\n")
      |     ~~~~                        
a.cc:12:29: error: expected ';' before 'else'
   12 |     else if(n==6) printf("")
      |                             ^
      |                             ;
   13 |     else if(n==7) printf("3 3 3 3 2 2 2\n")
      |     ~~~~                     
a.cc:20:31: error: expected ';' before '\U0000ff1b'
   20 |         printf("2 2 2 2 2 2 ")；
      |                               ^~
      |                               ;
a.cc:21:21: error: 'i' was not declared in this scope
   21 |         for(int i=7;i<=n;i++) printf("3 ")；
      |                     ^
a.cc:27:41: error: expected ';' before 'printf'
   27 |       for(int i=4;i<=n;i++) printf("3 ")
      |                                         ^
      |                                         ;
   28 |       printf("\n");
      |       ~~~~~~