HDUOJ----A Computer Graphics Problem
A Computer Graphics Problem
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 92 Accepted Submission(s): 80
- *------------*
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
|............|
*------------*
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.
- #include<iostream>
- #include<cstdio>
- using namespace std;
- int main()
- {
- int i,j,t,n,cnt;
- scanf("%d",&t);
- for(cnt=;cnt<=t;cnt++)
- {
- scanf("%d",&n);
- printf("Case #%d:\n",cnt);
- for(i=;i<;i++)
- {
- for(j=;j<;j++)
- {
- if(i==||i==)
- {
- if(j==||j==)
- printf("*");
- else
- printf("-");
- }
- else
- if(j==||j==)
- printf("|");
- else
- if(i<=-n/)
- printf(".");
- else
- printf("-");
- }
- puts("");
- }
- }
- return ;
- }
HDUOJ----A Computer Graphics Problem的更多相关文章
- 水题 HDOJ 4716 A Computer Graphics Problem
题目传送门 /* 水题:看见x是十的倍数就简单了 */ #include <cstdio> #include <iostream> #include <algorithm ...
- HDU 4716 A Computer Graphics Problem
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- HDU 4716 A Computer Graphics Problem (水题)
A Computer Graphics Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...
- HDU-4716 A Computer Graphics Problem 水题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 直接搞.. //STATUS:C++_AC_0MS_288KB #include <fun ...
- HDU 4716 A Computer Graphics Problem 2013年四川省赛题
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4716 题目大意不用解释了吧,看案例就能明白 #include<cstdio> #inclu ...
- Mathematics for Computer Graphics数学在计算机图形学中的应用 [转]
最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=10509 [译]Mathematics for Computer Gra ...
- Mathematics for Computer Graphics
Mathematics for Computer Graphics 最近严重感觉到数学知识的不足! http://bbs.gameres.com/showthread.asp?threadid=105 ...
- Mesa (computer graphics)
http://en.wikipedia.org/wiki/Mesa_(computer_graphics) Mesa (computer graphics) From Wikipedia, the f ...
- Computer Graphics Research Software
Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...
随机推荐
- android之截屏(包括截取scrollview与listview的)
public class ScreenShot { // 获取指定Activity的截屏,保存到png文件 public static Bitmap takeScreenShot(Activity a ...
- [PHP] Ubuntu 16.10 开启PHP错误提示
两个步骤: 修改php.ini配置文件中的error_reporting 和 display_errors两地方内容: sudo vim /etc/php/7.0/apache2/php.ini er ...
- CVPR14 图像检索papers
CVPR14年关于图像检索方面的papers,汇总成一个list,方便阅读. 图像检索 Triangulation embedding and democratic aggregation for i ...
- C语言:使用realloc函数对malloc或者calloc动态分配的内存大小进行扩展
#include<stdio.h> #include<stdlib.h> #include<time.h> typedef struct { char name[3 ...
- OTL翻译(10) -- OTL的流缓冲池
OTL的流缓冲池 一般来讲,流一般作为一个局部的变量被使用,当使用完毕后就立刻关闭,如果需要再次使用就需要再次的声明变量,如此循环.OTL流的缓冲池(内存池)是一个解决以往的流性能低下的一个机制.当流 ...
- Zabbix iostat 监控配置
## zabbix iostat 监控模板安装与配置 配置定时任务,用于生成iostat的统计数据 crontab -e * * * * * /usr/local/zabbix327/bin/iost ...
- GO语言基础条件、跳转、Array和Slice
1. 判断语句if 1. 条件表达式没有括号(这点其他语言转过来的需要注意) 2. 支持一个初始化表达式(可以是并行方式,即:a, b, c := 1, 2, 3) 3. 左大括号必须和条件语句或 e ...
- 交叉编译git
git依赖openssl.zlib. 首先编译openssl ./Configure linux-armv4 shared 修改Makefile,CC.RANLIB.MAKEDEPPROG为对应的交叉 ...
- [Big Data] Week4B (Basic)
Question 1 Note: In this question, all columns will be written in their transposed form, as rows, to ...
- CSS半透明兼容写法
filter: Alpha(opacity=10); -moz-opacity:0.1; opacity:0.1; 例如: background:#A5CD40; filter: Alpha(opac ...