A Computer Graphics Problem 4176 2013上海邀请赛

A Computer Graphics Problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)

Total Submission(s): 968    Accepted Submission(s): 688

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

2013 ACM/ICPC Asia Regional Online —— Warmup2

比较简单,思路可以自己找。

#include<cstdio>
int main()
{
  int t;
  int n,k=1;
  scanf("%d",&t);
  while(t--)
  {
    scanf("%d",&n);
	printf("Case #%d:\n",k++);
	printf("*------------*\n");
	for(int i=0;i<10-n/10;i++)
		printf("|............|\n");
	for(int j=0;j<n/10;j++)
	printf("|------------|\n");
		printf("*------------*\n");
  }
  return 0;
}

A Computer Graphics Problem 4176 2013上海邀请赛

时间: 2024-12-28 19:45:07

A Computer Graphics Problem 4176 2013上海邀请赛的相关文章

水题 HDOJ 4716 A Computer Graphics Problem

题目传送门 1 /* 2 水题:看见x是十的倍数就简单了 3 */ 4 #include <cstdio> 5 #include <iostream> 6 #include <algorithm> 7 #include <cstring> 8 #include <string> 9 #include <cmath> 10 using namespace std; 11 12 const int MAXN = 1e4 + 10; 13

HDU 4716 A Computer Graphics Problem(模拟啊 )

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 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 displa

2013 成都邀请赛

今年又要打邀请赛了,前段时间做比赛都被虐的够呛.感觉不会再爱了...所以挂了下去年的成都邀请赛的题目.发现简单题还是能切上几道的,可是难题就无能为力了.. .阿门,还是水平差得远啊.. . (ps:近期感觉状态不佳.依靠了队友神勇的发挥. .. Current Time: 2014-05-15 08:43:24 Contest Type: Public Start Time: 2014-05-14 15:10:00 Contest Status: Ended End Time: 2014-05-

[POI 2001+2014acm上海邀请赛]Gold Mine/Beam Cannon 线段树+扫描线

Description Byteman, one of the most deserving employee of The Goldmine of Byteland, is about to retire by the end of the year. The Goldmine management would like to reward him in acknowledgment of his conscientious work. As a reward Byteman may rece

以图学习linux graphics -Mesa (computer graphics) 软件架构图

查看: 212|回复: 1    以图学习linux graphics -Mesa (computer graphics) 软件架构图 [复制链接]     titer1 轻车都尉(从四品) 注册时间 2014-8-22 积分 1095 串个门 加好友 打招呼 发消息 电梯直达 1#  发表于 2014-10-3 23:29:43 |只看该作者 |倒序浏览 本帖最后由 titer1 于 2014-10-3 23:29 编辑 Linux_kernel_and_OpenGL_video_game 更

2013 长沙邀请赛 ADEGH 题解

HDU 4565 So Easy! 类似fib的构造 设Fn = x + y*sqrt(b) 啪啦啪啦 #include <cstdio> #include <cstring> #include <vector> #include <cmath> #include <iostream> using namespace std; typedef vector<long long> vec; typedef vector<vec&g

上海邀请赛之热身赛2_2013成都邀请赛

先写总结. 感觉这次跟scf和sjc组队有种瞬间碉堡了的感觉,虽然是临时组建的队伍凑齐准备去上海参加邀请赛,从这次比赛磨练配合. 今天比赛难度比前天那次的难度低,感觉更适合我们来练习. 话说好像比赛提早了5分钟,我们三个人都不知道,五分钟后一看A题学长已经A了,一想肯定特水...我就没看题,sjc和scf两个看了题,scf就开始敲了,我刚开始负责翻译题,虽然我英语是个渣渣...没办法,没翻译他们几乎做不出题...我就没做题,翻译了B和G.scf敲了貌似好久才完成(赛后重做,特水,基本3分钟就可以

Computer Graphics - code_1

/*------------------------------------ author:XD_G location:SWUN time:09/2015~01/2016 course:Computer Graphics teacher:Tianyun Huang ------------------------------------*/ #include <iostream> #include <vector> #include <GL/glut.h> #pragm

A simple problem(湘大邀请赛)

A simple problem Accepted : 61   Submit : 418 Time Limit : 15000 MS   Memory Limit : 655360 KB Problem Description There is a simple problem. Given a number N. you are going to calculate N%1+N%2+N%3+...+N%N. Input First line contains an integer T, th