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. Android 录音

    想要实现wav格式的编码时我们也就不能再使用MediaRecorder,而只能使用AudioRecord进行处理

  2. C++面向对象基础知识

    多态是为了接口重用,封装和继承是为了代码重用 子类重新定义父类虚函数的方法叫做继承,不是重载! 一.基本概念 对于C++中经常出现的函数名称相同但是参数列表或者返回值不同的函数,主要存在三种情况: 1 ...

  3. 将前台json对象传入java后台

    前台json格式的数据如何传入后台 1. 将要传入后台的数据组装成JSON格式的字符串: var jsonStr = [{'name':'jim' , 'age':20} , {'name':'kin ...

  4. jQuery - 5.样式操作

    样式操作 1.获取样式 attr("class"), 2.设置样式attr("class","myclass"), 3.追加样式addCla ...

  5. 【131031】struts 1 中 <html:form>

    <DIV>来看看 使用 ActionForm 这个主题,当时使用了一个静态表单网页:<BR>* form.htm<BR><BR><BR>&l ...

  6. 【openGL】指定着色模型

    #include "stdafx.h" #include <GL/glut.h> #include <stdlib.h> #include <math ...

  7. AngularJS 之 Factory、Service、Provider

    当你初试 Angular 时,很自然地就会往 controller 和 scope 里堆满不必要的逻辑.一定要早点意识到,controller 这一层应该很薄:也就是说,应用里大部分的业务逻辑和持久化 ...

  8. 一次Promise 实践:异步任务的分组调度

    起因是在工作中遇到一个问题,可以用一个二维数组简单描述: [[1,2,3],[4,5,6],[7,8,9]] 这里每个数字都代表“一个异步计算任务”, 每个子数组把1个或多个计算任务划分成组,要求是: ...

  9. SQL Server 2014 BI新特性(二)结合Data Explorer和GeoFlow进行数据分析

    Data Explorer和GeoFlow作为Excel的新功能被写入到即将发布的SQL Server 2014当中.Data Explorer为业务分析人员提供了一种数据获取,整理以及组织的方式,通 ...

  10. 对服务器的ftp端口进行修改

    对服务器的ftp端口进行了修改,把21端口改了,比如221端口,就这样用221连接的时候,连接登录成功,但打不开目录,为何,总结如下: 1.完成一个FTP的传输过程不仅仅只需要21一个端口,而是2个端 ...