Log Files
Description
Input
Output
Sample Input
| input | output |
|---|---|
2 |
+------------------------------+--------+-------------+ |
题目意思:根据每一次比赛的结果生成一个总结的表格,刚开始确实没看懂这是什么意思,尤其是vj上的那个破排版,输出的表格是一半一半的,思路很简单,操作有点麻烦吧。
#include<stdio.h>
#include<string.h>
struct message
{
char id;
char ss[];
};
int main()
{
int t,i,j,m,n,k,flag;
int num[];
char s[],x[];
scanf("%d",&t);
getchar();
for(j=;j<t;j++)
{
gets(s);
gets(x);
struct message a[];
memset(num,,sizeof(num));
flag=;
scanf("%d%d",&n,&m);
getchar();
for(i=; i<m; i++)
{
scanf("%c",&a[i].id);
getchar();
gets(a[i].ss);
if(strcmp(a[i].ss,"Accepted")==)
{
num[a[i].id-'A']=;
}
else if(strcmp(a[i].ss,"Accepted")!=&&num[a[i].id-'A']!=)
{
num[a[i].id-'A']=;
}
else
{
continue;
} }
if(flag==)
{
printf("+------------------------------+--------+-------------+\n");
printf("|Contest name |Date |ABCDEFGHIJKLM|\n");
printf("+------------------------------+--------+-------------+\n");
flag=;
}
printf("|%-30s|%s|",s,x);
for(i=;i<n;i++)
{
if(num[i]==)
{
printf(".");
}
else if(num[i]==)
{
printf("o");
}
else if(num[i]==)
{
printf("x");
}
}
for(k=;k<=-n;k++)
{
printf(" ");
}
printf("|\n");
printf("+------------------------------+--------+-------------+\n");
}
return ;
}
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 ...
- 调整innodb redo log files数目和大小的具体方法和步骤
相较于Oracle的在线调整redo日志的数目和大小,mysql这点则有所欠缺,即使目前的mysql80版本,也不能对innodb redo日志的数目和大小进行在线调整,下面仅就mysql调整inno ...
随机推荐
- 19-3-4 Python进制转换;bool str int三者之间的转换;字符串的索引,切片;for循环的使用
进制转换: 二进制转十进制: 0010 1111 = 1*2**0+1*2**1+1*2**2+1*2**3+1*2**5 十进制转换二进制: 用十进制数除2逆序取余 --->101010 布 ...
- Linux每日一命令:【00】总纲
Linux每日一命令更新频率为每周5篇. 文章结构如下: 简介 语法 选项 参数 常用实例 实用技巧(可选) 参考文档 文章目录如下: 2018-02-19 20:15 -- Linux每日一命令:[ ...
- 使用jQuery实现向上循环滚动效果(超简单)
今天突发奇想 想到的一个新思路 通过使用animate改变外边距达到滚动效果 再用复制节点插入到最后一行达到循环目的 HTML代码如下 <body> <ul style=" ...
- MySQL---正确使用索引、limit分页、执行计划、慢日志查询
正确使用索引 数据库表中添加索引后确实会让查询速度起飞,但前提必须是正确的使用索引来查询,如果以错误的方式使用,则即使建立索引也会不奏效.即使建立索引,索引也不会生效: - like '%xx' se ...
- rails中使用CarrierWave实现文件上传的功能
之前在用django写blog的时候头像上传和头像预览都是使用原生的js实现的,之前也有写了一篇blog.好了开始进入正题 rails中实现头像上传十分的方便,只要通过CarrierWave这个gem ...
- win10安装kali组双系统
一.镜像下载: 根据需求下载自己需要的版本 从官网下载kali 2018.2 的安装包:https://www.kali.org/downloads/ 二.烧录: 这里推荐用 win32 disk i ...
- 部署zabbix,自动发现lnmp环境,监控主机状态,实现 邮件及微信报警(配置server端)
二.配置server端监控 1.监控apache 首先在本机下载模板:https://github.com/rdvn/zabbix-templates/archive/master.zip 该 zi ...
- app与php后台接口登录认证、验证(seesion和token)
简要:随着电商的不断发展,APP也层次不穷,随着科技的发展主要登录形式(微信.QQ.账号/密码):为此向大家分享一下"app与php后台接口登录认证.验证"想法和做法:希望能够帮助 ...
- flash读写学习笔记与spi接口及简单测试验证(三)
FPGA中的视频图像资源,以及想要永久存储的程序都是要存储在flash中,flash是FPGA一个不可缺少的部分,flash的种类有很多,根据winbond公司的128Mbit Qual SPI接口的 ...
- 博科Brocade 300光纤交换机配置zone教程
光纤交换机作为SAN网络的重要组成部分,在日常应用中非常普遍,本次将以常用的博科交换机介绍基本的配置方法. 博科300实物图: 环境描述: 如上图,四台服务器通过各自的双HBA卡连接至两台博科300光 ...