URAL 2073 Log Files (模拟)
题意:给定 n 场比赛让你把名称,时间,比赛情况按要求输出。
析:很简单么,按照要求输出就好,注意如果曾经AC的题再交错了,结果也是AC的。
代码如下:
#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <cstdio>
#include <string>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cstring>
#include <set>
#include <queue>
#include <algorithm>
#include <vector>
#include <map>
#include <cctype>
#include <cmath>
#include <stack>
#include <sstream>
#include <list>
#include <assert.h>
#include <bitset>
#include <numeric>
#define debug() puts("++++")
#define gcd(a, b) __gcd(a, b)
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define fi first
#define se second
#define pb push_back
#define sqr(x) ((x)*(x))
#define ms(a,b) memset(a, b, sizeof a)
#define sz size()
#define pu push_up
#define pd push_down
#define cl clear()
//#define all 1,n,1
#define FOR(i,x,n) for(int i = (x); i < (n); ++i)
#define freopenr freopen("in.txt", "r", stdin)
#define freopenw freopen("out.txt", "w", stdout)
using namespace std; typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> P;
const int INF = 0x3f3f3f3f;
const LL LNF = 1e17;
const double inf = 1e20;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int maxn = 100 + 10;
const int maxm = 3e5 + 10;
const LL mod = 1e9 + 7LL;
const int dr[] = {-1, 1, 0, 0, 1, 1, -1, -1};
const int dc[] = {0, 0, 1, -1, 1, -1, 1, -1};
const char *de[] = {"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111"};
int n, m;
const int mon[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
const int monn[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
inline bool is_in(int r, int c) {
return r >= 0 && r < n && c >= 0 && c < m;
} char s[maxn];
char ans[maxn]; int main(){
int T;
while(scanf("%d", &T) == 1){
puts("+------------------------------+--------+-------------+");
puts("|Contest name |Date |ABCDEFGHIJKLM|");
puts("+------------------------------+--------+-------------+");
getchar();
while(T--){
gets(s); printf("|%-30s", s);
gets(s); printf("|%s|", s);
scanf("%d %d", &n, &m);
getchar();
for(int i = 0; i < n; ++i) ans[i] = '.';
for(int i = n; i < 13; ++i) ans[i] = ' ';
while(m--){
gets(s);
if(s[2] == 'A') ans[s[0]-'A'] = 'o';
else if(ans[s[0]-'A'] != 'o') ans[s[0]-'A'] = 'x';
}
printf("%s|\n", ans);
puts("+------------------------------+--------+-------------+");
}
}
return 0;
}
URAL 2073 Log Files (模拟)的更多相关文章
- ural 2073. Log Files
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...
- 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 ...
随机推荐
- Repeater上下排序按钮
aspx代码 <table cellspacing="0" cellpadding="0" width="100%" align=&q ...
- linux安全体系
一. 硬件.软件选型 确认需求,分析可能面临的安全问题 记录各硬件寿命.保证散热.确保性能冗余 使用商业正版.开源的软件,不从互联网安装系统,从源头保证系统安全 购买专业售后支持 服务器配置双电源 ...
- 基于Html5的爱情主题网站–表白神器(第二版)
第二版在第一版的基础上增加了一个动态3D的白云效果背景,鼠标悬浮在页面上云朵会向屏幕Z轴方向运动,在第一人称视角看来向着云朵方向前进的,由此形成一个伪3D效果.有点绕,直接看demo就能理解了.3D白 ...
- UIColor,CGColor,CIColor三者的区别和联系
UIColor,CGColor,CIColor三者的区别和联系((转)) 最近看了看CoreGraphics的东西,看到关于CGColor的东西,于是就想着顺便看看UIColor,CIColor,弄清 ...
- PL/SQL 下邮件发送程序
对DBA而言,尽管在os级别下发送邮件是轻而易举的事情,然而很多时候我们也需要在PL/SQL中来发送邮件,比如监控job的执行状况等.本文根据网友(源作者未考证)的代码将其改装并封装到了package ...
- 编译及load mydqli.so文件
(1)cd /usr/local/php-5.2.17/ext/mysqli(2)输入/usr/local/php/bin/phpize 回车(3)./configure --prefix=/usr/ ...
- Android 应用启动速度优化
现在很多的应用一开始点击的时候总会出现黑屏或者白屏,甚至前段时间微信也有同样的问题.其实白屏或者黑屏还是一些其他的东西,都是因为Android 主题的问题,只要自己自定义一个启动主题,问题完美解决. ...
- 6. ActionBar详解
ActionBar简介 隐藏和显示ActionBar 隐藏ActionBar getActionBar().hide(); 显示ActionBar getActionBar( ...
- C语言练习代码
1.运用for循环根据输入的金字塔层数,输出金字塔 eg: #include <stdio.h>int main(void){ int i,j,num; printf("请输入三 ...
- html --- javascript --- div --- 拖拽方块
当鼠标拖拽的很快时,光标会走出方块,所以把事件注册在了方块的父节点上, 如有疑问请参照:http://blog.csdn.net/a9529lty/article/details/2708171 使用 ...