2073. Log Files

Time limit: 1.0 second
Memory limit: 64 MB
Nikolay has decided to become the best programmer in the world! Now he regularly takes part in various programming contests, attentively listens to problems analysis and upsolves problems. But the point is that he had participated in such a number of contests that got totally confused, which problems had already been solved and which had not. So Nikolay conceived to make a program that could read contests’ logs and build beautiful summary table of the problems. Nikolay is busy participating in a new contest so he has entrusted this task to you!

Input

The first line contains an integer n (1 ≤ n ≤ 100). It‘s the number of contests‘ descriptions. Then descriptions are given. The first line of description consists of from 1 to 30 symbols — Latin letters, digits and spaces — and gives the name of contest. It‘s given that the name doesn‘t begin and doesn’t end with a space. In the second line of description the date of contest in DD.MM.YY format is given. It‘s also given that the date is correct and YY can be from 00 to 99 that means date from 2000 till 2099. In the third line of description there are numbers p and sseparated by space (1 ≤ p ≤ 13, 0 ≤ s ≤ 100). It‘s amount of problems and Nikolay’s submits in the contest. Then s lines are given. These are submits’ descriptions. Description of each submit consists of the problem‘s letter and the judge verdict separated by space. The letter of the problem is the title Latin letter and all problems are numbered by first p letters of English alphabet. The judge verdict can be one of the following: Accepted, Wrong Answer, Runtime Error, Time Limit Exceeded, Memory Limit Exceeded, Compilation Error.

Output

Print the table, which consists of n+1 lines and 3 columns. Each line (except the first) gives the description of the contest. The first column gives the name of the contest, the second column gives the date of the contest (exactly as it was given in the input), the third column gives the description of the problems. Every description of problems is the line of 13 characters, where thei-th character correlate with the i-th problem. If the problem got verdict Accepted at least one time, this character is ’o’. If the problem was submitted at least once but wasn’t accepted, the character is ’x’. If the problem was just given at the contest but wasn’t submitted, the character is ’.’. Otherwise, the character is ’ ’ (space). Contests in the table must be placed in the same order as in input.
Column with the name of the contest consists of 30 symbols (shorter names must be extended by spaces added to the right to make this length). Columns with the date and description of problems consist of 8 and 13 characters accordingly.
The first line of the table gives the names of columns. The boundaries of the table are formatted by ’|’, ’-’ и ’+’ symbols. To get detailed understanding of the output format you can look at the example.

Sample

input output
2
Codeforces Gamma Round 512
29.02.16
5 4
A Accepted
B Accepted
C Accepted
E Accepted
URKOP
17.10.15
12 11
A Accepted
B Wrong Answer
B Time Limit Exceeded
J Accepted
B Accepted
J Time Limit Exceeded
J Accepted
F Accepted
E Runtime Error
H Accepted
E Runtime Error
+------------------------------+--------+-------------+
|Contest name |Date |ABCDEFGHIJKLM|
+------------------------------+--------+-------------+
|Codeforces Gamma Round 512 |29.02.16|ooo.o |
+------------------------------+--------+-------------+
|URKOP |17.10.15|oo..xo.o.o.. |
+------------------------------+--------+-------------+
Problem Author: Kirill Borozdin (prepared by Kirill Borozdin, Alexey Danilyuk)
Problem Source: Ural Regional School Programming Contest 2015
Difficulty: 158 
 
大模拟
 #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的更多相关文章

  1. URAL 2073 Log Files (模拟)

    题意:给定 n 场比赛让你把名称,时间,比赛情况按要求输出. 析:很简单么,按照要求输出就好,注意如果曾经AC的题再交错了,结果也是AC的. 代码如下: #pragma comment(linker, ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. How to Collect Bne Log Files for GL Integrators

    In this Document   Goal   Solution APPLIES TO: Oracle General Ledger - Version 11.0 and laterInforma ...

  8. 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 ...

  9. 手动创建binary log files和手动编辑binary log index file会有什么影响

    基本环境:官方社区版MySQL 5.7.19 一.了解Binary Log结构 1.1.High-Level Binary Log Structure and Contents • Binlog包括b ...

随机推荐

  1. 解决安卓TextView异常换行,参差不齐等问题

    参考:http://blog.csdn.net/u012286242/article/details/28429267?utm_source=tuicool&utm_medium=referr ...

  2. Android 图片闪烁(延迟切换)

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&q ...

  3. 图文转换——NABCD

    我们小组要做的是一款可以对文字进行扫描转为txt格式将文字保存下来的移动通信终端的APP. N-need    生活中经常遇到这种问题,看到报纸上的一篇文章,特别想收藏这篇文章,或者是在网上看到一篇好 ...

  4. EMS-Demo 雇员管理系统演示

    做了一个小小的雇员管理系统,主要使用了JTable,然后比较得意的地方是实现了拼音搜索,感觉很高大上其实只要引入一个Jpinyin.jar就可以了(网上到处都有下载或者去我的git项目的lib中下载) ...

  5. CLR via C#(11)-无参属性、有参数属性(索引器)

    一. 无参属性 1. 定义属性 无参属性就是我们最常见的属性方式,在赋值时可以加入一定的逻辑判断.属性的定义其实不复杂,先看个直观的例子: 说明: 属性要定义名称和类型,且类型不能是void. 属性是 ...

  6. .NET开发工具之Excel导出公共类

    来源:Pino晨 链接:cnblogs.com/chenxygx/p/5954870.html 说明 最近接了一个任务,就是做一个列表的Excel导出功能.并且有很多页面都会使用这个功能. 导出的Ex ...

  7. repo 版本回退

    转自:http://blog.csdn.net/wed110/article/details/52179386 1.repo 回退到具体某一天的提交 repo forall -c 'ID=`Git l ...

  8. SQLAlchemy Core中的异常及事务处理样码

    这部门内容比较简单,立存. #coding=utf-8 from datetime import datetime from sqlalchemy import (MetaData, Table, C ...

  9. ArcGIS ElementLayer上放置Windows控件

    ElementLayer是ArcGIS API for Silverlight/WPF中的一种图层类型,主要用来承载Silverlight/WPF中的UIElement对象(UIElement),使用 ...

  10. php获取文件夹下面的文件列表和文件夹列表

    function getDir($dir) { $dirArray[] = NULL; if (false != ($handle = opendir( $dir ))) { $i=0; while ...