![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pat
文章平均质量分 83
orange_melon
这个作者很懒,什么都没留下…
展开
-
Hashing - Hard Version
Given a hash table of size NNN, we can define a hash function . Suppose that the linear probing is used to solve collisions, we can easily obtain the status of the hash table with a given sequence o原创 2017-07-13 10:19:31 · 594 阅读 · 0 评论 -
1018. Public Bike Management (30)
Public Bike Management (30)时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueThere is a public bike service in Hangzhou City which provides great convenience to the tourists from all ove原创 2017-10-15 20:00:30 · 220 阅读 · 0 评论 -
pat 1012. The Best Rank (25)
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algebra), and E - Engl原创 2017-07-20 09:23:56 · 279 阅读 · 0 评论 -
1011. World Cup Betting (20)
#include#include#includeusing namespace std;int main(){ double ans=1; double a,b,c; for (int i=0;i<3;i++) { scanf("%lf%lf%lf",&a,&b,&c); if (a>b&&a>c){ printf("W "); ans*=a; }原创 2017-07-18 15:19:40 · 172 阅读 · 0 评论 -
pat 1009. Product of Polynomials (25)
Product of Polynomials (25)时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue This time, you are supposed to find A*B where A and B are two polynomials.Input Specification:E原创 2017-07-18 10:06:03 · 217 阅读 · 0 评论 -
1015. Reversible Primes (20)
A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pri原创 2017-07-21 09:16:01 · 290 阅读 · 0 评论 -
pat 1014. Waiting in Line
Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space in原创 2017-07-20 16:27:42 · 193 阅读 · 0 评论 -
pat 1013. Battle Over Cities (25)
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need原创 2017-07-20 15:07:34 · 143 阅读 · 0 评论 -
1008. Elevator (20)
1008. Elevator (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe highest building in our city has only one ele原创 2017-07-16 10:38:07 · 169 阅读 · 0 评论 -
1007. Maximum Subsequence Sum
1007. Maximum Subsequence Sum (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a sequence of K integers { N原创 2017-07-16 10:10:39 · 246 阅读 · 0 评论 -
1006. Sign In and Sign Out
1006. Sign In and Sign Out (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAt the beginning of every day, the fi原创 2017-07-16 09:45:32 · 233 阅读 · 0 评论 -
pat 甲级 1004. Counting Leaves (30)
1004. Counting Leaves (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA family hierarchy is usually presented by a原创 2017-07-16 09:24:17 · 231 阅读 · 0 评论 -
PAT 甲级1003. Emergency (25) DIJKSTRA
1003. Emergency (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAs an emergency rescue team leader of a city, yo原创 2017-07-14 19:17:33 · 317 阅读 · 0 评论 -
pat 关键活动 拓扑排序 关键路径
拓扑排序,读取一个入度为0的点,将与其相连的节点入度-1,并更新最早完成时间,earliest[k]=max(earliest[k],earliest[head]+p[i].v) p[i].v为head到K的距离。更新完成后寻找出度为0并且earliest最大的点,将其latest=earliest,利用这个点逐个更新节点的latest值。如何节点的latest==earliest 则为关键路径原创 2017-07-13 09:41:43 · 1078 阅读 · 4 评论 -
1036. Boys vs Girls (25)
Boys vs Girls (25)时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueThis time you are asked to tell the difference between the lowest grade of all the male students and the highest grade原创 2017-10-25 20:02:14 · 166 阅读 · 0 评论