简单题。

#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. ASP.NET MVC 用户登录Login

    ASP.NET MVC 用户登录Login一.先来看个框架例子:(这个是网上收集到的)  第一步:创建一个类库ClassLibrary831.            第二步:编写一个类实现IHttpM ...

  2. C#编写WINNT服务

    C#编写WINNT服务,随便解决安卓开发遇到的5037被众多程序无节操占用的问题 需求分析: 最近重新开始学习安卓开发,好久不用的ADT集成开发环境频繁遇到不能在仿真机和真机上调试的问题,也就是本人另 ...

  3. 解决中文乱码( jsp表单提交中文时出现乱码)

    有三种方法: 1.建立一个filter中文解决乱码 2.Struts2在struts.xml中修改默认的编码设定 3.用Spring解决中文乱码 4.直接在jsp中修改解决 1.建立一个filter解 ...

  4. ToList<>()所带来的性能影响

    ToList<>()所带来的性能影响  前几天优化师弟写的代码,有一个地方给我留下很深刻的印象,就是我发现他总是将PLINQ的结果ToList<>(),然后再返回给主程序,对于 ...

  5. Apache错误:(20014)Internal error: Error retrieving pid file logs/httpd.pid

    今天在虚拟机上打开apache出现如下错误: [root@ShiGuang ~]# service httpd start (20014)Internal error: Error retrievin ...

  6. 40w会议投票系统优化方案

    40w会议投票系统优化方案 最近2天谈了一个项目,根据提出的需求是,该系统本来是属于一个大系统的分割出来的一个很小的系统,但是由于是并发关系会耗费资源很大,所以分割出来.据了解,系统采用的mysql+ ...

  7. multimap 和 multiset 类型

    map 和 set 容器中,一个键只能对应一个实例.而 multiset 和 multimap 类型则允许一个键对应多个实例.例如,在电话簿中,每个人可能有单独的电话号码列表;在作者的文章集中,每位作 ...

  8. Nginx之旅系列 - Nginx日志功能 PK Linux内核printk

    题记:Nginx之旅系列是用来记录Nginx从使用到源码学习的点点滴滴,分享学习Nginx的快乐 Nginx 首页: http://nginx.org/ Nginx日志功能 PK Linux内核pri ...

  9. 黑马程序员:Java基础总结----正则表达式

    黑马程序员:Java基础总结 正则表达式   ASP.Net+Android+IO开发 . .Net培训 .期待与您交流! 正则表达式 import  java.util.regex.*; 符合一定规 ...

  10. [avalon]data-repeat-rendered循环渲染完毕后的回调函数

    有些时候需要在渲染完毕后,引用其他类似JQ插件的初始化工作.这时候需要使用data-repeat-rendered的回调函数. 应用场景: 在metro-start界面下,需要给每个tile引用cli ...