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 ...
随机推荐
- ElasticSearch : APT-GET安装方式
Ubuntu下安装ES 新建非ROOT管理员用户 安装和配置JDK 打开下面的地址 https://www.elastic.co/guide/en/elasticsearch/reference/cu ...
- PHP基础3--文件加载-错误处理
主要: 1-文件加载 2-错误处理 文件加载 文件加载语句 1) 4个文件加载语句:include, require, include_once, require_once 2) 使用形式 ...
- 5、GDB调试工具的使用
GDB是GNU发布的一款功能强大的程序调试工具.GDB主要完成下面三个方面的功能: 1.启动被调试程序. 2.让被调试的程序在指定的位置停住. 3.当程序被停住时,可以检查程序状态(如变量值). #i ...
- 利用谷歌翻译网站和Adobe Acrobat翻译英文文档,且鼠标放置后显示英文原文(无字数限制)(18/12/11更新)
软件:Adobe Acrobat 网页:https://translate.google.cn/?tr=f&hl=zh-CN 方法: 第一步:用Adobe Acrobat 打开英文 ...
- C#/STM32 WAV转byte WAV数据格式
最近在做STM32音乐播放器,选取了最容易做的WAV格式. 为了更方便开发自己做了一个WAV转Byte的小上位机 附软件下载链接 链接:https://pan.baidu.com/s/1Zz7bczZ ...
- JDBC与Java数据库编程基础
一.JDBC 概述 1.什么是JDBC 称为Java数据库连接,它是一种用于数据库访问的应用程序API,由一组用Java语言编写的类和接口组成,有了JDBC就可以用同一的语法对多种关系数据库进行访问, ...
- Nginx初体验(一):nginx介绍
今天我们来介绍一下Nginx. Nginx是一款轻量级的Web服务器/反向代理服务器以及电子邮件(IMAP/POP3)代理服务器 特点: 反向代理,负载均衡,动静分离 首先我们来介绍一下正向代理服务器 ...
- DevExpress 学习链接
http://blog.csdn.net/u013816709/article/category/3114039 http://blog.csdn.net/david_520042/article/c ...
- 分享开源的GB/T-2260国家行政区划代码
项目中需要用到省市数据,在网上搜了一下,很多旧数据,稍微新一点的下载就要积分.X币什么的,很不爽,最后在GitHub上找到一个开源的,还有各种语言版本的,非常方便! https://github.co ...
- 成员变量:对象vs指针
一旦类初始化,那么对象必然会被创建,指针则可以在需要时候再去初始化所指向.