Language: Java

#include <algorithm>
#include<stdio.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include <stack>
#include <queue>
#include<map>
#include <set>
#include<math.h>
using namespace std;
#define int long long
#define ll long long
#define double long double
#define rep(i,n) for(ll i=0;i<n;++i)
#define Rep(i,n) for(ll i=1;i<=n;++i)
#define loop(i,m,n) for(ll i=m;i<n;++i)
#define ggr getchar(); getchar();return 0;
#define pie 3.141592653589793238462643383279
#define elif else if
#define P pair<ll,ll>
#define prique priority_queue<ll>
#define ALL(a)  (a).begin(),(a).end()
const int mod = 1000000007;
const int mod2 = 998244353;
int bin(int bina) {
	int ans = 0;
	for (int i = 0; bina > 0; i++)
	{
		ans = ans + (bina % 2) * pow(10, i);
		bina = bina / 2;
	}
	return ans;
}
bool prime(int n) {
	for (ll i = 2; i <= sqrt(n); i++) {
		if (n % i == 0)return false;
	}
	return n != 1;
}
int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x % y);
}
int lcm(int x, int y) {
	return x * y / gcd(x, y);
}
int kai(int x) {
	if (x == 0)return 1;
	return kai(x - 1) * x % mod;
}
int mod_pow(int x, int y, int m) {
	int res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}
int nCr(int n, int r) {
	int ans = 1;
	for (ll i = n; i > n - r; --i) {
		ans = ans * i;
	}
	for (ll i = 1; i < r + 1; ++i) {
		ans = ans / i;
	}
	return ans;
}
int per(int n, int r) {
	r = n - r;
	int sum = 1;
	int i;
	for (i = n; i >= r + 1; i--)sum *= i;
	return sum;
}
struct union_find {
	int par[200010], size_[200010];
	void init(int x) {
		rep(i, x) { par[i] = i; size_[i] = 1; }
	}
	int find(int x) {
		if (par[x] == x)return x;
		return par[x] = find(par[x]);
	}
	void unite(int x, int y) {
		x = find(x); y = find(y);
		if (x == y)return;
		if (size_[x] < size_[y]) {
			par[x] = y;
			size_[y] += size_[x];
		}
		else {
			par[y] = x;
			size_[x] += size_[y];
		}
	}
};

int ctoi(const char c) {
	switch (c) {
	case '0': return 0;
	case '1': return 1;
	case '2': return 2;
	case '3': return 3;
	case '4': return 4;
	case '5': return 5;
	case '6': return 6;
	case '7': return 7;
	case '8': return 8;
	case '9': return 9;
	default: return -1;
	}
}
int keta(int a) {
	return to_string(a).size();
}
vector<string>a;
signed main(){
	string s;
	int k;
	cin>>s>>k;
	rep(i,s.size()){
		Rep(j,5){
			if(i+j<s.size()+1){
				a.push_back(s.substr(i,j));
			}
		}
	}
	sort(a.begin(),a.end());
	unique(a.begin(),a.end());
	cout<<a[k-1]<<endl;
}




Compiler output:
Main.java:1: error: illegal character: '#'
#include <algorithm>
^
Main.java:2: error: illegal character: '#'
#include<stdio.h>
^
Main.java:3: error: illegal character: '#'
#include <cstdio>
^
Main.java:4: error: illegal character: '#'
#include <iostream>
^
Main.java:5: error: illegal character: '#'
#include <iomanip>
^
Main.java:6: error: illegal character: '#'
#include <string>
^
Main.java:7: error: illegal character: '#'
#include <algorithm>
^
Main.java:8: error: illegal character: '#'
#include <vector>
^
Main.java:9: error: illegal character: '#'
#include <math.h>
^
Main.java:10: error: illegal character: '#'
#include <stack>
^
Main.java:11: error: illegal character: '#'
#include <queue>
^
Main.java:12: error: illegal character: '#'
#include<map>
^
Main.java:13: error: illegal character: '#'
#include <set>
^
Main.java:14: error: illegal character: '#'
#include<math.h>
^
Main.java:16: error: illegal character: '#'
#define int long long
^
Main.java:16: error: class, interface, enum, or record expected
#define int long long
        ^
Main.java:17: error: illegal character: '#'
#define ll long long
^
Main.java:18: error: illegal character: '#'
#define double long double
^
Main.java:19: error: illegal character: '#'
#define rep(i,n) for(ll i=0;i<n;++i)
^
Main.java:19: error: class, interface, enum, or record expected
#define rep(i,n) for(ll i=0;i<n;++i)
                            ^
Main.java:19: error: class, interface, enum, or record expected
#define rep(i,n) for(ll i=0;i<n;++i)
                                ^
Main.java:20: error: illegal character: '#'
#define Rep(i,n) for(ll i=1;i<=n;++i)
^
Main.java:20: error: class, interface, enum, or record expected
#define Rep(i,n) for(ll i=1;i<=n;++i)
                            ^
Main.java:20: error: class, interface, enum, or record expected
#define Rep(i,n) for(ll i=1;i<=n;++i)
                                 ^
Main.java:21: error: illegal character: '#'
#define loop(i,m,n) for(ll i=m;i<n;++i)
^
Main.java:21: error: class, interface, enum, or record expected
#define loop(i,m,n) for(ll i=m;i<n;++i)
                               ^
Main.java:21: error: class, interface, enum, or record expected
#define loop(i,m,n) for(ll i=m;i<n;++i)
                                   ^
Main.java:22: error: illegal character: '#'
#define ggr getchar(); getchar();return 0;
^
Main.java:22: error: class, interface, enum, or record expected
#define ggr getchar(); getchar();return 0;
                       ^
Main.java:22: error: class, interface, enum, or record expected
#define ggr getchar(); getchar();return 0;
                                 ^
Main.java:23: error: illegal character: '#'
#define pie 3.141592653589793238462643383279
^
Main.java:23: error: class, interface, enum, or record expected
#define pie 3.141592653589793238462643383279
        ^
Main.java:24: error: illegal character: '#'
#define elif else if
^
Main.java:25: error: illegal character: '#'
#define P pair<ll,ll>
^
Main.java:26: error: illegal character: '#'
#define prique priority_queue<ll>
^
Main.java:27: error: illegal character: '#'
#define ALL(a)  (a).begin(),(a).end()
^
Main.java:29: error: class, interface, enum, or record expected
const int mod2 = 998244353;
^
Main.java:30: error: unnamed classes are a preview feature and are disabled by default.
int bin(int bina) {
^
  (use --enable-preview to enable unnamed classes)
Main.java:84: error: class, interface, enum, or record expected
struct union_find {
^
Main.java:87: error: ';' expected
		rep(i, x) { par[i] = i; size_[i] = 1; }
		         ^
Main.java:105: error: class, interface, enum, or record expected
};
^
Main.java:107: error: illegal start of type
int ctoi(const char c) {
         ^
Main.java:107: error: class, interface, enum, or record expected
int ctoi(const char c) {
               ^
Main.java:110: error: class, interface, enum, or record expected
	case '1': return 1;
	^
Main.java:111: error: class, interface, enum, or record expected
	case '2': return 2;
	^
Main.java:112: error: class, interface, enum, or record expected
	case '3': return 3;
	^
Main.java:113: error: class, interface, enum, or record expected
	case '4': return 4;
	^
Main.java:114: error: class, interface, enum, or record expected
	case '5': return 5;
	^
Main.java:115: error: class, interface, enum, or record expected
	case '6': return 6;
	^
Main.java:116: error: class, interface, enum, or record expected
	case '7': return 7;
	^
Main.java:117: error: class, interface, enum, or record expected
	case '8': return 8;
	^
Main.java:118: error: class, interface, enum, or record expected
	case '9': return 9;
	^
Main.java:119: error: class, interface, enum, or record expected
	default: return -1;
	       ^
Main.java:120: error: class, interface, enum, or record expected
	}
	^
Main.java:124: error: class, interface, enum, or record expected
}
^
Main.java:129: error: not a statement
	cin>>s>>k;
	      ^
Main.java:139: error: not a statement
	cout<<a[k-1]<<endl;
	            ^
Main.java:130: error: ';' expected
	rep(i,s.size()){
	               ^
Main.java:131: error: ';' expected
		Rep(j,5){
		        ^
59 errors