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 ...
随机推荐
- UVa 10791 Minimum Sum LCM【唯一分解定理】
题意:给出n,求至少两个正整数,使得它们的最小公倍数为n,且这些整数的和最小 看的紫书--- 用唯一分解定理,n=(a1)^p1*(a2)^p2---*(ak)^pk,当每一个(ak)^pk作为一个单 ...
- HDU 3790 最短路径问题【Dijkstra】
题意:给出n个点,m条边,每条边的长度d和花费p,给出起点和终点的最短距离和花费,求最短距离,如果有多个最短距离,输出花费最少的 在用dijkstra求最短距离的时候,再用一个f[]数组保存下最少花费 ...
- UVA 11374 Halum (差分约束系统,最短路)
题意:给定一个带权有向图,每次你可以选择一个结点v 和整数d ,把所有以v为终点的边权值减少d,把所有以v为起点的边权值增加d,最后要让所有的边权值为正,且尽量大.若无解,输出结果.若可无限大,输出结 ...
- yaf框架流程一
资料参考: Yaf是一个C语言编写的PHP框架,以php扩展的形式. 是 laruence(鸟哥) 的作品 laruence 是PHP 开发组成员, PECL 开发者. Yaf, Taint等Pec ...
- ORACLE 常用SQL查询
一.ORACLE的启动和关闭 1 .在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a.启动ORACLE系统 oracle > sv ...
- 在Android中使用并发来提高速度和性能
Android框架提供了很实用的异步处理类.然而它们中的大多数在一个单一的后台线程中排队.当你需要多个线程时你是怎么做的? 众所周知,UI更新发生在UI线程(也称为主线程).在主线程中的任何操作都会阻 ...
- 使用rsync+inotify+apache做分布式图片服务器的部署方法
图片服务器一般是做成分布式的,但要使得所有的图片服务器的文件一致,可以由一个主服务器将文件推送到各个备份服务器上. rsync:文件差异检查及文件推送 inotify:事件触发,实时检测到添加.删除. ...
- svn log 不显示日志的问题
在你配好了Xcode里的SourceControl之后提交代码回复代码都很方便,可是为什么在Xcode上提交的log,在svn下面显示不出来! 解决办法是:在命令行下,先 svn update 一下, ...
- centos 安装mysql 登录进提示 Access denied for user 'root'@'localhost' (using password: NO)
# service mysqld stop # mysqld_safe --user=mysql --skip-grant-tables --skip-networking & # mysql ...
- hbm.xml支持的类型