![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
机试
琉璃幻
这个作者很懒,什么都没留下…
展开
-
Hash的应用
这类问题有一个共同点:输入的分数种类是有限的。此例中输入的数据只有101种可能,只要为这101中可能分别计数,就可以在输入结束的时候知道每一种分数的重复情况。#include <iostream>#include <algorithm>#include <string>#include <string.h>#include <stdio.h>#include <math.h>#include <cmath>..原创 2020-06-18 11:28:48 · 249 阅读 · 0 评论 -
日期类问题
#include <iostream>#include <algorithm>#include <string>#include <string.h>#include <stdio.h>#include <math.h>using namespace std;//判断是否为闰年int isLeapYear(int year){ if((year%4==0&&year%100!=0||year..原创 2020-06-18 10:57:24 · 127 阅读 · 0 评论 -
字符串内排序(九度教程第5题)
#include <iostream>#include <algorithm>#include <string>#include <string.h>#include <stdio.h>using namespace std;int main(){ char a[101]; while(gets(a)) { int len=strlen(a); if(len==0) .原创 2020-06-18 08:28:35 · 122 阅读 · 0 评论 -
EXCEL排序(九度教程第4题)
样例输入:3 1000007 James 85000010 Amy 90000001 Zoe 604 2000007 James 85000010 Amy 90000001 Zoe 60000002 James 984 3000007 James 85000010 Amy 90000001 Zoe 60000002 James 900 0样例输出:Case 1:000001 Zoe 60000007 James 85000010 Amy 90Case 2:000.原创 2020-06-18 08:18:56 · 207 阅读 · 0 评论 -
成绩排序
#include <iostream>#include <algorithm>#include <string.h>using namespace std;struct E{ char name[101]; int age; int score;}a[1000];bool cmp(E a,E b){ if(a.score!=b.score) return a.score<b.score;//分数不同分.原创 2020-06-17 16:55:45 · 232 阅读 · 0 评论 -
排序
冒泡排序做法:#include <iostream>using namespace std;int main(){ int n; cin>>n; int a[100]; for(int i=0;i<n;i++) { cin>>a[i]; } for(int i=0;i<n;i++) { for(int j=0;j<n-i-1;j++) .原创 2020-06-17 11:45:39 · 100 阅读 · 0 评论