简单题。

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi=acos(-1.0),eps=1e-; int n;
char s[][]; int main()
{
scanf("%d",&n);
for(int i=;i<=n;i++) scanf("%s",s[i]);
bool f=;
for(int i=;i<=n;i++)
{
if(f==) break;
if(s[i][]=='O'&&s[i][]=='O')
{
s[i][]='+';
s[i][]='+';
f=;
}
if(f==) break; if(s[i][]=='O'&&s[i][]=='O')
{
s[i][]='+';
s[i][]='+';
f=;
}
if(f==) break;
} if(f==) printf("NO\n");
else
{
printf("YES\n");
for(int i=;i<=n;i++) printf("%s\n",s[i]);
} return ;
}

CodeForces 711A Bus to Udayland的更多相关文章

  1. 【模拟】Codeforces 711A Bus to Udayland

    题目链接: http://codeforces.com/problemset/problem/711/A 题目大意: N个字符串,每个字符串5位,找到第一个出现两个OO的并改成++输出YES和改后字符 ...

  2. CodeForces 711A Bus to Udayland (水题)

    题意:给定一个n*4的矩阵,然后O表示空座位,X表示已经有人了,问你是不能找到一对相邻的座位,都是空的,并且前两个是一对,后两个是一对. 析:直接暴力找就行. 代码如下: #pragma commen ...

  3. codeforces 711A A. Bus to Udayland(水题)

    题目链接: A. Bus to Udayland 题意: 找一对空位坐下来,水; 思路: AC代码: #include <iostream> #include <cstdio> ...

  4. Codeforces Round #369 (Div. 2) A. Bus to Udayland 水题

    A. Bus to Udayland 题目连接: http://www.codeforces.com/contest/711/problem/A Description ZS the Coder an ...

  5. Codeforces Round #369 (Div. 2) A. Bus to Udayland (水题)

    Bus to Udayland 题目链接: http://codeforces.com/contest/711/problem/A Description ZS the Coder and Chris ...

  6. Codeforces Round #369 (Div. 2) A. Bus to Udayland【字符串/二维字符数组求连起来的座位并改为其他字符】

    A. Bus to Udayland time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  7. A. Bus to Udayland

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  8. [Codeforces 864C]Bus

    Description A bus moves along the coordinate line Ox from the point x = 0 to the point x = a. After ...

  9. Codeforces G. Bus Number(dfs排列)

    题目描述: Bus Number time limit per test 1 second memory limit per test 256 megabytes input standard inp ...

随机推荐

  1. C# 多线程学习总结

    C# 多线程学习总结 C#多线程学习(一) 多线程的相关概念 什么是进程? 当一个程序开始运行时,它就是一个进程,进程包括运行中的程序和程序所使用到的内存和系统资源.而一个进程又是由多个线程所组成的. ...

  2. UML和模式

    UML和模式应用学习笔记-2(迭代和进化式开发)   一:什么是迭代和进化式开发 1:迭代和进化式开发:通常会在还没有详细定义所有需求的情况下假设开发开始,同时使用反馈来明确和改进演化中的规格说明: ...

  3. [转]How to build a data storage and VM Server using comodity hardware and free software

    Source: http://learnandremember.blogspot.jp/2010_01_01_archive.html Requisites: 1) RAID protection f ...

  4. 企业架构研究总结(39)——TOGAF架构能力框架之架构委员会和架构合规性

    3. 架构委员会 正如前面所说,一个用来对架构治理策略的实现进行监督的跨组织的架构委员会是架构治理策略成功的主要要素之一.架构委员会应该能够代表所有主要干系人的需求,并且通常还需要对整个架构的审查及维 ...

  5. DevExpress 学习使用之 TreeList

    1. 必须先添加列,否则不能显示任何节点内容 2. 如果是代码添加列时,一定要写明 VisibleIndex = 几,没有这句,不显示 3. 顶级结点用 TreeList.AppendNode 来添加 ...

  6. js操作iframe总结

    一 在父页面操作子页面   IE下操作IFrame内容的代码: document.frames["MyIFrame"].document.getElementById(" ...

  7. 冒泡动画按钮的简单实现(使用CSS3)

    冒泡动画按钮的简单实现(使用CSS3) 原始的参考文章是 http://tutorialzine.com/2010/10/css3-animated-bubble-buttons/ ,基本原理是利用了 ...

  8. 如何使用ssh

    如何使用ssh自己的笔记本做不了我的运算,只能依靠办公室的工作站,有时很不方便.所以做了一次远程监控.本想用vnc的,发现怎么都连不上,算了.还是SSH好用.工作站和笔记本都是fedora系统,所以默 ...

  9. ssh三大框架,三层架构 整合测试!完整分页代码,JdbcTemplate等测试,存储过程调用,留着以后复习吧

    下载地址:http://download.csdn.net/detail/liangrui1988/5760453

  10. sharepoint 2013 文档库eventhandle权限控制

    记录一下如何在sharepoint server 2013文档库中,使用eventhandle控制文档库document library的条目item权限. ///<summary> // ...