HDU2115:I Love This Game

海思Hi3061M MCU:为高速吹风筒市场注入智能动力 此外,海思还提供了丰富的软件开发工具和生态环境组件,帮助开发者快速实现复杂功能。高速吹风筒因其高效的风力和快速的干燥效果,近年来在市场上越来越受欢迎。然而,传统的高速吹风筒在性能、噪音和使用寿命等方面仍有改进的空间。凭借其高性能、低功耗、低噪声和易用的开发工具,为高速吹风筒市场带来了全新的解决方案。这不仅提高了用户的使用体验,还延长了电机的使用寿命。这不仅减少了电机的电磁噪声,还提高了电机的运行效率。还支持风机顺逆风启动适配多种电阻范围的电机,进一步提高了吹风筒的适用性和灵活性。 阅读详情
Problem Description
Do you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It include several parts , such as passing , shooting , and so on. After completion of the content , the player who takes the shortest time will be the winner . Now give you their names and the time of finishing the competition , your task is to give out the rank of them ; please output their name and the rank, if they have the same time , the rank of them will be the same ,but you should output their names in lexicographic order.You may assume the names of the players are unique.

Is it a very simple problem for you? Please accept it in ten minutes.
 

Input
This problem contains multiple test cases! Ease test case contain a n(1<=n<=10) shows the number of players,then n lines will be given. Each line will contain the name of player and the time(mm:ss) of their finish.The end of the input will be indicated by an integer value of zero.
 

Output
The output format is shown as sample below.
Please output the rank of all players, the output format is shown as sample below;
Output a blank line between two cases.
 

Sample Input
10 Iverson 17:19 Bryant 07:03 Nash 09:33 Wade 07:03 Davies 11:13 Carter 14:28 Jordan 29:34 James 20:48 Parker 24:49 Kidd 26:46 0
 

Sample Output
Case #1 Bryant 1 Wade 1 Nash 3 Davies 4 Carter 5 Iverson 6 James 7 Parker 8 Kidd 9 Jordan 10
 


 

//对杭电有的题目真心无语

都是一些莫名其妙的格式

FUCK

 

#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;

struct Node
{
    char name[100];
    int h;
    int m;
    int no;
} node[10000];

int cmp(Node x,Node y)
{
    if(x.h != y.h)
        return x.h < y.h;
    else if(x.m != y.m)
        return x.m < y.m;
    else
        return strcmp(x.name,y.name)<0;
}

int main()
{
    int n;
    int cas = 1,fuck = 0;
    while(~scanf("%d%*c",&n),n)
    {
        int i;
        for(i = 0; i<n; i++)
        {
            scanf("%s%d:%d",node[i].name,&node[i].h,&node[i].m);
        }
        if(fuck!=0)
        printf("\n");
        sort(node,node+n,cmp);
        printf("Case #%d\n",cas++);
        int flag = 1;
        node[0].no = 1;
        for(i = 1;i<n;i++)
        {
            if(node[i].h == node[i-1].h && node[i].m == node[i-1].m)
            node[i].no = flag;
            else
            node[i].no = flag =i+1;
        }
        for(i = 0;i<n;i++)
        {
            printf("%s %d\n",node[i].name,node[i].no);
        }
        fuck++;
    }

    return 0;
}


 

BGP路由聚合:自动聚合和手动聚合 路由聚合是指将多条具体的路由合并为一条聚合路由,以减少路由表的条目数。这种技术通过只向对等体发送聚合后的路由,而不发送所有的具体路由,来减小路由表的规模。同时,被聚合的路由如果发生路由振荡,也不再对网络造成影响,从而提高了网络的稳定性。 阅读详情

相关推荐

Surface Go 2 变身 Linux 开发本:保姆级 Ubuntu 20.04 双系统安装与驱动配置全攻略

本文详细介绍了如何将 Surface Go 2 变身为高效的 Linux 开发本,涵盖 Ubuntu 20.04 双系统安装、专用内核配置、驱动优化等全流程。通过 linux-surface 内核安装和硬件驱动优化,确保 Surface Go 2 的触控、笔输入、摄像头等功能完美运行,适合开发者打造便携生产力工具。

weixin_30596165的博客 621

hdu2115 I Love This Game(排名)

I Love This Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5248    Accepted Submission(s): 1811 Problem Description Do you li

GAO1024 712

EMC系列EtherCAT总线运动控制器(二):Motion通讯连接、总线配置及诊断

雷赛-EMC系列EtherCAT总线运动控制器(二):Motion通讯连接、总线配置及诊断

weixin_38570076的博客 1921

HDOJ(HDU) 2115 I Love This Game(排序排序、、、)

Problem Description Do you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It include severa...

weixin_34111790的博客 182

MuJoCo 相机图片怎么拿?视角调整获取物体图片及实时显示(附代码)

在Mujoco的仿真中,对于识别抓取场景来说,如何获得添加的body等物体的实时图像很重要,今天就分享下如何添加相机视角及可视化小方块(举例)的实时图片。复制一个scene.xml为scene_withcamera.xml,在xml中添加camera和小方块如下。设置xml文件中添加的相机body id。需要创建一个离屏渲染器。

darcsdn 2131

天池长期赛:二手车价格预测(422方案分享)

本次比赛是一次很好的锻炼数据挖掘能力的入门赛,从EDA-数据清洗-特征工程-模型调参-模型融合,能够完整的学习到大数据的分析和挖掘,值得历练。

weixin_46685991的博客 1万+

HDOJ2115 I Love This Game

I Love This Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8290    Accepted Submission(s): 2864 Problem Description Do you like p

BarryLee的博客 321

手把手教你绕过Incapsula reese84防护:从JS反混淆到动态Token生成全流程

本文深入解析了以Incapsula reese84为代表的现代Web客户端挑战防护机制,详细介绍了从JS反混淆、算法逆向到动态Token生成的全流程实战方法。文章系统阐述了如何通过模拟浏览器指纹、移植关键算法或嵌入JS引擎来构建自动化应对策略,并提供了稳健的令牌管理与系统架构设计思路,帮助开发者在合规前提下提升自动化工具的适应性。

jenkins8butler的博客 522

I Love This Game 2115

Problem Description Do you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It include several parts , such as passing , sho

自由 449

Depth Anything 3实战:如何用DINOv2 Transformer一键生成3D高斯点云?

本文详细介绍了Depth Anything 3(DA3)模型如何利用DINOv2 Transformer架构,实现从单张或多视角图像一键生成高质量3D高斯点云。DA3通过统一的深度-射线表示和自适应注意力机制,简化了传统复杂的3D重建流程,并可直接微调用于3D高斯渲染,为图形学、CV和内容创作领域提供了高效的端到端解决方案。

postgres8guard的博客 725

1、网站可靠性工程(SRE):原理、实践与转型指南

本文深入探讨了网站可靠性工程(SRE)的核心原理、实践方法以及组织转型策略。从SRE的基本概念如服务水平指标(SLI)、服务水平目标(SLO)和错误预算入手,详细解析了如何通过SRE实现产品开发、运营和管理团队的高效协作。此外,还涵盖了SRE的实施步骤,包括现状评估、组织认同、基础设施建设、事件响应、错误预算政策制定以及组织结构设计等内容。最后,文章展望了SRE的未来发展,强调了服务目录、合规监管及SRE文化建设的重要性,为企业的现代化运营体系转型提供了全面指南。

xk7n92h3p5m的博客 150

hdu 2115 I Love This Game 典型的结构体排序

I Love This Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3740    Accepted Submission(s): 1286 Problem Description Do you li

yangshuolll的专栏 1313

华为OD机考双机位C卷 - 虚拟理财游戏(Java & Python& JS & C/C++ & GO )

华为OD机考双机位C卷 - 虚拟理财游戏(OD上机考试双机位C卷)。提供Java、C++、Python、Go、JavaScript源码实现,并提供完整思路讲解,以及在线OJ模拟做题。

算法大师! 671

hdu2115: I Love This Game

hdu2115: http://acm.hdu.edu.cn/showproblem.php?pid=2115题意:输入n组名字和对应的时间(分:秒),要求按时间长度由短到长排序,并输出对应排名,若时间一样,则按名字字典序排序,名次可以并列。 code: #include<iostream> #include<cstdio> #include<cstdli...

weixin_30577801的博客 100

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

批量替换文件夹名关键字:PowerShell、Python与工具实操指南

批量重命名是日常文件管理中高频且容易出错的操作,尤其是文件夹名替换关乎路径引用,影响面远大于单个文件。理解其基本原理,即名称变更会导致所有子路径失效,是安全操作的前提。掌握高效技术工具,如Windows自带的PowerShell编写重命名脚本,或用Python标准库实现复杂映射与递归处理,能显著节省时间并支持日志回滚。此需求常见于项目版本迭代、测试数据整理和归档目录规范化等场景。本文结合实战经验,讲解PowerShell与Python方案、图形化工具PowerRename的适用边界,并重点分析重名冲突、中文

weixin_34224941的博客 334

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

hdu 2115 I Love This Game

I Love This Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5506    Accepted Submission(s): 1900 Problem Description Do you li

小张的专栏 536

HDU2115 I LOVE THIS GAME

此题略坑。。注意输出格式 还有 我发现用qsort排序后 相等的时间,名字确按字典数顺序逆这来输,百度了下sort的用法 ,发现比qsort简单,整理下发到下一篇吧 ,真是,缓缓,我的心好痛 # include # include # include # include using namespace std; struct node{ char name[20]

此博客停止维护和更新,已转移https://github.com/ilvseyinfu/blog 359

HDU 2115 I Love This Game(结构体排序 or pair)

I Love This Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7163    Accepted Submission(s): 2451 Problem Description Do you like p

LzyRapX 716

hdu 2115 I Love This Game

hdu   2115   I Love This Game                题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2115 题目大意:n个人完成同一项比赛,分别给出他们的名字和时间(分:秒),要求格式输出他们的名字和名次。 题目分析:注意时间完全相同时名次一致,按名字的字典序决定先后。 code: #include #i

slicer的技术交流栈 747

HDU2115 I Love This Game

I Love This Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5254    Accepted Submission(s): 1817 Problem Description Do you like p

u013514625的专栏 603

hdu2115 I Love This Game

#include using namespace std; struct node { int mm; int ss; char name[30]; }; node data[21]; int comp(c

390

hdu 2115(I Love This Game)

Webpage link address http://acm.hdu.edu.cn/showproblem.php?pid=2115 I personally think this is good problem for training string processing.And i learned much from the problem by solving this problem...

weixin_30919429的博客 118

I Love This Game hdu 2115

I Love This Game Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5248    Accepted Submission(s): 1811 Problem Description Do you li

风华绝代 898

HDU 2115 I Love This Game

题目HDU 2115:http://acm.hdu.edu.cn/showproblem.php?pid=2115 Problem Description Do you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basket...

weixin_30565327的博客 172

hdu——2115——C - I Love This Game( 比赛)

Description Do you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It include several parts , such as passing , shooting ,

清溪浅水 633
上一篇: HDU1237:简单计算器
下一篇: HDU2566:统计硬币
键盘上的舞者
博客等级 码龄14年 1903粉丝 991原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值