Codeforces_#370 (Div. 2)_A

Posted 冷暖知不知

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Codeforces_#370 (Div. 2)_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;
}

 

以上是关于Codeforces_#370 (Div. 2)_A的主要内容,如果未能解决你的问题,请参考以下文章

Codeforces Round #370 (Div. 2) B

Codeforces Round #370 - #379 (Div. 2)

topcoder srm 370 div1

Codeforces Round #370(div 2)

Codeforces Round #370 (Div. 2) D. Memory and Scores DP

Codeforces Round 866 (Div. 2) ABC