首页 > 其他 > 详细

Codeforces_#370 (Div. 2)_A

时间:2016-09-10 06:35:27      阅读:118      评论:0      收藏:0      [点我收藏+]

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;
}

 

Codeforces_#370 (Div. 2)_A

原文:http://www.cnblogs.com/zhurb/p/5858555.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!