桶排序:

  1. #include <stdio.h>
  2. #include <string.h>
  3. int a[5555555];
  4. int main()
  5. {
  6. int n,m;
  7. scanf("%d",&n);
  8. memset(a,0,sizeof(a));
  9. for(int i = 0; i < n; i ++)
  10. {
  11. scanf("%d",&m) ;
  12. if(m >= 100) a[100]++;
  13. else a[m]++;
  14. }
  15. for(int i = 0; i < 101; i ++)
  16. {
  17. if(a[i] != 0)
  18. printf("%d %d\n",i,a[i]);
  19. }
  20. return 0 ;
  21. }

数据结构实验之排序三:bucket sort (SDUT 3400)的更多相关文章

  1. SDUT OJ 数据结构实验之排序三:bucket sort

    数据结构实验之排序三:bucket sort Time Limit: 250 ms Memory Limit: 65536 KiB Submit Statistic Discuss Problem D ...

  2. SDUT 3400 数据结构实验之排序三:bucket sort

    数据结构实验之排序三:bucket sort Time Limit: 150MS Memory Limit: 65536KB Submit Statistic Problem Description ...

  3. SDUT-3400_数据结构实验之排序三:bucket sort

    数据结构实验之排序三:bucket sort Time Limit: 250 ms Memory Limit: 65536 KiB Problem Description 根据人口普查结果,知道目前淄 ...

  4. 数据结构实验之排序二:交换排序 (SDUT 3399)

    #include <iostream> #include <bits/stdc++.h> using namespace std; typedef long long ll; ...

  5. SDUT OJ 3403 数据结构实验之排序六:希尔排序

    数据结构实验之排序六:希尔排序 Time Limit: 1000 ms Memory Limit: 65536 KiB Submit Statistic Discuss Problem Descrip ...

  6. SDUT 3404 数据结构实验之排序七:选课名单.!?

    数据结构实验之排序七:选课名单 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 随着学校规模 ...

  7. SDUT 3401 数据结构实验之排序四:寻找大富翁.!

    数据结构实验之排序四:寻找大富翁 Time Limit: 150MS Memory Limit: 512KB Submit Statistic Problem Description 2015胡润全球 ...

  8. SDUT 3311 数据结构实验之串三:KMP应用

    数据结构实验之串三:KMP应用 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 有n个小朋友 ...

  9. SDUT 3347 数据结构实验之数组三:快速转置

    数据结构实验之数组三:快速转置 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 转置运算是一 ...

随机推荐

  1. CCF 2016-09-2 火车购票

    CCF 2016-09-2 火车购票 题目 问题描述 请实现一个铁路购票系统的简单座位分配算法,来处理一节车厢的座位分配. 假设一节车厢有20排.每一排5个座位.为方便起见,我们用1到100来给所有的 ...

  2. ① Python3.0基础语法

    稍微了解一下py2.0和py3.0的区别,Py3.0在设计的时候,为了不带入过多的累赘,没有考虑向下兼容低版本的Py2.0.而在低版本中Py2.6作为过渡版,基本使用Py2.x的语法和库,同时考虑Py ...

  3. MonoSymbolFileException in CheckLineNumberTable

    Mono.CompilerServices.SymbolWriter.MonoSymbolFileException: Exception of type 'Mono.CompilerServices ...

  4. RabbitMQ-python应用

    介绍 官方文档:https://www.rabbitmq.com/tutorials/tutorial-one-python.html RabbitMQ是一个基于AMQP协议的消息代理.它的工作就是接 ...

  5. viewer 图片点击放大 用法汇总

    A 不用viewer插件 1弹出框 https://www.cnblogs.com/web1/p/8989967.html 2表格中 https://www.jianshu.com/p/c17f4f6 ...

  6. 六、MySQL系列之数据备份(六)

    本篇主要介绍用户授权.以及数据备份等知识: 一.用户授权 首先我们需要知道的是: 所有的用户及权限信息都存储在mysql数据库下的user表中,故我们可以通过查看user表的记录来查看用户权限信息,当 ...

  7. c# BufferedStream 类

  8. angularcli 第三篇(数据循环*ngFor、条件判断*ngIf)

    1.数据循环 *ngFor (1)普通循环 <ul> <li *ngFor = "let item of list" > {{ item }} </l ...

  9. go中三个点(...)用法

    go命令中三个点含义 An import path is a pattern if it includes one or more "..." wildcards, each of ...

  10. 使用virtualbox安装unbuntu开启共享文件夹时遇到的权限问题

    在安装完虚拟机之后,开启文件夹共享,发现只能用root进行访问,个人帐号无权限: cust@hqjia-desktop:/media$ ll drwxr-xr-x 4 root root 4096 2 ...