hdu 1242 disney (map模拟)

YOLOv11改进 - C3k2融合 | C3k2 融合 ARConv 自适应矩形卷积:动态调整卷积核形状与采样点 本文介绍了将自适应矩形卷积(ARConv)模块与YOLOv11相结合的方法。ARConv是针对遥感图像全色锐化任务设计的创新卷积模块,可自适应调整卷积核形状与采样点数量,解决传统卷积刚性限制,实现高效特征提取。其工作流程包括学习卷积核高度和宽度、选择采样点数量、生成采样图、卷积实现与空间自适应增强。我们将集成ARConv的C3k2_ARConv模块引入YOLOv11,对相关代码进行修改和注册,并配置了yolov11 - C3k2_ARConv.yaml文件。实验脚本显示,该结合方式应用于目标检测任务。 阅读详情


disney

Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1039    Accepted Submission(s): 299


Problem Description
  A new machine was introduced into disney world. Every day, there is a long queue because of its function. Everyone can input their score or update their score. If you want to know the maximum or the average, it can help you, too.What's more, if you don't want that your score be saw, you can delete your register from it. Since the new machine was introduced, everyone be more hard.
 

Input
The input contain only one case.
There are kinds of format that show different functions:
(1)NEW name score(you can use it to input your score or update your score)
name: the name of current user.The length of the name is no longer than 8.
score: the score of current user.(0<score<=100)
(2)AVERAGE(you can use is to get the average score)
(3)MAX(you can use is to get the maximal score and whose score is the maximum.)
(4)DELETE name: delete the name and its record too.
name: the name of current user.The length of the name is no longer than 8.
(5)QUIT(this command is used to turn off the machine,is the end of the input)
 

Output
(1)For "NEW name score" , if it's there is a lack of record of the user. print "A new record".else print "update succeed".
(2)For "AVERAGE" , you should print the average score rounded to two digits after the decimal point.if there are none record in the machine,the average is 0.00;
(3)For "MAX" , you should first print the maximal score and the number that whose score is the maximum, then print all of their names Lexicographicly, and each name owns a single line. If there isn't any record in the machine,just output"0 0".
(4)For "DELETE name" , if there is a lack of record of the user. print "no such record".else print "delete succeed".

The population of disney is no more than 100.
 

Sample Input
      
NEW mickey 99 NEW mini 88 MAX AVERAGE DELETE winnie QUIT
 

Sample Output
      
A new record A new record 99 1 mickey 93.50 no such record
 

Author
kiki
 

Source


思路:用map来模拟。

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <vector>
using namespace std;

int main()
{
    string n;
    map<string,int> m;
    map<string,int> ::iterator it;
    double sum=0;
    while(cin>>n)
    {
        if(n=="NEW")
        {
            string name;
            int grade;
            cin>>name;
            cin>>grade;
            it=m.find(name);
            if(it==m.end())
            {
                m[name]=grade;
                printf("A new record\n");
                sum+=grade;
            }
            else
            {
                printf("update succeed\n");
                sum-=m[name];
                sum+=grade;
                m[name]=grade;
            }
        }
        else if(n=="AVERAGE")
        {
            if(m.size()==0)
            {
                printf("0.00\n");
            }
            else
            {
                double ave=sum/(m.size()*1.0);
                printf("%.2lf\n",ave);
            }
        }
        else if(n=="MAX")
        {
            if(m.size()==0)
            {
                printf("0 0\n");
            }
            else
            {
                int maxn=m.begin()->second;
                for(it=m.begin();it!=m.end();it++)
                {
                    if(it->second>maxn) maxn=it->second;
                }
                vector<string> f;
                f.clear();
                for(it=m.begin();it!=m.end();it++)
                {
                    if(it->second==maxn)
                    {
                        f.push_back(it->first);
                    }
                }
                sort(f.begin(),f.end());
                printf("%d %d\n",maxn,f.size());
                for(int i=0;i<f.size();i++)
                {
                    cout<<f[i]<<endl;
                }
            }
        }
        else if(n=="DELETE")
        {
            string nam;
            cin>>nam;
            it=m.find(nam);
            if(it==m.end())
            {
                printf("no such record\n");
            }
            else
            {
                printf("delete succeed\n");
                sum-=it->second;
                m.erase(it);
            }
        }
        else break;
    }
    return 0;
}


《从零学会 CST 仿真全流程》专栏简介 本专栏系统讲解CSTPCBStudio与MWSStudio在高速PCB仿真中的应用,涵盖SI/PI仿真全流程。重点介绍CSTPCBStudio用于板级信号完整性分析,CSTMWS用于3D高频电磁仿真,以及电缆、低频、多物理场等配套工具。课程以实战为导向,通过USB3.1、LPDDR4等案例,手把手教学软件操作与工程应用,适合硬件工程师、EMC工程师及电子专业学生学习。内容注重实操,弱化理论,帮助快速掌握仿真核心技能。 阅读详情

相关推荐

KANO分析模型

KANO分析模型的基本概念,目的意义,应用场景,实现方法和示例等

JasonH2021的博客 3068

disney (map模拟)

A new machine was introduced into disney world. Every day, there is a long queue because of its function. Everyone can input their score or update their score. If you want to know the maximum or the a...

Coding 406

【JESD79-5之】11 IDD, IDDQ, IPP规格参数和测试条件(IDD, IDDQ, IPP Specification Parameters and Test conditions)

【代码】【JESD79-5之】11 IDD, IDDQ, IPP规格参数和测试条件(IDD, IDDQ, IPP Specification Parameters and Test conditions)

m0_61126667的博客 4861

hdu 2412 (disney) 模拟、字符串处理

disney Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 583Accepted Submission(s): 146 Problem Description A new machine was introduced...

weixin_30426957的博客 201

骨架动作识别新突破:CTR-GCN的通道拓扑优化策略解析

本文深入解析了CTR-GCN在骨架动作识别中的通道拓扑优化策略。通过引入通道级拓扑细化,CTR-GCN克服了传统GCN共享拓扑结构的局限性,显著提升了动作识别的准确率。文章详细介绍了CTR-GCN的三大核心组件设计,包括特征变换模块、通道拓扑建模和通道聚合技术,并提供了实战调参经验和模型压缩技巧,为计算机视觉领域的研究者和开发者提供了有价值的参考。

weixin_27310417的博客 193

【TELEMAC V8P4】TELEMAC-2D 用户手册核心概念与应用场景速览

本文深入解析了TELEMAC-2D水动力模型的核心概念与应用。作为基于二维浅水方程的开源数值模拟工具,TELEMAC-2D广泛应用于河流动力学、洪水演进、污染物输运及泥沙运动模拟。文章结合用户手册与实战经验,详细拆解了其理论框架、关键物理过程(如湍流模型、干湿网格处理),并提供了从模型搭建、文件配置到典型场景(如工程评估、污染应急、洪水模拟)的实用指南,帮助用户快速掌握这一强大工具。

weixin_29200741的博客 163

POJ 3087 (简单map + 模拟)

POJ 3087 题意:给出洗牌的方式,问几次能洗出要求的牌。 洗牌方式就是插入,很简单。 用mapvisit 记录是否出现过。 值得学习的就是这种想法,用map记录判断是否能洗出这种牌。 #include #include #include using namespace std; int main() { int t = 0,text;

Since_natural_ran 414

保姆级教程:在摩尔线程MTT S80上快速部署Ollama运行DeepSeek R1模型(附性能测试)

本文提供了一份详细的保姆级教程,指导用户在摩尔线程MTT S80显卡上部署Ollama并运行DeepSeek R1模型。内容涵盖从驱动安装、Docker环境配置到模型拉取、性能测试的全流程,并分享了实测数据与优化技巧,旨在帮助开发者快速在国产GPU平台上实现高效的大语言模型推理。

weixin_29091837的博客 525

模拟(map)

 594-还是A+B 题目来源:http://acm.nyist.cf/problem/594  题目描述: 输入两个小于100的正整数A和B,输出A+B; A,B均为每位数字对应的英文字母,结果为十进制数。 输入描述: A,B。 输出描述: A+B; 样例输出: one + two = one + two zero =  样例输出:  3 ...

nuoyanli的博客 1650

【阅读文献笔记】FoundationStereo: Zero-Shot Stereo Matching

提出首个零样本泛化立体匹配基础模型设计 STA 模块融合单目先验提出 AHCF 模块增强代价滤波构建 100 万合成数据集 FSD + 自净化流程。

qq_46460379的博客 1258

地下管网巡检机器人:基于YOLOv8与UI界面的智能化系统设计与实现

通过YOLOv8模型的目标检测功能结合实时视频流,我们能够实现对地下管网巡检机器人的智能化控制。系统通过图像识别技术帮助巡检人员快速识别管道中的各种缺陷和障碍物,从而提高巡检效率和准确性。未来,我们可以继续优化模型,增加更多的目标类别,并通过强化学习等方法提高机器人的自主巡检能力。此外,随着硬件技术的发展,未来的巡检机器人可能会具备更强的感知能力和更高的智能水平。

YOLO 531

hdu 2142 disney(模拟)

比赛的时候这个题目一直做不出来,WA了很多遍。比赛结束之后看别人的代码,发现竟然还需要排序! 经过我长久的思考,我终于发现了问题的所在,原来题目中的Lexicographicly是字典序的意思,这特么的! 排序之后,AC。 #include #include #include struct node { char name[15]; int score; int id

zizaimengzhongyue的专栏 1078

YOLOv12环境配置,手把手教你使用YOLOv12训练自己的数据集和推理(附YOLOv12网络结构图),全文最详细教程

YOLO 系统尊嘟太卷了吧,YOLOv11 还没完明白,YOLOv12 就重磅来袭,YOLOv12 是由纽约州立大学联合中科院在 2025年2月19 日发布,从 YOLOv12 论文题目我们大概就知道做了那些更新 ,下图是YOLOv12 在 COCO 数据集上的性能表现引入区域注意力机制(area-attention):通过引入十字形窗口自我注意机制,沿水平和垂直条纹计算注意力机制,纵横交错的注意机制。如下图所示,区域注意力采用最多简单的等分方法,将特征地图垂直或水平划分为 L 个区域。

在职AI算法工程师,擅长计算机视觉,YOLO目标检测、分割等,擅长web、pyqt界面可视化,好内容持续更新中,来这里跟大家一起学习,共同进步 6万+

hdu 1387 Team Queue

Team Queue Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2741    Accepted Submission(s): 944 Problem Description Queues and Priority

Timeclimber 589

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

51 nod 区间交 (优先队列)

1672 区间交 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题  收藏  关注 小A有一个含有n个非负整数的数列与m个区间,每个区间可以表示为li,ri。 它想选择其中k个区间, 使得这些区间的交的那些位置所对应的数的和最大。(是指k个区间共同的交,即每个区间都包含这一段,具体可以参照样例)

Timeclimber 547

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

hdu 1873 (优先队列)

看病要排队 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10403    Accepted Submission(s): 4387 Problem Description 看病要排队这个是地球人都知道的常识。 不过经

Timeclimber 521

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

hdu 4022 Bombing(STL)

BombingTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 4834    Accepted Submission(s): 1813Problem DescriptionIt’s a cruel war which killed mill...

Timeclimber 514

hdu 4268 Alice and Bob(贪心)

Alice and Bob Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4751    Accepted Submission(s): 1487 Problem Description Alice and Bob's

Timeclimber 493

2017 多校训练第二场 HDU 6047 Maximum Sequence(贪心+优先队列)

Maximum Sequence Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2404    Accepted Submission(s): 1131 Problem Description Steph is

Timeclimber 488

hdu 1257 最少拦截系统(贪心)

最少拦截系统 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 44838    Accepted Submission(s): 17583 Problem Description 某国为了防御敌国的导弹袭击,发展出

Timeclimber 395

hdu 1237简单计算器 (栈的应用)

简单计算器 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 23232    Accepted Submission(s): 8402 Problem Description 读入一个只包含 +, -, *, /

Timeclimber 382

hdu 1022 Train Problem(栈)

Train Problem I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 38535    Accepted Submission(s): 14491 Problem Description As the new t

Timeclimber 381

Uva 10935 Throwing cards away I

Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck: Th

Timeclimber 363

hdu 4020 Ads Proposal(优先队列)

Ads ProposalTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2427    Accepted Submission(s): 801Problem DescriptionThere are N customers set the...

Timeclimber 349

NEFU 1265 (贪心+优先队列)

最高奖励 Problem:1265 Time Limit:1000ms Memory Limit:65535K Description 有N个任务,每个任务有一个最晚结束时间以及一个对应的奖励。在结束时间之前完成该任务,就可以获得对应的奖励。完成每一个任务所需的时间都是1个单位时间。有时候完成所有任务是不

Timeclimber 342

hdu 1238 Substrings(暴力枚举)

SubstringsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11496    Accepted Submission(s): 5521Problem DescriptionYou are given a number of case...

Timeclimber 333
上一篇: poj 3481 Double Queue (Treap)
下一篇: poj 1088 滑雪(DFS+记忆化搜索)
Timeclimber
博客等级 码龄9年 25粉丝 198原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值