Codeforces_711_A

http://codeforces.com/problemset/problem/711/A

忙了一天没做题,做到水题,我这水平也只能做水题了= = !

 

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
char a[1005][8];
int main()
{
    int n;
    scanf("%d",&n);
    getchar();
    int flag = 1;
    for(int i = 1;i <= n;i++)
    {
        gets(a[i]);
        if(flag)
        {
            if(a[i][0] == 'O' && a[i][1] == 'O')
            {
                flag = 0;
                a[i][0] = '+';
                a[i][1] = '+';
            }
            else if(a[i][3] == 'O' && a[i][4] == 'O')
            {
                flag = 0;
                a[i][3] = '+';
                a[i][4] = '+';
            }
        }
    }
    if(!flag)
    {
        printf("YES\n");
        for(int i = 1;i <= n;i++)   puts(a[i]);
    }
    else        printf("NO\n");
    return 0;
}

 

posted @ 2016-09-10 01:55  zzzzzzzzhu  阅读(172)  评论(0编辑  收藏  举报