- 博客(8)
- 收藏
- 关注
原创 1087 All Roads Lead to Rome (30 分)
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.Input Specification:Each input file contains one test case. For each case, the firs
2021-03-09 15:17:23 109
原创 二分查找模板(upper_bound与lower_bound)
int lower_bound(int find) //返回第一个大于等于的下标 { int left = 0; int right = n-1; int mid=0; while(left<right) { mid = left+(right-left)/2; if(p[mid].age>=find) //如果是upper_bound 则只需要去掉等号即可 right = mid; else left = mid+1; } if(p[left].age
2021-03-03 17:03:54 207 1
原创 1085 Perfect Sequence (25 分)
Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the maximum and minimum numbers in the sequence, respectively.Now given a sequence and a parameter p, you are su
2021-03-03 17:02:03 78 1
原创 1082 Read Number in Chinese (25 分)
Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fu first if it is negative. For example, -123456789 is read as Fu yi Yi er Qian san Bai si Shi wu Wan liu Qian qi Bai ba Shi jiu. Note: zero (li
2021-03-03 16:12:05 82 1
原创 1080 Graduate Admission (30 分)
It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,000 applications in Zhejiang Province. It would help a lot if you could write a program to automate the admission procedure.Each applicant will have to provide two grad
2021-03-02 20:36:41 83
原创 1081 Rational Sum (20 分)
Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each case starts with a positive integer N (≤100), followed in the next line N rational number
2021-03-02 19:42:18 94
原创 1077 Kuchiguse (20 分)
The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker’s personality. Such a preference is called “Kuchiguse” and is often exaggerated artistically in Ani
2021-03-01 17:18:34 87
原创 1076 Forwards on Weibo (30 分)
Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a user makes a post on Weibo, all his/her followers can vi
2021-03-01 16:36:16 80
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人