日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > 互聯網 > hdu 5047 Sawtooth--2014acm上海賽區邀請賽(附java模板)

hdu 5047 Sawtooth--2014acm上海賽區邀請賽(附java模板)

來源:程序員人生   發布時間:2014-10-21 08:00:00 閱讀次數:3347次

題目鏈接:http://acm.hdu.edu.cn/showproblem.php?pid=5047

Sawtooth

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 377    Accepted Submission(s): 116


Problem Description
Think about a plane:

● One straight line can divide a plane into two regions.
● Two lines can divide a plane into at most four regions.
● Three lines can divide a plane into at most seven regions.
● And so on...

Now we have some figure constructed with two parallel rays in the same direction, joined by two straight segments. It looks like a character “M”. You are given N such “M”s. What is the maximum number of regions that these “M”s can divide a plane ?

 

Input
The first line of the input is T (1 ≤ T ≤ 100000), which stands for the number of test cases you need to solve.

Each case contains one single non-negative integer, indicating number of “M”s. (0 ≤ N ≤ 1012)
 

Output
For each test case, print a line “Case #t: ”(without quotes, t means the index of the test case) at the beginning. Then an integer that is the maximum number of regions N the “M” figures can divide.
 

Sample Input
2 1 2
 

Sample Output
Case #1: 2 Case #2: 19
 

Source
2014 ACM/ICPC Asia Regional Shanghai Online
 

Recommend
hujie   |   We have carefully selected several similar problems for you:  5052 5051 5049 5048 5046 
 

Statistic | Submit | Discuss | Note


一道規律題吧。

公式是這樣的     8*n^2 - 7*n + 1

不過出題人似乎故意卡java來增加題目的難度。。。

作為一個ACM弱渣。。。本

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 国产精品伊人 | 国产免费看片 | 欧美a∨一区二区三区久久黄 | 欧美aaaaaaaaaa | 国产在线观看一区二区三区 | 久久熟| 99re视频在线播放 | 国产 日韩 欧美 在线 | 黄色片com| 99精品国产高清在线观看 | 欧美在线观看第一页 | 91色网站 | 精品一区二区久久 | 簧片在线免费观看 | 欧美福利一区二区 | 国产日韩亚洲欧美 | 成人深夜福利 | 伊人伊成久久人综合网站 | 91亚洲精品一区二区 | 午夜免费av | 91免费视频网 | 美女福利视频网站 | 不卡精品视频 | 97秋霞影院| 岛国一区 | 国产一区二区三区欧美 | 久久久久国产一区二区三区 | 嫩草91| 污视频在线观看免费 | 黄色av网 | 久久久久成人精品 | 久久久黄网 | 在线日韩精品视频 | 可以在线观看的av网站 | 精品成人久久 | 成人18视频在线观看 | 色综合久久88色综合天天 | 久久免费视频观看 | 日韩精品免费一区二区在线观看 | 国产精品久久久久久久久久久免费看 | 日韩精品极品在线观看 |