hdoj Easier Done Than Said?

Unity中5自由度机械臂运动控制与夹爪交互仿真实践 本文详细介绍了在Unity中实现5自由度机械臂运动控制与夹爪交互仿真的完整流程。从模型导入、物理组件配置到关节运动控制算法(包括逆运动学IK),再到夹爪抓取逻辑和工业分拣案例实战,提供了可落地的代码示例与性能优化方案,助力开发者快速掌握机械臂仿真核心技术。 阅读详情
Easier Done Than Said?
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 8336    Accepted Submission(s): 4091




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.




#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;
int main()
{
    int l,i,a,k,f,e,h,aa,bb,cc,j,m;
    char s[22],c[5]={'a','e','i','o','u'},b[21]={'b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z'};
    while(1){
        scanf("%s",s);
        if(strcmp(s,"end")==0)break;
        k=a=0;
        l=strlen(s);
        e=h=f=aa=bb=cc=m=0;
        if(strchr(s,'a')||strchr(s,'e')||strchr(s,'i')||strchr(s,'o')||strchr(s,'u'))
        a=1;
        for(i=1;i<l;++i){
            for(j=0;j<=20;++j){
                if(s[i]==b[j])
                f=1;
                if(s[i+1]==b[j])
                e=1;
                if(s[i-1]==b[j])
                h=1;
                if((e+f+h)==3){k=1;break;}
            }
            if((e+f+h)==3){k=1;break;}
            e=h=f=0;
            for(j=0;j<=4;j++){
                if(s[i]==c[j])
                aa=1;
                if(s[i+1]==c[j])
                bb=1;
                if(s[i-1]==c[j])
                cc=1;
                    if((aa+bb+cc)==3){k=1;break;}
            }
            if((aa+bb+cc)==3){k=1;break;}
            aa=bb=cc=0;
            if(s[i]==s[i-1]&&s[i]!='e'&&s[i-1]!='e'&&s[i]!='o'&&s[i-1]!='o')
            k=1;
        }
        if(a==0||k==1)
        printf("<%s> is not acceptable.",s);注意格式
        else
        printf("<%s> is acceptable.",s);
        printf("\n");
    }
    return 0;
}



Spring-AI 第 17 章 - 飞书机器人接入详解 ✅ Stream 长连接(官方 SDK)✅ AI 对话(支持工具调用)✅ 消息接收与回复✅ 天气查询✅ 数据库查询✅ 数学计算✅ 事件去重Stream 长连接模式:使用官方 SDK 建立 WebSocket 长连接,服务器主动连接飞书,无需公网 IP消息处理流程:接收消息 → 解析内容 → AI 处理 → 回复用户AI 工具调用:接入 FunctionTools,支持天气、计算、日期、数据库查询等多种工具。 阅读详情

相关推荐

Linux-VMware安装后没有虚拟网卡VMnet1和VMnet8(亲测有效,一步一步跟着绝对成功)

VMware-安装后没有虚拟网卡VMnet1和VMnet8 就这个破东西我昨天弄了一天,网上什么VMware卸载重装,用CCleaner清理注册表什么的操作我全用了,但是昨天就是弄不好,同样的操作我昨天试了无数遍一直觉得可能是 持续更新中… 文章参考学习地址:https://blog.csdn.net/qq_42445139/article/details/87872130 ...

杨的博客 8858

hdoj 1039 Easier Done Than Said?(水题)

思路:规则翻译就好 代码如下: #include #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ #define p 3.1415927 int judge(char c) { if(c=='a'

摆渡人的博客 287

Plant simulation、Flexsim、Automod、Emulate3D、VisuaComponent仿真软件对比

E3D在行业内以展示效果好,入门阶段易学易用人机界面友好,电控仿真连接方便不需要借助其他第三方软件,E3D平台开放度较高用户DIY程度强,数据分析功能针对要评定对象的KPI的可根据项目或者使用者需求进行评定。3.支持导入导出多种格式的文件,比如dwg、dxf、fbx、obj、3ds、step、stp、iges、skp、stl、wrl、 bmp 等等。3.软件自带模型组件库程序代码开放,用户可以引用、修改、拷贝,按照自己的逻辑修改模型,或者创建模型并保存到组件库与别人共享。3. 支持导出布局图片。

qq_43342303的博客 3589

Easier Done Than Said?

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-...

菲菲家的吴先森 791

CANoe从入门到精通“保姆级”教程(二)- 堪称全网“最全”系列

CANoe各功能区介绍;

车载控制器AutoSAR软件开发工程师 2万+

宝塔面板添加站点及运营商SSL免费证书的申请与使用

本文详细介绍在宝塔面板下如何正确添加站点、配置站点,及在运营商如何申请免费SSL证书,将其配置到宝塔站点里。 给你的网站加一把锁,教你免费SSL证书申请,配置到自己的网站中。 环境:Ubuntu server 18 工具:宝塔控制面板 平台:阿里云 Web服务器:Nginx 宝塔:https://www.bt.cn/ 阿里云:https://www.aliyun.com/ 腾讯云:https://cloud.tencent.com/ 要求: 1.宝塔控制面板搭建完毕。 2掌握域名解析的原理。 3.了解ht

贺兰山长老 5063

Easier Done Than Said? 【杭电-1039】 附题

/* 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

Fighting_Dream 1131

基于USB总线的虚拟摄像头(UVC)原理简介

前面文章中我们分析了虚拟声卡的实现,在文章中我们展示了创建一个虚拟麦克风和虚拟扬声器的技术原理。完成了音频的虚拟化之后,这里就要谈论一下对于视频的虚拟化了——虚拟摄像头的实现。关于虚拟麦克风和虚拟扬声器的实现,可以参考。虚拟摄像头应用也是非常普遍的,例如云桌面远程摄像头的实现,直播技术。目前对于虚拟摄像头有三种实现方式:DirectShow虚拟摄像头,这个是一种比较古老的技术;在新版本应用中,该项技术基本失效了,尤其是UWP框架程序,DirectShow虚拟摄像头就失效了。

tianxilink的博客 5426

杭电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): 10540    Accepted Submission(s): 5090 Problem Description Pa

hpuzsk的博客 570

三相直流无刷电机(带HALL传感器)BLDC控制一

本案例选择TIM0的CH0/CH1/CH2三个通道接入三路原始hall输出信号。三路TIM_CHx(48)通过配置存入到NIP寄存器(new input pattern,3 bits)内。未完待续。

m0_69929716的博客 423

基于深度学习YOLOv11的布匹缺陷检测系统(Python+PySide6界面+训练代码)

YOLOv11模型训练:根据布匹缺陷数据集训练YOLOv11模型,以识别布匹中的各种缺陷,如裂纹、污渍、破损等。PySide6界面设计:设计一个图形用户界面,帮助用户上传布匹图像,并显示模型的检测结果。模型优化与精度提升:通过数据增强、超参数调优等手段提高模型的准确性。本文介绍了如何基于YOLOv11实现布匹缺陷检测系统,并通过PySide6构建了一个图形用户界面。该系统能够自动检测布匹中的各种缺陷,具有较高的效率和精度。

斌擎科技 536

HDU-1039-Easier Done Than Said?(Java && 没用正则表达式是我的遗憾.....)

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

保持对编程的热情! 747

内存越界引发线程函数调用堆栈回溯异常以及INT 3软中断实战分析案例分享

通过一个项目实战案例,详细讲解内存越界引发线程函数调用堆栈回溯异常以及INT 3软中断实战问题。

dvlinker的技术专栏 6万+

杭电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

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

HDOJ1039 - Easier Done Than Said?

题目: Easier Done Than Said?

龙之梦 1066

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

(HDOJ 1039)Easier Done Than Said?

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 si...

aeg84268的博客 138

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

HDOJ 1039 Easier Done Than Said?

HDACM 1039 翻译。 import java.util.Scanner; public class Main{ static char ch[] = { 'a', 'e', 'i', 'o', 'u' }; public static void main(String[] args) { Scanner sc = new Scan

whale blog 250

HDOJ 1039 Easier Done Than Said?解题报告

<br />#include <stdio.h> #include <memory.h> #include <bitset> using namespace std; int main() { char str[22]; bool flag; bitset<20> sign

冰枫的随笔 992

hdoj 1039 Easier Done Than Said?

题目:点击打开链接 典型的字符串模拟题,没有什么算法,注意小细节。 代码中用vocnt记录连续元音个数,用cocnt记录连续辅音个数。 用布尔变量isHaveVo记录是否有元音,初始值赋为fasle 用布尔变量isac记录判断是否没有三个连续的元音或辅音或两个连续相同字母,初始值赋为true 布尔变量isShouldNext是当判断出该字符无法ac的时候终止继续从字符串中往下读字

x 545

HDOJ_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 - gene

alw_123的博客 419

HDOJ1039. 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): 14964    Accepted Submission(s): 7274 Problem Description Pa

cr496352127的博客 317

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): 14340    Accepted Submission(s): 6948 Problem Description Pa

落辰哀的博客 308

HDOJ 1039 Easier Done Than Said? 简单的字符串处理

#include"stdio.h" #include"string.h" int vo(char *psw,int i) {return (psw[i]=='a'||psw[i]=='e'||psw[i]=='i'||psw[i]=='o'||psw[i]=='u');} int main() { char psw[21],ans[2][15]={{"not accept

Kizuki 474
上一篇: HDOJ The Hardest Problem Ever
下一篇: nyoj 一笔画问题
飘摇的尘土
博客等级 码龄12年 91粉丝 816原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值