/*Tommy Smith
February 3, 2020
Sen5
Enloe
Potter*/
#include 
#include 
#include 
#include 
using namespace std;
vector  output, lef, rig;
string prep(string convert){//preps string by deleting all non-alphabetical
    string build = "";//      characters and making it all uppercase
    for (int i = 0; i < convert.length(); i++){
        if(convert[i]>=97&&convert[i]<=122)//lower case to upper case
            build = build + (char)(convert[i]-32);
        else if(convert[i]>=65&&convert[i]<=90)
            build = build + convert[i];
    }
    return build;
}
string sub(string first, string second){//biggest substring function
    string temp, big = "";
    int pos;
    for(int i = 0; i < first.length(); i++){//i is starting position of substring
        for(int j = 0; j < first.length()-i+1;j++){//j is how long substring is
            temp = first.substr(i,j);
            pos = second.find(temp);
            //cout << temp << "    " << pos << endl;
            if(pos=0){//Checks to make sure that the position is not a random invalid number
                if(big.length() < temp.length()){
                    big = temp;
                }else if(big.length()==temp.length()){
                    for(int k = 0; k < big.length(); k++){
                        if(temp[k]0){
                pos = lef[i].find(temp);
                lef.push_back(lef[i].substr(0,pos));
                lef.push_back(lef[i].substr(pos+temp.length()));
                pos = rig[i].find(temp);
                rig.push_back(rig[i].substr(0,pos));
                rig.push_back(rig[i].substr(pos+temp.length()));
            }
        }
        for(int i = 0; i < output.size(); i++){
            last = last + output[i].length();
            //cout << output[i] << endl;
        }
          //cout << endl;
        /*for(int i = 0; i < lef.size(); i++){
            //cout << lef[i] << "   " << rig[i] << endl;
        }*/
        cout << last << endl;
    }
    return 0;
}