CodeForces 711A Bus to Udayland
简单题。
#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的更多相关文章
- 【模拟】Codeforces 711A Bus to Udayland
题目链接: http://codeforces.com/problemset/problem/711/A 题目大意: N个字符串,每个字符串5位,找到第一个出现两个OO的并改成++输出YES和改后字符 ...
- CodeForces 711A Bus to Udayland (水题)
题意:给定一个n*4的矩阵,然后O表示空座位,X表示已经有人了,问你是不能找到一对相邻的座位,都是空的,并且前两个是一对,后两个是一对. 析:直接暴力找就行. 代码如下: #pragma commen ...
- codeforces 711A A. Bus to Udayland(水题)
题目链接: A. Bus to Udayland 题意: 找一对空位坐下来,水; 思路: AC代码: #include <iostream> #include <cstdio> ...
- 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 ...
- 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 ...
- 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 ...
- A. Bus to Udayland
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...
- [Codeforces 864C]Bus
Description A bus moves along the coordinate line Ox from the point x = 0 to the point x = a. After ...
- Codeforces G. Bus Number(dfs排列)
题目描述: Bus Number time limit per test 1 second memory limit per test 256 megabytes input standard inp ...
随机推荐
- 关于模板pair的用法
在挑战程序设计竞赛中看到调用pair,就上网查了一下 类型申明有两种 template <class T1, class T2> struct pair typedef pairt< ...
- ESB与SOA的关系
ESB与SOA的关系 一.SOA和ESB一直是没有明确概念的两个缩略词 SOA----面向服务架构,实际上强调的是软件的一种架构,一种支撑软件运行的相对稳定的结构,表面含义如此,其实SOA是一种通过服 ...
- 微软RDLC报表打印
关于微软RDLC报表打印时文字拉伸问题(Windows server 2003 sp2) 最近我们开发的打印服务频频出现打印文字拉伸问题,客户意见络绎不绝,最为明显的是使用黑体加粗后 “2.0份” 打 ...
- NuGet的本地服务器安装与Package的发布
NuGet的本地服务器安装与Package的发布 主要的步骤是按照下面的例子来做的: NuGet学习笔记(1)——初识NuGet及快速安装使用 NuGet学习笔记(2)——使用图形化界面打包自己的类库 ...
- (Java 多线程系列)java synchronized详解
synchronized简介 Java提供了一种内置的锁机制来支持原子性:同步代码块(Synchronized Block).同步代码块包括两部分:一个作为锁对象的引用,一个作为由这个锁保护的代码块. ...
- jQuery EasyUI 1.3.4 离线API、Demo
[原]jQuery EasyUI 1.3.4 离线API.Demo (最新) 说明 本文下载包为 jQuery EasyUI 1.3.4 离线API.Demo. API 按照分类整理做成了离线版本 ...
- 服务端套接字类CxServerSocket的使用
服务端套接字类CxServerSocket的使用 这是一个精练的服务端套接字类,类名.函数名和变量名均采用匈牙利命名法.小写的x代表我的姓氏首字母(谢欣能),个人习惯而已,如有雷同,纯属巧合. CxS ...
- Linux Wine with *.bat *.exe ( Photoshop and etc.. )
Firtly all you need is to install wine on your computer. Mine is ubuntu 12.04 which is running KDE o ...
- Servle中的会话管理
最近整理了下会话管理的相关笔记,以下做个总结: 一.会话管理(HttpSession) 1.Web服务器跟踪客户状态的四种方法: 1).使用Servlet API的Session机制(常用) 2).使 ...
- MP4视频编码器
用 HTML5 播放视频,最流行的视频格式非 MP4莫属, 所有最新浏览器都支持; MP4 带有 H.264 视频编码和 AAC 音频编码的 MPEG 4 文件: 以前做过一个把其它编码格式的视频转成 ...