Dain

写出一个可以工作的程序并不够

统计

留言簿(3)

积分与排名

良师益友

阅读排行榜

评论排行榜

算法求解(还没有人做出来,唉)

Given an int m and a vector <int> a containing n numbers, return the result of the following expression:

Notes

-

The expression is calculated from top to bottom.

-

"x mod y" means the remainder of x divided by y.

-

Assume 0! = 1.

Constraints

-

a will contain between 1 and 50 elements, inclusive.

-

Each element of a will be between 0 and 2147483647, inclusive.

-

m will be between 1 and 40000, inclusive.

posted on 2006-12-21 10:58 Dain 阅读(993) 评论(6)  编辑 收藏 引用 所属分类: 算法问题

评论

# re: 算法求解 2006-12-21 11:52 pengkuny

好好想一想,幂与模的几个定理都忘了

你现在有些什么想法?  回复  更多评论   

# re: 算法求解 2006-12-21 12:27 Dain

在想ing
有什么想法,交流交流  回复  更多评论   

# re: 算法求解 2006-12-21 18:35 Dain

做出来有奖  回复  更多评论   

# re: 算法求解(还没有人做出来,唉) 2006-12-24 20:57 李锦俊

看不到图了  回复  更多评论   

# re: 算法求解(还没有人做出来,唉) 2006-12-24 22:19 Dain

@李锦俊
能看到阿,可能显示慢吧  回复  更多评论   

# re: 算法求解(还没有人做出来,唉) 2006-12-26 19:57 Dain

看来,没人做出来啊

我只好贴答案咯

http://www.topcoder.com/tc?module=Static&d1=match_editorials&d2=srm283  回复  更多评论   


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理