排序
文章平均质量分 67
你的微笑依然那样灿烂
这个作者很懒,什么都没留下…
展开
-
hdu 1106排序
#include#include#include #include #include using namespace std;const int MAX_NUM=1000;void merge(long num[],int n);int main(){ string str; while(cin>>str) { int len=str.size(); long n原创 2017-02-18 21:51:24 · 325 阅读 · 0 评论 -
hdu 1425排序
#include #include #include #include using namespace std; int a[1000005]; int main() { int n,m; while(scanf("%d%d",&n,&m)==2) { for(int i=0;i<n;i++) scan原创 2017-02-18 21:53:26 · 437 阅读 · 0 评论 -
hdu 3293排序
#include #include #include using namespace std;struct NODE{ char name[30]; char lv[30]; char ori[30];} girl[505];int cmp(NODE x,NODE y){ if(strcmp(x.ori,y.ori)) retur原创 2017-02-18 21:54:36 · 376 阅读 · 0 评论 -
hdu 2093排序
#include #include #include using namespace std;struct STU{ char name[20]; int sum; int cnt;} s[1000];int cmp(STU x,STU y)//先按题数排,再按总时间小的在头排序{ if(x.cnt!=y.cnt) return原创 2017-02-18 21:55:28 · 276 阅读 · 0 评论 -
hdu 1157排序
#include#include#include using namespace std;bool cmp(int a,int b){ return a>b;}int main(){ int num,i; int arr[10050]; while(scanf("%d",&num)!=EOF) { for(i=0;i<num;i++) cin>>arr[i]原创 2017-02-18 21:56:28 · 350 阅读 · 0 评论 -
hdu 2600排序
#include#include#includeusing namespace std;char s[30];struct node{ int x; int y;}a[105];int cmp(node a,node b){ return a.x<b.x;}int main(){ int n,p,q,b,c; while(scanf(原创 2017-02-18 21:57:23 · 379 阅读 · 0 评论 -
HDU2093:考试排名
Problem DescriptionC++编程考试使用的实时提交系统,具有即时获得成绩排名的特点。它的功能是怎么实现的呢?我们做好了题目的解答,提交之后,要么“AC”,要么错误,不管怎样错法,总是给你记上一笔,表明你曾经有过一次错误提交,因而当你一旦提交该题“AC”后,就要与你算一算帐了,总共该题错误提交了几回。虽然你在题数上,大步地跃上了一个台阶,但是在耗时上要摊上你共花去的时间。原创 2017-02-22 14:48:44 · 388 阅读 · 0 评论 -
hdu5512 - A Curious Matt (排序)水
There is a curious man called Matt. One day, Matt's best friend Ted is wandering on the non-negative half of the number line. Matt finds it interesting to know the maximal speed Ted may reach. In原创 2017-06-28 13:55:12 · 610 阅读 · 0 评论 -
2017多校联合一1002/hdu6034Balala Power!(搜索,贪心,排序,大数进制)
Balala Power!题意:n串字母,总长度不超过1e6,让你给出a-z到0-25的映射,使26进制的字符串对应的数字之和最大。解题思路:每个字母所在位置对应权值加和,肯定存不下。但我们只需要26个字母对应值之间的关系即可,开一个数组a[i][j]分别记录字母i在j这个位置上出现了多少次,对于大于26的值进位,这样我们就得到了26原创 2017-07-29 22:10:57 · 464 阅读 · 0 评论