http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/E Description An infinitely long railway has a train consisting of n cars, numbered from 1 to n (the numbers of all the cars are distinct) and positioned in arbitrary order. David B…
题 SmallR is an archer. SmallR is taking a match of archer with Zanoes. They try to shoot in the target in turns, and SmallR shoots first. The probability of shooting the target each time is  for SmallR while  for Zanoes. The one who shoots in the tar…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/D The famous Korean internet company has provided an internet-based photo service which allows The famous Korean internet company users to directly take a photo of an astronomical p…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/C Description I’ve bought an orchard and decide to plant some apple trees on it. The orchard seems like an N * M two-dimensional map. In each grid, I can either plant an apple tree…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/B A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when t…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/A In an open credit system, the students can choose any course they like, but there is a problem. Some of the students are more senior than other students. The professor of such a c…
[codeforces 415D]Mashmokh and ACM 题意:美丽数列定义:对于数列中的每一个i都满足:arr[i+1]%arr[i]==0 输入n,k(1<=n,k<=2000),问满足[数列长度是k && 数列中每一个元素arr[i]在1~n之间 && 数列中元素可以重复]的数列有多少个?结果对10^9+7取余 解题思路:dp[i][j]表示长度是j,最后一位是i的种数 if(kk%i==0) dp[kk][j+1]+=dp[i][j] #inc…
C. Sorting Railway Cars Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://www.codeforces.com/contest/606/problem/C Description An infinitely long railway has a train consisting of n cars, numbered from 1 to n (the numbers of all the cars are distin…
题目链接: http://codeforces.com/gym/100825 题目大意: N(N<=600)个点,每个点有个名字Si,R(R<=200)个生产商在R个点上,F(F<=200)个工厂在F个点上,不会有一个点既有生产商又有工厂 有T(T<=1000)个公司,每个公司能够到达Ci个点,并且一个只能运输一个生产商的货物.比如生产商1给工厂1运输货物需要用到公司1,那么其余生产商就不能用公司1 一个工厂需要任意一个生产商供应货物,求最多能够给多少个工厂供应货物. 题目思路:…
题目链接: http://codeforces.com/gym/100825 题目大意: 给你一张N*N(N<=100)的图表示一个树桩,'T'为年轮,'.'为空,求每个'T'属于哪一圈年轮,空的为'.',如果最内圈<10,每个格子用两位表示,否则用三位,不足的用'.'补足. 题目思路: [宽搜] 初始所有点标记为INF,先将图上所有的'.'标记为0,边缘如果有'T'记为1,并把'.'和边缘所有的点加入队列,接下来一个一个上下左右扩展并更新答案,没进队的进队.最后输出. // //by coo…