文件名称:2-1

  • 所属分类:
  • Windows编程
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2013-03-26
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 陈*
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

问题描述:给定含有n个元素的多重集合S,每个元素在S中出现的次数称为该元素的重数。多重集S中重数最大的元素称为众数。

★算法设计:对于给定的由n个自然数组成的多重集S,计算S的众数及其重数。

★数据输入:输入数据由文件名为input.txt的文本文件提供。文件的第1行为多重集S中的元素个数n;在接下来的n行中,每行有一个自然数。

★结果输出: 将计算结果输出到文件output.txt。输出文件有2行,第一行是众数,第2行是重数。

-The descr iption of the problem: given multiple collections S containing n elements, the number of occurrences of each element in S is referred to as the number of a weight for the element. Multiple multiplicity of elements in the set S is called the singular. ★ algorithm design: multiset S given by n natural numbers to calculate the number of all its multiplicity of S. ★ Data Input: input data from a text file named input.txt file. File behavior of a multiple number of elements in the set S n in the next n lines, each line has a natural number. ★ output: the calculation results output to the file output.txt. 2 line in the output file, the first line is plural, the second line is heavy.
(系统自动生成,下载前可以参看下载内容)

下载文件列表





2-1.cpp

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org