Easier Done Than Said?杭电ACM1039

大模型性能评估:原理、方法与工程实践指南 大模型性能评估是衡量语言模型能力的核心技术环节,其本质是通过标准化任务(如MMLU、CMMLU、HumanEval)和可控实验设计,量化模型在理解、推理、生成等维度的表现。该过程依赖于评测基准构建、数据集清洗、推理配置统一等关键技术,具有强可复现性与工程落地价值。广泛应用于模型选型、迭代验证、合规审计及开源社区比对等场景。本文结合主流开源评测框架(如OpenCompass、lm-eval-harness)与真实企业实践,解析如何科学开展大模型评估,避免常见误区,提升技术决策可靠性。 阅读详情

Easier Done Than Said?

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12815    Accepted Submission(s): 6188


Problem Description
Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-generated passwords (like xvtpzyo), but users have a hard time remembering them and sometimes leave them written on notes stuck to their computer. One potential solution is to generate "pronounceable" passwords that are relatively secure but still easy to remember.

FnordCom is developing such a password generator. You work in the quality control department, and it's your job to test the generator and make sure that the passwords are acceptable. To be acceptable, a password must satisfy these three rules:

It must contain at least one vowel.

It cannot contain three consecutive vowels or three consecutive consonants.

It cannot contain two consecutive occurrences of the same letter, except for 'ee' or 'oo'.

(For the purposes of this problem, the vowels are 'a', 'e', 'i', 'o', and 'u'; all other letters are consonants.) Note that these rules are not perfect; there are many common/pronounceable words that are not acceptable.
 

Input
The input consists of one or more potential passwords, one per line, followed by a line containing only the word 'end' that signals the end of the file. Each password is at least one and at most twenty letters long and consists only of lowercase letters.
 

Output
For each password, output whether or not it is acceptable, using the precise format shown in the example.
 

Sample Input
a tv ptoui bontres zoggax wiinq eep houctuh end
 
Sample Output
<a> is acceptable. <tv> is not acceptable. <ptoui> is not acceptable. <bontres> is not acceptable. <zoggax> is not acceptable. <wiinq> is not acceptable. <eep> is acceptable.

<houctuh> is acceptable.

3个条件,1至少一个元音。2不能连续3元或3辅音。3不能连续2个一样字母,除了oo ee。

解体思路:

先第一个条件不符合,直接输出not acceptable,用continue跳出循环,输入下一个字符串

第二个条件不符合,直接输出not acceptable,用continue跳出循环,输入下一个字符串

第三个条件不符合,直接输出not acceptable,用continue跳出循环,输入下一个字符串

都符合, 直接输出acceptable,自动下一个循环

#include<stdio.h>  #include<string.h> int main() { char a[10000]={0},b[10000]={0}; while(~scanf("%s",a)) {    if(strcmp(a,"end")==0) break; int i,k,l,point=0,flag=1,count=0; l=strlen(a); for(i=0;i<l;i++) { if(a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u') { point=1; break; } } if(point==0) { printf("<%s> is not acceptable.\n",a); continue; } strcpy(b,a); for(i=0;i<l;i++) { if(a[i]=='a'||a[i]=='i'||a[i]=='u') a[i]=1; else if(a[i]=='e'||a[i]=='o') a[i]=2; else a[i]=0; } for(i=0;i<l-2;i++) { if((a[i]&&a[i+1]&&a[i+2])||(a[i]==0&&a[i+1]==0&&a[i+2]==0)) flag=0; } if(flag==0) { printf("<%s> is not acceptable.\n",b); continue; } for(i=0;i<l-1;i++) {    if((b[i]==b[i+1])&&(a[i]!=2))    count=1; } if(count==1) { printf("<%s> is not acceptable.\n",b); continue; } printf("<%s> is acceptable.\n",b); } }

wa了一次,是把a[]当成了没有改变的a[],用从a[]复制过来的b[]就ac了。

非标准包 game.rgss3a 的打开方法 | 2023 年实测 生活笔记 阅读详情

相关推荐

关于无障碍适配的笔记

针对无障碍兼容性的笔记,针对wcg2.0/2.1

CoffeeAndIce的博客 4232

杭电acm 1039题

这道题也比较简单,写三个函数判断三个条件即可..... 但是开始时我按照已经注释掉的提交,居然提示WA,我百思不得其解,后改成上面的判断式就可以了,求高手解答.... 1 #include "iostream" 2 3 using namespace std; 4 5 #define Max 21 6 int Function1(char *p,int ...

173

逆向实战:基于内存态匿名段分析的 DexProtector 检测绕过策略

本文深入探讨了针对DexProtector加固方案的Frida检测绕过策略。通过分析运行时动态加载到匿名内存段的核心检测逻辑,提出了一套基于内存态分析、定位并转储匿名可执行段,进而通过精准Hook与“等式化替换”等技术实现稳定绕过的实战方法。该方法不仅适用于DexProtector,也对采用类似内存隐藏技术的加固方案具有参考价值。

ik678901的博客 525

杭电ACM-1039

最近忙着其他的事都没怎么敲代码,拿道简单的题练练手 Problem DescriptionPassword security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites

hander的专栏 816

【计算机组成原理】实验4:单周期CPU(Verilog)中海大

【计算机组成原理】实验4:单周期CPU

m0_63023532的博客 3663

保姆级教程:在瑞芯微RV1126B上部署轻量化YOLOv8,实现端侧实时目标检测

本文详细介绍了在瑞芯微RV1126B芯片上部署轻量化YOLOv8模型的完整流程,包括开发环境搭建、模型训练优化、量化转换及嵌入式部署。通过利用RV1126B的3TOPS NPU算力和AI-ISP特性,实现端侧实时目标检测,提升边缘AI应用的性能和效率。

weixin_30329623的博客 276

hdu-1039-Easier Done Than Said?

Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14313 Accepted Submission(s): 6934 Problem Description Password s

暗淡的时光 788

nvidia系列教程-AGX-Orin linux源码下载编译

NVIDIA AGX Orin 是一款高性能的嵌入式计算平台,广泛应用于人工智能、自动驾驶、机器人等领域。为 AGX Orin 编译定制的 Linux 内核,可以更好地适应特定应用需求,增强系统的灵活性。本文将详细介绍如何下载、配置和编译适用于 AGX Orin 的 Linux 内核源码。本文介绍了如何为 NVIDIA AGX Orin 平台下载、配置和编译定制的 Linux 内核源码。通过编译和部署定制内核,您可以更好地控制系统的行为,并根据特定应用需求进行优化。

flypig has a dream! 1285

杭电1039 之 Easier Done Than Said?

Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-ge

ESESZB的博客 516

lammps 案例in文件汇总

进阶案例: 聚乙烯和石墨烯界面pull out模拟代码 反应力场reax/c设置方法及案例解析 石墨烯热导率模拟代码(NEMD方法) 圆锥形SiC纳米磨削单晶硅源代码 高熵合金FeNiCrCoCu纳米压痕模拟代码 fix indent命令实现纳米摩擦及摩擦力计算 Fe原子辐照轰击多层石墨烯模拟代码 铝基石墨烯复合物压缩变形in文件源代码 石墨烯自动卷曲到Fe纳米线模拟源代码 铝/石墨烯复合物结晶过程lammps模

lammps_jiayou的博客 9450

DeepSeek与YOLO融合技术的微信小程序实现方案

本文介绍了一个基于微信小程序和Flask后端的智能图像检测系统。系统采用DeepSeek-7B进行自然语言理解,YOLOv8执行目标检测,并通过融合验证模块确保结果准确性。核心流程包括:用户通过小程序上传图片和文本需求,后端解析意图后执行目标检测,最后验证并返回结果。关键技术包括DeepSeek的指令理解、动态阈值调整和模型优化(ONNX、TensorRT)。系统适用于工业质检等场景,如"检测表面划痕",能自动识别目标并验证结果。部署需GPU服务器,并包含安全机制保障系统稳定运行。

老郑的博客 275

杭电ACM OJ 1039 Easier Done Than Said? 水(但是很好玩的一道题,考察逻辑思维)

Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14426    Accepted Submission(s): 6986 Problem Description Pa

qq_36523667的博客 736

基于YOLOv11的人脸识别系统:从构建到应用的全流程指南

深度学习是机器学习的一个分支,旨在通过多层神经网络模拟人脑的认知能力。它能够从大量数据中自动提取特征,并进行准确的预测和分类。在计算机视觉领域,深度学习技术已经取得了显著的成果,尤其是在图像识别、目标检测等方面。YOLOv11是YOLO系列模型的最新版本,结合了卷积神经网络(CNN)和其他创新技术。它在保持高精度的同时,显著提高了推理速度。YOLOv11的结构轻量且高效,非常适合实时目标检测任务。人脸检测的目标是从图像或视频中定位所有人脸的位置。

FJN110的博客 187

杭电ACM1039——Easier Done Than Said?

这一题,简单的字符串处理。只是题目的要求比较麻烦。 题目的大概意思是:给你一段字符串,判断是否可以被接受。 判断的条件为: 1.存在一个元音。(元音有a,e,i,o,u) 2.不能有连续的三个元音或者连续的三个非元音。 3.不能有连续的两个相同字符除了e和o可以之外 有了这些条件,就很容易了。 下面的是一次AC的代码,有详细的注释: #include #include usin

XD 1015

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

杭电ACM HDOJ 1039 Easier Done Than Said?

Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6387    Accepted Submission(s): 3172 Problem Description Passw

gubojun的专栏 1349

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

杭电ACM1039 Easier Done Than Said?

为了方便起见,我设置了三个标志位来判断输入的数据是否符合三个规则。#include &lt;iostream&gt;#include &lt;stack&gt;#include &lt;cstdio&gt;#include &lt;string.h&gt;using namespace std;char a[100];int flag1=0;//1为符合规则int flag2=1;int flag...

heiyiming123的博客 214

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

Easier Done Than Said?(杭电oj1039)

Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8339    Accepted Submission(s): 4093 Problem Description Pas

My Castle 1033

Easier Done Than Said?

Problem DescriptionPassword security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-generated passwords (like xvtpzyo), but users have a hard ti

Mike的专栏 930

HDU1039:Easier Done Than Said?

Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-ge

ACM!荣耀之路! 4047

ACM--元辅音--HDOJ 1039--Easier Done Than Said?--字符串

HDOJ题目地址:传送门 Easier Done Than Said? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11702    Accepted Submission(s): 5678

戎码人生 1619

HDU ACM1039——Easier Done Than Said?

Easier Done Than Said? Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites ...

BarisGuo的博客 490

HDU1039 Easier Done Than Said?(java)

HDU1039 Easier Done Than Said?(java)

昔往矣今何在 535

HDU1039

HDU1039 Easier Done Than Said? 现在输入一行密码,要你判断这个密码是否是可行的。可行的密码要符合以下3个要求: 1.密码至少包含一个元音字母 2.密码不能包括连续3个的元音或连续3个辅音字母 3.密码不能包括两个连续的相同字母,但是ee或oo是允许的。 输入:包含多个实例,每个实例占一行,最后一行以“end”表示结束。每行最少包含一个最多由20个小写字母组成

code 1570

HDU 1039

Easier Done Than Said?  Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some si...

weixin_41984761的博客 277

杭电1099_杭电ACM题目分类 | 学步园

杭电ACM题目分类——鱼尾尾基础题:1000、1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、1061、1070、1076、1089、1090、1091、1092、1093、1094、1095、1096、1097、1098、1106、1108、1157、1163、11...

weixin_42244017的博客 377
上一篇: 杭州电子科技大学程序设计竞赛(2016’12)- 网络同步赛 1007
下一篇: 按位与&
Ordinary programmer
博客等级 码龄10年 251粉丝 131原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值