List Sorting
List Sorting 模仿excel,按不同的column进行排序。(未完)
题目描述
Excel can sort records according to any column. Now you are supposed to imitate this function.
输入描述:
Each input file contains one test case. For each case, the first line contains two integers N (<=100000) and C, where N is the number of records and C is the column that you are supposed to sort the records with. Then N lines follow, each contains a record of a student. A student's record consists of his or her distinct ID (a 6-digit number), name (a string with no more than 8 characters without space), and grade (an integer between 0 and 100, inclusive).
输出描述:
For each test case, output the sorting result in N lines. That is, if C = 1 then the records must be sorted in increasing order according to ID's; if C = 2 then the records must be sorted in non-decreasing order according to names; and if C = 3 then the records must be sorted in non-decreasing order according to grades. If there are several students who have the same name or grade, they must be sorted according to their ID's in increasing order.
输入例子:
3 1 000007 James 85 000010 Amy 90 000001 Zoe 60
输出例子:
000001 Zoe 60 000007 James 85 000010 Amy 90
List Sorting相关推荐
- 【C++】C++11 STL算法(三):分隔操作(Partitioning operations)、排序操作(Sorting operations)
目录 分隔操作(Partitioning operations) 一.is_partitioned 1.原型: 2.说明: 3.官网demo 二.partition 1.原型: 2.说明: 3.官方d ...
- 阅读Book: MultiObjective using Evolutionary Algorithms (5) ---- Non-Dominated Sorting of a Population
种群非支配等级排序. Why??不是说就为了找到非支配集合吗? 这个不是多目标中优化中追求的一个goal? 解释: Most evolutionary multi-objective optimiza ...
- Codeforces Round #699 (Div. 2) E.Sorting Books(贪心+DP / 线段树)超高质量题解,看不懂来打我 ~
整理的算法模板合集: ACM模板 点我看算法全家桶系列!!! 实际上是一个全新的精炼模板整合计划 E - Sorting Books 一排书架上有 nnn 本书排成一排,每本书上有一个颜色 aia_i ...
- C - A problem of sorting HDU - 5427 sort(cmp)
C - A problem of sorting HDU - 5427 sort 函数用法 cmp 写法 bool cmp(node a, node b){return a.sum > b.su ...
- DNA Sorting(排序)
欢迎参加--BestCoder周年纪念赛(高质量题目+多重奖励) DNA Sorting Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...
- Google Python Class --- Sorting
刚才看到一位朋友谈到如何写出高逼格的文章,想了想确实有道理.所以特意弄一张高清的图片加上高逼格的文字. 坚持是一种品格 学习Python和我的工作关系并不大,但这不重要,因为喜欢所以坚持. 打篮球他们 ...
- distribution counting—a sorting method from aocp
/* *From the art of computer programming:vol 3:Sorting and Searching *时间:2012年3月6日21:02:32 *作者:张超 *E ...
- PAT甲级1052 Linked List Sorting:[C++题解]链表排序
文章目录 题目分析 题目链接 题目分析 题意:给定数据(里面有不构成链表的数据,若是,则跳过),是链表的构成链表.然后根据数值大小重新排序,构成新的链表. 分析:用数组模拟链表,先建立链表.遍历链表, ...
- PAT甲级1028 List Sorting:[C++题解]排序,cin和cout会超时
文章目录 题目分析 题目链接 题目分析 用结构体来存,写三个排序函数. 本题需要注意的点是: 用cin来读会超时,所以用C语言的scanf来读.这样的话,就不能使用string,而是使用char数组. ...
- 【PAT】A1028 List Sorting
Input Specification: Each input file contains one test case. For each case, the first line contains ...
最新文章
- getElementById 不能取得visible=false 的控件解决方法
- ACE之Proactor模式使用实例
- sqlmap参数说明
- MongoDB3.4 版本新节点同步的一点惊喜
- 2021年自然语言处理(NLP)算法学习路线!
- Python魔术世界 1 如何使用Visual Studio在WIN10中一键安装Python3入门编程环境并测试Django...
- 在web3上搭建ecshop网上商城
- 移动网页广告引入mraid.js使用指南
- php操作excel表格的导入和导出
- layer子窗口与父窗口传值
- java版教材管理系统源码
- AI领域最有影响力100人,Hinton只排31、Bengio竟然没有上榜?
- 顶级域名、一级域名、二级域名、三级域名的区别
- 面试智力题,1000瓶水,其中一瓶有毒,而且毒性无敌,稀释一亿倍毒性都不减,毒性的发作时间最长为1小时,请问怎样可以在两个小时之内找出哪瓶水有毒
- webrtc视频卡顿分析一本地视频卡顿
- C语言:变量存储类别
- 如何使CAD打印PDF显示清楚
- park,clark和ipark浅析
- 2021哔哩哔哩1024程序员节日第二弹:安全攻防挑战赛
- 关于打破思维的墙读后感
热门文章
- Physica A 2020 | 链接预测综述(二)
- c 连接 mysql 创建数据库_c sqlite创建数据库连接
- 使用数据处理技能优化Draftkings NBA阵容
- SVNkit-SVNAuthenticationException
- jQuery制作照片墙
- IEEE Fellow推荐,2023年计算机EI学术会议最新列表,录用率高,审稿周期短!
- ios底部栏设计规范_IOS界面设计尺寸标准规范——超级干货
- 压缩Html HtmlCompressor
- 卷积神经网络(人马分类)
- Sketch 51 for Mac(矢量绘图软件)怎么汉化?Sketch 51 for Mac汉化教程