12611 - Beautiful Flag

 Beautiful Flag 

Teering is a little boy. He is trying to draw the nationalflag of Bangladesh. Being smart he knows he has to maintain the correct ratioand measurement while drawing the flag. You know the rules of drawing the nationalflag, don't you? If not, no worries, Teering is here to help you:

The national flag of Bangladesh consist of a greenrectangle with a red circle inside it. The ratio of the length and width of therectangle is 100 : 60 (i.e. if thelength is 100 units then the width willbe 60 units). The radius of the circle is 20%of the length (i.e. if the length is 100 units then the radius of the circlewill be 20 units). To get the center of the circle you need to draw ahorizontal line dividing the width inequal portion and draw a vertical line dividing the length in 45 : 55 ratio (i.e. if the length of the rectangle is 100then 45 units will be in left and 55 units will be on the right side of theline). The crossing of the two lines will be the center of the circle. Here isan illustrated picture for better understanding.

\epsfbox{p12611.eps}

Now Teering has started to draw a flag. He has alreadydrawn the circle of radius R centeredat the origin in a 2D co-ordinatesystem. Now he needs to determine the corner of the rectangle so that he canjoin them to complete the flag. Can you help him?

Input 

The first line of input will contain an integer T (T < 101) denotingthe number of test cases. Each of the following T lines will contain an integer R (R < 1001) each denotingthe radius of the circle.

Output 

For each input output five lines. The first line willcontain the case number. The following four lines will denote the upper left, upper right, lower rightand lower left coordinates of therectangle for the flag respectively. You have to print x coordinate and ycoordinate separated by space in each line. You may assume that input is givenin such that the corners will always bein integer coordinates. See sample input output for details.

Sample Input 

2
20
100

Sample Output 

Case 1:
-45 30
55 30
55 -30
-45 -30
Case 2:
-225 150
275 150
275 -150
-225 -150
#include<stdio.h>
int main()
{
	int t,count=1;
	scanf("%d",&t);
	while(t--)
	{
		int n,x,xx,y;
		scanf("%d",&n);
		x=5*n/20*9;
		xx=5*n/20*11;
		y=5*n*6/10/2;
		printf("Case %d:\n",count++);
		printf("-%d %d\n%d %d\n%d -%d\n-%d -%d\n",x,y,xx,y,xx,y,x,y);
	}
	return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: vue-admin-beautiful-plus 是一个基于 Vue.js 和 Element UI 的后台管理系统模板,它提供了丰富的组件和功能,可以快速搭建出美观、易用的后台管理系统。它支持多种主题和布局,可以根据不同的需求进行定制。此外,它还提供了丰富的文档和示例,方便开发者快速上手。 ### 回答2: vue-admin-beautiful-plus是一个开源的基于Vue.js的后台管理系统解决方案。它是在vue-admin-template和ant-design-vue的基础上进行二次开发而来的,并加入了一些额外的功能和特性。 vue-admin-beautiful-plus提供了一套易于使用、美观且功能强大的界面组件,使得开发者能够更加便捷地构建自己的后台管理系统。它包含了诸如菜单栏、面包屑导航、表格、表单、图表和各种常用的UI组件等等,同时也支持自定义主题样式。 除了基本的界面组件,vue-admin-beautiful-plus还提供了一些高级功能,例如路由权限管理、动态菜单生成、多语言支持等等。这些功能能够大大提高开发效率,同时也能够满足不同项目的需求。 值得一提的是,vue-admin-beautiful-plus还提供了一些内置的业务组件和模板,例如用户管理、角色管理、权限管理等等,这些组件和模板可以在快速开发过程中起到很好的辅助作用。 总之,vue-admin-beautiful-plus是一个功能丰富、易于使用且美观的后台管理系统解决方案,它能够帮助开发者快速构建高质量的后台管理系统。无论是个人项目还是企业项目,都可以考虑使用vue-admin-beautiful-plus来提升开发效率和用户体验。 ### 回答3: vue-admin-beautiful-plus 是一个基于 Vue.js 框架的管理后台模板。它是从 vue-admin-beautiful 项目中改良出来的,加入了更多的功能和样式选择。这个模板提供了许多常见的管理后台功能页面,例如仪表盘、表格、表单、图表等,可以帮助开发人员快速搭建一个美观且功能强大的管理后台系统。 vue-admin-beautiful-plus使用了 Element Plus UI 框架,它是 Element UI 的升级版本,提供了更丰富和成熟的组件库。开发人员可以通过自定义指令和组件参数的方式,非常方便地扩展和定制页面的功能和样式。 该模板还提供了许多实用的插件和工具,例如权限管理插件、国际化插件等,可以帮助开发人员更好地管理和维护后台系统。另外,vue-admin-beautiful-plus 还支持响应式设计,适配了不同尺寸的设备,使得后台系统在手机、平板和电脑等各种设备上都能良好地展示和使用。 总的来说,vue-admin-beautiful-plus 是一个功能齐全、易用且美观的管理后台模板,能够帮助开发人员快速构建出强大的管理后台系统。无论是个人开发者还是企业开发团队,都能够在该模板的基础上进行二次开发和定制,以满足自己的具体需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值