711A Codeforces - Bus to Udayland




711A Codeforces


Bus to Udayland


#include <iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    string cas="NO",hhh[a];


    for(int i=0;i<a;i++){

        cin>>hhh[i];

        if(hhh[i].substr(0,2)=="OO" && cas=="NO"){

            cas="YES";

            hhh[i][0]=hhh[i][1]='+';

        }

        else if(hhh[i].substr(3,2)=="OO" && cas=="NO"){

            cas="YES";

            hhh[i][3]=hhh[i][4]='+';

        }

    }

    cout<<cas<<"\n";

    if(cas=="NO")return 0;

    for(int i=0;i<a;i++){

        cout<<hhh[i]<<"\n";

    }

    return 0;

}

Share on Google Plus

About Mohamed Sobhi

My name is Mo.Sobhy ,I study at School excelling high school in Ain Shams ,Cairo
My hobbies is programming ,and web development ,playing chess and writing horror stories.
    Blogger Comment
    Facebook Comment

0 التعليقات:

إرسال تعليق