数学
文章平均质量分 65
qin603499247
爱编程,爱生活!
展开
-
nyoj街区最短路径问题
街区最短路径问题时间限制:3000 ms | 内存限制:65535 KB难度:4描述 一个街区有很多住户,街区的街道只能为东西、南北两种方向。住户只可以沿着街道行走。各个街道之间的间隔相等。用(x,y)来表示住户坐在的街区。例如(4,20),表示用户在东西方向第4个街道,南北方向第20个街道。现在要建一个邮局,使得各个住户到邮局的原创 2014-11-25 19:53:46 · 394 阅读 · 0 评论 -
数学中阶乘因式分解
代码如下:#include#include#includeusing namespace std;int main(){ int n; cin>>n; while(n--) { int m,m1; int count1=0; cin>>m>>m1; while(m>=m1) { count1+=(m/=m1); } cout<<count1<原创 2014-11-25 19:36:45 · 409 阅读 · 0 评论 -
中国剩余定理在ACM上的使用
Biorhythms时间限制:1000 ms | 内存限制:65535 KB难度:3描述Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, em原创 2014-12-11 13:45:05 · 1570 阅读 · 0 评论 -
折线划分平面
Splitting plane时间限制:1000 ms | 内存限制:65535 KB难度:2描述We have seen many problems about straight line splitting plane.Today ours problem has little difference with before.Because this原创 2014-12-12 00:44:20 · 385 阅读 · 0 评论 -
nyoj蚂蚁的难题
蚂蚁的难题(二)时间限制:1000 ms | 内存限制:65535 KB难度:3描述下雨了,下雨了,蚂蚁搬家了。已知有n种食材需要搬走,这些食材从1到n依次排成了一个圈。小蚂蚁对每种食材都有一个喜爱程度值Vi,当然,如果Vi小于0的时候,表示蚂蚁讨厌这种食材。因为马上就要下雨了,所以蚂蚁只能搬一次,但是能够搬走连续一段的食材。时间紧急,你快帮帮小原创 2014-12-14 13:55:16 · 380 阅读 · 0 评论