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卡殼,也就結束了推測,也不知道猜測是否正確。歡迎指點!歡迎更新答案!

後序有結果會再更新出來答案。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章