For this Question: Given a string S, containing only letters { 'N', 'E', 'W', 'T', 'O'} like "NWTEONEW" or "NEWTON" your task is to print all the substring of size 10 which occur more than once in the given string.Input contains a single line containing the string S.

Constraints:-
10 < = |String| < = 10000Print all the sequences in lexicographical order separated by spaces, if their is no such substring exist print -1.Sample Input:-
NEWTONNEWTONNEWTON

Sample Output:-
EWTONNEWTO NEWTONNEWT WTONNEWTON

Sample Input:-
NETOWNEWOTTONTOONW

Sample Output:-
-1, I have written this Solution Code: #include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795
#define max1 200001
#define MOD 1000000007

#define read(type) readInt<type>()
#define int long long
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'

void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
unordered_map<string,int> m;
signed main(){

string s;
cin>>s;
string p=s.substr(0,10);
m[p]++;
for(int i=10;i<s.length();i++){
    p=s.substr(i-10+1,10);
    m[p]++;
}
vector<string> v;
for(auto it=m.begin();it!=m.end();it++){
    if(it->second>1){v.EB(it->first);}
}
if(v.size()==0){out(-1);return 0;}
sort(v.begin(),v.end());
FOR(i,v.size()){
out1(v[i]);
}
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?