NOI2002Robot

2014年6月1日3,2951

Description

Input

Output

Sample Input

3
2 1
3 2
5 1

Sample Output

8
6
75

HINT

90号机器人有10个老师,加上它自己共11个。其中政客只有15号;军人有3号和5号;学者有8个,它们的编号分别是:2,6,9,10,18,30,45,90。

题解

为何我觉得这题十分恶心

f[i][0]表示前i个因数(不含2)的乘积m和它的老师中政客的独立数之和(包括自己)

f[i][1]表示前i个因数(不含2)的乘积m和它的老师中军人的独立数之和(包括自己)

 

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
Orz黄学长 Recent comment authors
  Subscribe  
提醒
Orz黄学长
Orz黄学长

f[a[0]][0]–是什么意思?