hdu_1800 简单排一下序,从大开始把比他小的都访问一遍,ans++: #include <iostream> #include <stdio.h> #include <algorithm> using namespace std; struct dat { int level; int visit; }data[]; bool cmp(dat a, dat b) { return a.level > b.level; } int main() { int n…
Flying to the Mars Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11228    Accepted Submission(s): 3619 Problem Description In the year 8888, the Earth is ruled by the PPF Empire . As the popul…
Flying to the Mars 题意:找出题给的最少的递增序列(严格递增)的个数,其中序列中每个数字不多于30位:序列长度不长于3000: input: 4 (n) 10 20 30 04 output 1 思路:将节目转化为相同数的最多个数即可~~ 这时就随便怎么搞了.我是直接用了map(开始不会hash啊…)来找mx; 但是和字符串hash相比,时间性能不好. 之后看了ACdreamers,学习了ELFhash之后发现挺好用的~~下面将讲解一下我对ELFhash的理解. // 702m…
Flying to the Mars Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 22086    Accepted Submission(s): 7091     Problem Description     In the year 8888, the Earth is ruled by the PPF Empire . As…
http://acm.hdu.edu.cn/showproblem.php?pid=1800 Flying to the Mars Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10798    Accepted Submission(s): 3461 Problem Description In the year 8888, the…
D - Flying to the Mars Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1800 Description In the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find mor…
Flying to the Mars 点我挑战题目 题意分析 有n个人,每个人都有一定的等级,高等级的人可以教低等级的人骑扫帚,并且他们可以共用一个扫帚,问至少需要几个扫帚. 这道题与最少拦截系统有异曲同工之妙.不同在于这道题可以排序,而最少拦截系统不能排序.我们想一下,把这些人排好序,并统计每个等级的人的个数.一次从最高等级到最低等级划掉一个人(可以理解为这些人互相教并且骑一个扫帚),一直划,直到最后一个人.这样可以看出来,扫帚的数量肯定是由某个等级的人数确定的.并且那个等级的人数最多.因此,…
Flying to the Mars Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16049    Accepted Submission(s): 5154 Problem Description In the year 8888, the Earth is ruled by the PPF Empire . As the popul…
Flying to the Mars Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10854    Accepted Submission(s): 3481 Problem Description In the year 8888, the Earth is ruled by the PPF Empire . As the popu…
Problem Description Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon. When the typhoon came, everything is terrible. It kept blowing and raining for…