hdoj 1039 Easier Done Than Said?

EasierCAP USB电视卡驱动及视频捕捉应用程序 USB007 比较常见的一种USB视频捕捉卡的驱动程序以及配套应用程序。对应插入电脑时显示USB007的硬件,安装后设备管理器显示为OEM Capture。内含一套TVR应用程序及序列号。PowerDirector编辑工具。适合在自己的电脑上捕捉视频画面并简单编辑。 立即下载

http://acm.hdu.edu.cn/showproblem.php?pid=1039

 

Easier Done Than Said?

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


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<stdio.h>
#include<string.h>
int judge(char c)
{
    if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
    return 1;
    else
    return 0;
}
int main()
{
    int n,i,k1,k2,k3;
    char s[40];
    while(scanf("%s",s)&&strcmp(s,"end")!=0)
    {
            n=strlen(s);
            for(i=0,k1=0;i<n;i++)
            {
                 if(judge(s[i])==1)
                 {
                    k1=1;
                    break;
                 }
            }
            for(i=0,k2=1;i<n-2;i++)
            {
                  if(judge(s[i])==1&&judge(s[i+1])==1&&judge(s[i+2])==1||judge(s[i])==0&&judge(s[i+1])==0&&judge(s[i+2])==0)
                  {
                       k2=0;
                       break;
                  }
            }
            for(i=0,k3=1;i<n-1;i++)
            {
                   if(s[i]==s[i+1]&&(s[i]!='e'||s[i+1]!='e')&&(s[i]!='o'||s[i+1]!='o'))
                   {
                        k3=0;
                        break;
                   }
            }
            if(k1==1&&k2==1&&k3==1)
            printf("<%s> is acceptable.\n",s);
            else
            printf("<%s> is not acceptable.\n",s);
    }
    return 0;
}                                                                                                                                                                                                                                                                                        

EasyCAP SM-USB 007采集卡驱动 官方版 sm usb007采集卡驱动是Easy CAP USB1路视频采集卡的驱动程序,为保证大家正常使用,购买此款产品的采集卡用户应安装,插入电脑硬件就能正常识别工作,欢迎下载使用。使用说明国产EasyCAP SM-USB 007山寨USB视频采集卡的驱动程序,这个驱动只适合芯片为SOMAGIC ,欢迎下载体验 立即下载

相关推荐

自动驾驶预测决策规划八股

预测规划八股个人总结。

dawushixiange的博客 481

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

大华摄像头GB28181协议接入EasyCVR全流程(附常见错误排查)

本文详细阐述了大华摄像头通过GB28181协议接入EasyCVR视频管理平台的全流程,涵盖从核心原理、前期参数规划、Web界面配置到平台侧验证的完整步骤。重点针对网络端口、SIP参数配置等关键环节提供了深度排错指南,并总结了设备无法注册、在线不稳定、拉流失败等常见问题的排查思路与解决方案,旨在帮助安防工程师与系统集成商高效完成设备接入与调试。

weixin_29279153的博客 312

HDU 1039 字符串判断(水题)

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-

AK_HuangYC的博客 847

瑞昱RTL8735B开发板深度评测:如何用200元板子搞定1080P视频流+AI推理?

本文深度评测瑞昱RTL8735B开发板(AMB82 MINI),解析其如何在200元预算内实现1080P视频流处理与边缘AI推理。该板搭载0.4TOPS NPU算力,支持H.264/H.265编码,适合物联网开发者构建高性价比边缘计算方案,并详细介绍了硬件架构、AI模型优化及实战项目搭建。

weixin_33712987的博客 540

微调实操一: 增量预训练(Pretraining)

《微调入门篇:大模型微调的理论学习》我们对大模型微调理论有了基本了解,这篇结合我们现实中常见的场景,进行大模型微调实操部分的了解和学习,之前我有写过类似的文章《实践篇:大模型微调增量预训练实践(二)》利用的MedicalGPT的源码在colab进行操作, 由于MedicalGPT代码比较难以理解,而且模型只能从hugging face上下载,对于一些国内服务器无法访问,我重构了代码,让训练代码更有可读性,并参考LLAMAFactory的项目,增加了modelscope上下载模型,轻松在国内服务器运行.

youbingchen的博客 6998

TJU Easier Done than Said?

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 (

当凌绝顶,俯瞰天下 1314

C#的GDI+绘图详解

/消除锯齿 或 AntiAlias。// 1.在窗体或控件的Paint事件中,用PaintEventArgs e 创建绘图对象 ---- 控件或窗体重绘时。//为控件创建绘图对象。//--------------------以上方法三选一。//2.创建绘图对象 panel1中绘图。

weixin_50920631的博客 3464

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

Unity插件NodeCanvas之行为树的详细教程

NodeCanvas 是一个用于 Unity 的可视化脚本工具,主要用于游戏开发中的行为树、状态机和流程图的设计。它通过节点编辑器的方式,让开发者可以更直观地创建和管理游戏逻辑,减少了传统编码的复杂性。今天我们就来详细介绍一下NodeCanvas插件。

TxNet 1974

【WorkBuddy专栏43】如何利用WorkBuddy开发一个PC网站(上)——环境选型、设计编码到部署上线

【WorkBuddy专栏43】如何利用WorkBuddy开发一个PC网站(上)——环境选型、设计编码到部署上线

AI人人懂 2383

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

高通平台开发系列讲解(USB篇)MBIM协议详解

📢本文主要介绍高通平台USB网卡MBIM协议。

内核笔记 5448

HDOJ1039 - Easier Done Than Said?

题目: Easier Done Than Said?

龙之梦 1066

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

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

数学建模模型总结

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

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

NTscan扫描工具

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

(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

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

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

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

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 1249 三角形
下一篇: hdoj 1286 找新朋友
SimonCoder
博客等级 码龄13年 1413粉丝 231原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址