ural 2073. Log Files
2073. Log Files
Memory limit: 64 MB
Input
Output
Sample
| input | output |
|---|---|
2 |
+------------------------------+--------+-------------+ |
Problem Source: Ural Regional School Programming Contest 2015
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <deque>
#include <vector>
#include <queue>
#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <ctime>
#include <iomanip>
using namespace std; const int M = ;
char state[M]; inline void solve()
{
char str[M];
for(int i = ; i < M; i++) str[i] = ' '; gets(str);
for(int i = strlen(str); i < M; i++) str[i] = ' ';
printf("|");
for(int i = ; i < ; i++) printf("%c", str[i]); gets(str);
for(int i = strlen(str); i < M; i++) str[i] = ' ';
printf("|");
for(int i = ; i < ; i++) printf("%c", str[i]); int n, m;
scanf("%d%d", &n, &m);
getchar();
for(int i = ; i < M; i++) state[i] = ' ';
for(int i = ; i < n; i++) state[i] = '.';
while(m--)
{
char pro = getchar();
getchar();
gets(str);
int x = pro - 'A';
if(str[] == 'A') state[x] = 'o';
else if(state[x] != 'o') state[x] = 'x';
}
printf("|");
for(int i = ; i < ; i++) printf("%c", state[i]); printf("|\n");
} int main()
{
puts("+------------------------------+--------+-------------+");
puts("|Contest name |Date |ABCDEFGHIJKLM|"); int t;
scanf("%d", &t);
getchar();
while(t--)
{
puts("+------------------------------+--------+-------------+");
solve();
}
puts("+------------------------------+--------+-------------+");
return ;
}
ural 2073. Log Files的更多相关文章
- URAL 2073 Log Files (模拟)
题意:给定 n 场比赛让你把名称,时间,比赛情况按要求输出. 析:很简单么,按照要求输出就好,注意如果曾经AC的题再交错了,结果也是AC的. 代码如下: #pragma comment(linker, ...
- How to configure Veritas NetBackup (tm) to write Unified and Legacy log files to a different directory
Problem DOCUMENTATION: How to configure Veritas NetBackup (tm) to write Unified and Legacy log files ...
- How to delete expired archive log files using rman?
he following commands will helpful to delete the expired archive log files using Oracle Recovery Man ...
- Common Linux log files name and usage--reference
reference:http://www.coolcoder.in/2013/12/common-linux-log-files-name-and-usage.html if you spend lo ...
- 14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小
14.7.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量和大小 改变 InnoDB ...
- 14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量
14.5.2 Changing the Number or Size of InnoDB Redo Log Files 改变InnoDB Redo Log Files的数量 改变InnoDB redo ...
- How to Collect Bne Log Files for GL Integrators
In this Document Goal Solution APPLIES TO: Oracle General Ledger - Version 11.0 and laterInforma ...
- EBS R12 LOG files 位置
- Apache, OC4J and OPMN: $LOG_HOME/ora/10.1.3/Apache$LOG_HOME/ora/10.1.3/j2ee$LOG_HOME/ora/10.1.3/op ...
- 手动创建binary log files和手动编辑binary log index file会有什么影响
基本环境:官方社区版MySQL 5.7.19 一.了解Binary Log结构 1.1.High-Level Binary Log Structure and Contents • Binlog包括b ...
随机推荐
- 解决java.lang.SecurityException: Access to default session denied
原先使用的代码如下: Session session = Session.getDefaultInstance(properties, null); 后来把代码修改为: Session session ...
- python基础——面向对象编程
python基础——面向对象编程 面向对象编程——Object Oriented Programming,简称OOP,是一种程序设计思想.OOP把对象作为程序的基本单元,一个对象包含了数据和操作数据的 ...
- Mysql之取消主从复制
Mysql5.7 Mysql取消主从复制很简单.只需在其要终止同步的Server上[一般是Slave]执行下面语句即可: stop slave; reset slave; 如图: .
- 利用android来赚钱
看了一篇fenger 大神写的文章,受益匪浅,在此做一下记录 转载地址:http://bbs.csdn.net/topics/370249613 其他参考地址: http://bbs.gfan.com ...
- Ubuntu自定义服务
1.准备脚本 准备好一个bash服务脚本,包括start|stop|restart等参数,将脚本文件命名为“服务名”,拷贝到/etc/init.d/目录下. 2.添加服务sudo update-rc. ...
- XMPP框架下微信项目总结(7)聊天通信处理-发送,接受数据
前言:通其他的功能处理一样,聊天也是通过模块发起的成为:“消息模块” 原理:1 current客户端开启通过消息模块开启并监听消息(监听通过代理). 2 当“current客户端”收到来自“other ...
- LeetCode : 223. Rectangle Area
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABRQAAAQ0CAYAAAAPPZBqAAAMFGlDQ1BJQ0MgUHJvZmlsZQAASImVlw
- 玩转Java对象和XML相互转换
最近在项目中一直出现Java对象和XML之间的相互转换,一开始由于项目很庞大,我又是临时调度过去,导致在按照项目组长的要求进行写代码的同时,总是在这块云里雾里,最近才慢慢开始搞清楚项目中具体的使用缘由 ...
- 关于配置Spring框架的多个propertyConfigurer的问题
http://blog.csdn.net/aa427/article/details/38375259
- 初识SQL Server Integration Service
SSIS(SQL Server Integration Service)是Microsoft 从SQL Server2005 以后发布的,现在一直跟随每个SQL server版本.它是Microsof ...