Problem 2725 --Array - Official House

2725: Array - Official House

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $364$ 正确数量 $218$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL

Official House 

You manage 4 buildings, each of which has 3 floors, each of which consists of 10 rooms. Write a program which reads a sequence of tenant/leaver notices, and reports the number of tenants for each room. 

For each notice, you are given four integers b, f, r and v which represent that v persons entered to room r of fth floor at building b. If v is negative, it means that v persons left. 

Assume that initially no person lives in the building.

In the first line, the number of notices n is given. In the following n lines, a set of four integers b, f, r and v which represents ith notice is given in a line.
For each building, print the information of 1st, 2nd and 3rd floor in this order. For each floor information, print the number of tenants of 1st, 2nd, .. and 10th room in this order. Print a single space character before the number of tenants. Print "####################" (20 '#') between buildings.
3
1 1 3 8
3 2 2 7
4 3 8 1
 0 0 8 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 7 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0

No incorrect building, floor and room numbers are given. 

0 ≤ the number of tenants during the management ≤ 9

推荐代码 查看2725 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] 时光代寄的信 788283 2021-11-28 23:45:32
内存最少[$0 $KB] 清泉流响 671875 2020-11-30 16:59:56
第一AC 刘成健 315138 2018-11-16 23:04:57
第一挑战 刘成健 315138 2018-11-16 23:04:57

赛题来源/所属竞赛 会津大学《C++ Programming I》 C++程序设计(入门)

竞赛编号 竞赛名称 竞赛时间 访问比赛
1663 2021-2022-1学期《C语言程序设计》:数组【21计算机】 2021-11-15 00:00:00 请登录
1567 2020-2021-1学期《C语言程序设计》:数组【20计算机12345】 2020-11-16 14:00:00 请登录
1392 2019-2020-1学期《C语言程序设计I》:数组II【19计算机12班】 2019-11-15 10:00:00 请登录