A Computer Graphics Problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 43    Accepted Submission(s): 40

Problem Description
In this problem we talk about the study of Computer Graphics. Of course, this is very, very hard.
We have designed a new mobile phone, your task is to write a interface to display battery powers.
Here we use '.' as empty grids.
When the battery is empty, the interface will look like this:

*------------*
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
*------------*

When the battery is 60% full, the interface will look like this:

*------------*
|............|
|............|
|............|
|............|
|------------|
|------------|
|------------|
|------------|
|------------|
|------------|
*------------*

Each line there are 14 characters.
Given the battery power the mobile phone left, say x%, your task is to output the corresponding interface. Here x will always be a multiple of 10, and never exceeds 100.

 
Input
The first line has a number T (T < 10) , indicating the number of test cases.
For each test case there is a single line with a number x. (0 < x < 100, x is a multiple of 10)
 
Output
For test case X, output "Case #X:" at the first line. Then output the corresponding interface.
See sample output for more details.
 
Sample Input
2
0
60
 
Sample Output
Case #1:
*------------*
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
*------------*
Case #2:
*------------*
|............|
|............|
|............|
|............|
|------------|
|------------|
|------------|
|------------|
|------------|
|------------|
*------------*
 
Source
 
Recommend
zhuyuanchen520
 

大水题一发

就是拼手速

 /* ***********************************************
Author :kuangbin
Created Time :2013-9-11 12:01:07
File Name :2013-9-11\1001.cpp
************************************************ */ #include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <time.h>
using namespace std;
int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int iCase = ;
int T;
int n;
scanf("%d",&T);
while(T--)
{
iCase++;
printf("Case #%d:\n",iCase);
scanf("%d",&n);
printf("*");
for(int i = ;i < ;i++)printf("-");
printf("*\n");
int t = n/;
for(int i = ;i < -t;i++)
{
printf("|");
for(int j = ;j < ;j++)printf(".");
printf("|\n");
}
for(int i = ;i < t;i++)
{
printf("|");
for(int j = ;j < ;j++)printf("-");
printf("|\n");
}
printf("*");
for(int i = ;i < ;i++)printf("-");
printf("*\n"); }
return ;
}

HDU 4716 A Computer Graphics Problem (水题)的更多相关文章

  1. HDU 4716 A Computer Graphics Problem

    A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (J ...

  2. HDU 4716 A Computer Graphics Problem 2013年四川省赛题

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 题目大意不用解释了吧,看案例就能明白 #include<cstdio> #inclu ...

  3. HDU-4716 A Computer Graphics Problem 水题

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 直接搞.. //STATUS:C++_AC_0MS_288KB #include <fun ...

  4. 水题 HDOJ 4716 A Computer Graphics Problem

    题目传送门 /* 水题:看见x是十的倍数就简单了 */ #include <cstdio> #include <iostream> #include <algorithm ...

  5. HDU 5170 GTY's math problem 水题

    题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5170 bc(中文):http://bestcoder.hdu.edu.cn/contests ...

  6. HDUOJ----A Computer Graphics Problem

    A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (J ...

  7. HDU 2096 小明A+B --- 水题

    HDU 2096 /* HDU 2096 小明A+B --- 水题 */ #include <cstdio> int main() { #ifdef _LOCAL freopen(&quo ...

  8. hdu 2117:Just a Numble(水题,模拟除法运算)

    Just a Numble Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tot ...

  9. hdu 2050:折线分割平面(水题,递归)

    折线分割平面 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Subm ...

随机推荐

  1. 线性表应用--Josephus问题的解法(Python 版)

    线性表应用 --Josephus问题的解法(Python 版) Josephus问题描述:假设有n个人围坐一圈,现在要求从第k个人开始报数,报到第m个数的人退出.然后从下一个人开始继续报数并按照相同的 ...

  2. python面向对象(六)之元类

    元类 1. 类也是对象 在大多数编程语言中,类就是一组用来描述如何生成一个对象的代码段.在Python中这一点仍然成立: In [13]: class ObjectCreator(object): . ...

  3. JSP和Servlet那些事儿系列--HTTPS

    原文:http://qingkangxu.iteye.com/blog/1614053 <JSP和Servlet那些事儿 >系列文章旨在阐述Servlet(Struts和Spring的MV ...

  4. SQL Server 管理常用的SQL和T-SQL

    1. 查看数据库的版本 select @@version 常见的几种SQL SERVER打补丁后的版本号: 8.00.194 Microsoft SQL Server 2000 8.00.384 Mi ...

  5. 一步一步学习IdentityServer4 (4) 处理特殊需求之-登录等待页面

    用IdentityServer3的时候登录如果采用Post方式大家会发现有中间有一个等待Submit空白页面,界面不友好,现在我想把这个修改自定义的页面Loading 在Identityserver3 ...

  6. Adapter.notifyDataSetChanged()源码分析以及与ListView.setAdapter的区别

    一直很好奇,notifyDataSetChanged究竟是重绘了整个ListView还是只重绘了被修改的那些Item,它与重新设置适配器即调用setAdapter的区别在哪里?所以特地追踪了一下源码, ...

  7. mysql中的包含语句INSTR的使用

    1.目前测试百万级数据,效率还是相当可观,感觉比like更精准! 例句 今天项目遇到一个问题,每个用户都有自己的所属渠道,当登录后台操作时,要列出隶属于自己拥有渠道的用户列表,当初想到使用全部遍历出来 ...

  8. 【LOJ】#2024. 「JLOI / SHOI2016」侦查守卫

    题解 童年的回忆! 想当初,这是我考的第一次省选,我当时初二,我什么都不会,然后看着这个东西,是不是能用我一个月前才会的求lca,光这个lca我就调了一个多小时= =,然后整场五个小时,我觉得其他题不 ...

  9. 【POJ】2069.Super Star

    题解 求一个最小的半径的球,包括三维平面上所有的点,输出半径 随机移动球心,半径即为距离最远的点,移动的方式是向离的最远的那个点移动一点,之后模拟退火就好 代码 #include <iostre ...

  10. git status中文文件名编码问题解决

    在默认设置下,中文文件名在工作区状态输出,中文名不能正确显示,而是显示为八进制的字符编码. 通过将git配置变量 core.quotepath 设置为false,就可以解决中文文件名称在这些Git命令 ...