8月19号CCPC——CaoHaha's staff(未解答)

Problem Description
"You shall not pass!"
After shouted out that,the Force Staff appered in CaoHaha's hand.
As we all know,the Force Staff is a staff with infinity power.If you can use it skillful,it may help you to do whatever you want.
But now,his new owner,CaoHaha,is a sorcerers apprentice.He can only use that staff to send things to other place.
Today,Dreamwyy come to CaoHaha.Requesting him send a toy to his new girl friend.It was so far that Dreamwyy can only resort to CaoHaha.
The first step to send something is draw a Magic array on a Magic place.The magic place looks like a coordinate system,and each time you can draw a segments either on cell sides or on cell diagonals.In additional,you need 1 minutes to draw a segments.
If you want to send something ,you need to draw a Magic array which is not smaller than the that.You can make it any deformation,so what really matters is the size of the object.
CaoHaha want to help dreamwyy but his time is valuable(to learn to be just like you),so he want to draw least segments.However,because of his bad math,he needs your help.
 

Input
The first line contains one integer T(T<=300).The number of toys.
Then T lines each contains one intetger S.The size of the toy(N<=1e9).
 

Output
Out put T integer in each line ,the least time CaoHaha can send the toy.
 

Sample Input
5
1
2
3
4
5
 

Sample Output
4
4
6
6
7


这道题的题意是读懂了,但是在5对应7分钟的步骤中出现了卡壳,所以这道题直接放弃了。

这个题的大意就是:让能力者给你传送礼物,传送礼物的方法是在一个二维坐标系中,只能走轴和对角线,每走一步需要一分钟,每次只能走一个X/Y轴形成的格子,同时你的礼物的形状是无所谓的,只在乎礼物的体积,我们需要做的就是在知道礼物体积的情况下,我们在二维坐标系中用最短时间画出一个任意封闭的多边形来装这个礼物。输入这个最短时间(画法)。

测试用例,装1体积的需要4分钟,装2体积需要4分钟,装3体积需要6分钟,装4体积需要6分钟,装5体积需要7分钟。

我们团队对这题的猜测是,这道题是一个可以有规律的递归体。最后在5-7卡壳,也就结束了推测,也不知道猜测是否正确。欢迎指点!欢迎更新答案!

后序有结果会再更新出来答案。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值