麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 開發設計 > 正文

poj3734Blocks(矩陣快速優化的dp)

2019-11-14 09:41:18
字體:
來源:轉載
供稿:網友

Blocks
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 6418 Accepted: 3090

Description

Panda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he starts to think of a math PRoblem of painting. Suppose there are N blocks in a line and each block can be paint red, blue, green or yellow. For some myterious reasons, Panda want both the number of red blocks and green blocks to be even numbers. Under such conditions, Panda wants to know the number of different ways to paint these blocks. 

Input

The first line of the input contains an integer T(1≤T≤100), the number of test cases. Each of the next T lines contains an integer N(1≤N≤10^9) indicating the number of blocks. 

Output

For each test cases, output the number of ways to paint the blocks in a single line. Since the answer may be quite large, you have to module it by 10007. 

Sample Input

212

Sample Output

26

Source

PKU Campus 2009 (POJ Monthly Contest – 2009.05.17), Simon


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 久久一区二区三区av | 久久精品日产高清版的功能介绍 | 伊人二本二区 | 一级做受毛片免费大片 | 午夜视频你懂的 | 在线成人亚洲 | 9797色| 一级爱爱 | 国产亲子伦在线观看 | 国产一级毛片高清视频完整版 | 精品国产亚洲人成在线 | 成人毛片网站 | 91美女视频在线观看 | 久久96国产精品久久秘臀 | 欧美一级免费视频 | 在线播放一区二区三区 | 国产精品爱久久久久久久 | 曰批全过程120分钟免费69 | 精品一区二区久久久久久按摩 | 免费黄色大片网站 | 久久久久北条麻妃免费看 | 综合图区亚洲 | 在线观看免费毛片视频 | 在线中文字幕亚洲 | 视频一区免费观看 | 亚洲午夜免费电影 | 91九色蝌蚪国产 | 欧美高清在线精品一区二区不卡 | 成人免费福利视频 | 国产精品久久久久久婷婷天堂 | 鲁丝一区二区二区四区 | 爱操影视| 欧产日产国产精品乱噜噜 | 蜜桃一本色道久久综合亚洲精品冫 | 国产午夜精品一区二区三区四区 | 亚洲第一黄色网 | 国产成人高清在线 | 成人精品 | 91精品国产91久久久 | 黄色高清免费 | 国产一级毛片高清视频 |