HDU2043_密码

解压密码123 暴力破解密码 立即下载

密码


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


Problem Description

网上流传一句话:"常在网上飘啊,哪能不挨刀啊~"。其实要想能安安心心地上网其实也不难,学点安全知识就可以。

首先,我们就要设置一个安全的密码。那什么样的密码才叫安全的呢?一般来说一个比较安全的密码至少应该满足下面两个条件:

(1).密码长度大于等于8,且不要超过16。
(2).密码中的字符应该来自下面“字符类别”中四组中的至少三组。

这四个字符类别分别为:
1.大写字母:A,B,C...Z;
2.小写字母:a,b,c...z;
3.数字:0,1,2...9;
4.特殊符号:~,!,@,#,$,%,^;

给你一个密码,你的任务就是判断它是不是一个安全的密码。
 

Input
输入数据第一行包含一个数M,接下有M行,每行一个密码(长度最大可能为50),密码仅包括上面的四类字符。
 

Output
对于每个测试实例,判断这个密码是不是一个安全的密码,是的话输出YES,否则输出NO。
 

Sample Input
  
3 a1b2c3d4 Linle@ACM ^~^@^@!%
 

Sample Output
  
NO YES NO
 

Author
linle
 

Source

#include <stdio.h>
#include <string.h>
int main()
{
	int n, i, num[4],len,count;
	char str[100] = {0};
	scanf ("%d", &n);
	while (n--)
	{
		memset(num, 0, sizeof(num));
		memset(str, 0, sizeof(str));
		scanf("%s", &str);
		len = strlen(str);
		count = 0;
		for (i = 0; i < len; i++)
		{
			if (str[i] >= 'A' && str[i] <= 'Z')
				num[0]++;
			if (str[i] >= 'a' && str[i] <= 'z')
				num[1]++;
			if (str[i]>='0'&&str[i]<='9')
				num[2]++;
			if (str[i]=='~'||str[i]=='!'||str[i]=='@'||str[i]=='#'||str[i]=='$'||str[i]=='%'||str[i]=='^')			
				num[3]++;
		}
		for (i=0;i<4;i++)
			if (num[i]!=0)
				count++;
		if (count>=3&&len>=8&&len<=16)
			printf ("YES\n");
		else
			printf ("NO\n");
	}
	return 0;
}
论文选题难?7种AI加持的万能选题法(全专业通用+工具实测) AI时代学术选题新范式:7大智能方法破解研究痛点 传统选题方法面临范围失控、资料难寻、创新不足三大痛点,本文提出AI赋能的7种选题方法论: 1.现象+群体法:自动抓取热点与人群特征 2.理论+场景法:经典理论与新兴场景匹配 3.技术+问题法:前沿技术与领域痛点结合 4.对比+变量法:时空维度与变量关系分析 5.热点+理论法:事件传播与理论深挖融合 6.微调+变量法:已有选题变量置换创新 7.AI全流程法:关键要素智能迭代生成 同时警示AI使用的伦理边界,需规避虚构文献、伪造数据等风险,并提供针对本科生、研究 阅读详情

相关推荐

新手必看:用FileZilla从武大IGS中心下载GNSS数据,再到crx2rnx转换的完整流程

本文详细介绍了新手如何通过FileZilla从武汉大学IGS中心下载GNSS数据,并使用crx2rnx工具将数据转换为RINEX格式的完整流程。涵盖工具准备、FTP连接、文件解压、格式转换及常见问题排查,帮助测绘和地信专业人员高效处理GNSS观测值数据。

weixin_29292431的博客 432

iPad 3」はフロントに「Face Time HD」カメラを採用し3月発売か紹介

iPad 3」はフロントに「Face Time HD」カメラを採用し3月発売か紹介 9 to 5 Macによると、独自のApple情報網を持っているiLoungeのJeremy Horwitz氏が次期iPadに関する情報をツィートしているそうです。その情報をまとめると、次期iPadはカメラの性能が向上し、フロントカメラはFace Time HDカメラになり、バックカメラはiPhone ...

weixin_30773135的博客 11万+

用Python turtle库 绘制皮卡丘

Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x、纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它爬行的路径上绘制了图形。 turtle基础知识参考: https://gitchat.blog.csdn.net/article/details/90696190 https://blog.csdn.ne...

qq_36295856的博客 2万+

HEAP: Free Heap block XXXXXXXX modified at XXXXXXXX after it was freed

在有关于内存分配和释放的代码中,容易发生这种问题。这个问题的描述就是内存已经被释放了,后面还继续使用举个例子:float* distance = new float [dimension]; for(int k=0;k&lt;10;k++) {     for(int i=0;i&lt;dimension;i++)     {     distance[i]=0;     } delete[] d...

mons_xujingtao的博客 107万+

Kaggle | 总奖池超200万美金的数学竞赛AIMO2冠军方案

••••结论1:通过结合高质量大规模数据集、工具集成推理和生成式选择方法,可以构建在挑战性数学问题上达到最先进水平的语言模型。本文的方法在 AIMO-2 竞赛中的胜利以及在多个数学基准上的 SOTA 结果验证了这一策略的有效性。结论2:发布 OpenMathReasoning 数据集、OpenMath-Nemotron 模型和代码是社区的宝贵财富。

hxshine的博客 1209

基于LSTM语义分析的企业风险预测系统

在数字化时代,企业面临着前所未有的挑战和机遇,而风险管理作为确保企业稳定发展的关键一环,其重要性日益凸显。为了及时、准确地监测和分析企业相关的风险,并预测可能带来的风险,本文介绍了一种基于长短期记忆(LSTM)语义分析的企业风险预测系统。该系统利用深度学习技术,通过将收集到的企业数据进行预处理和分析,结合LSTM模型对文本进行深度语义分析,从而实现对潜在风险的预测和评估。系统设计方面,该系统包括数据预处理、LSTM模型构建与训练、风险预测以及可视化展示等模块。

qiufangtaowvnyyidtf的博客 1401

java h d,Java, {Country} Hướng dẫn du lịch | Những việc nên làm tại Java, {Country} | Jetstar | Jets...

Là một trong những đảo nhỏ nhất của Indonesia nhưng cũng như các nơi khác trên khắp đất nước, Java được thiên nhiên ban tặng cảnh đẹp tự nhiên phong phú, từ bãi biển hoang sơ như Kepulauan Seribu trên...

weixin_34547628的博客 6万+

卫朋:IPD流程落地之产品开发验证阶段解读

IPD验证阶段

产品线负责人 1501

HDOJ-1702 栈和队列问题[或模拟]

ACboy needs your help again! Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1697    Accepted Submission(s): 906 Problem Description ACboy wa...

weixin_34226182的博客 552

Android Framework WMS全面概述和知识要点

WindowManagerService 类是整个 WMS 的核心大脑,处于系统服务层,负责协调和管理所有与窗口相关的操作。它在 Android 系统架构中起到承上启下的关键作用,向上对接应用层的窗口请求,向下与 SurfaceFlinger 等底层组件交互,确保窗口能够正确地在屏幕上显示和管理。

大模型大数据攻城狮的专栏 1807

使用virtuoso gds转lef操作方法

2) 然后,需要创建Pin,这里Pin的概念不同于label/text,是有实际金属的,二者的区别类似于pr中的port和terminal。1) 首先,需要画prBoundary,这个用drawing层的prBoundary画是不行的,不过建议pr阶段就把prBoundary转到gds里,在virtuoso layout中画prBoundary就比较容易。另外,用Create - Create Pin也可以创建pin,更适用于PG pin,操作时先给pg shape打label,最好放正中间。

m0_61544122的博客 1399

hdu2043密码(C语言)

hdu2043密码 题目链接: WXD. 这题主要是判断符合条件的总数是否大于3,还有密码长度的问题。首先至少要符合外面两个大条件,接下来至少符合三个小条件,总之还是得多关注细节问题,调试找bug,冲冲冲。 #include<iostream> #include<string> #include<cstring> using namespace std; int main() { char str[51]; int M; scanf("%d

少年的欢喜的博客 1295

〔重庆理工大学〕大学物理实验--变温霍耳效应及其参数测定

每个老师要求不同,实验报告内容和数据仅供参考。

Pretty Boy Fox的博客 3067

HDU 2043 密码

Description 网上流传一句话:“常在网上飘啊,哪能不挨刀啊~”。其实要想能安安心心地上网其实也不难,学点安全知识就可以。 首先,我们就要设置一个安全的密码。那什么样的密码才叫安全的呢?一般来说一个比较安全的密码至少应该满足下面两个条件: (1).密码长度大于等于8,且不要超过16。 (2).密码中的字符应该来自下面“字符类别”中四组中的至少三组。 这四个字符类别分别为: 1.大写字母:A...

名字呢? 206

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

NTscan扫描工具

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

HDU2043 密码

问题链接:HDU2043 密码。入门训练题,用C语言编写程序。 问题简述:参见上述链接。 问题分析:这个题的密码检查有两个方面,一是密码长度,二是密码至少包含三类字符。 大写字母、小写字母和数字这三类的检查是常规检查,程序应该一看就懂。 第四类字符的密码检查稍微有所不同,那些字符在ASCII码表中,未必是连续存放的,所以检查时稍微需要一点点小技巧。用字符指针进行...

weixin_34392843的博客 91

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

hdu2043 密码

Problem Description 网上流传一句话:"常在网上飘啊,哪能不挨刀啊~"。其实要想能安安心心地上网其实也不难,学点安全知识就可以。首先,我们就要设置一个安全的密码。那什么样的密码才叫安全的呢?一般来说一个比较安全的密码至少应该满足下面两个条件:(1).密码长度大于等于8,且不要超过16。(2).密码中的字符应该来自下面“字符类别”中四组中的至少三组。这四个字符类别分别为:1....

weixin_30359021的博客 117

inori mmd 7z

楪祈的模型资源....................................................................................................................................................................................................................

HDU2043 密码【密码】

密码 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 60226    Accepted Submission(s): 24385 Problem Description 网上流传一句话:"常在网上飘啊,哪能不挨刀啊~

海岛Blog 5992

hdu 2043 密码

密码 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22640    Accepted Submission(s): 9032 Problem Description 网上流传一句话:"常在网上飘啊,哪能不挨刀啊

笨小孩的专栏 1223

HDU - 2043 密码

Description 网上流传一句话:"常在网上飘啊,哪能不挨刀啊~"。其实要想能安安心心地上网其实也不难,学点安全知识就可以。 首先,我们就要设置一个安全的密码。那什么样的密码才叫安全的呢?一般来说一个比较安全的密码至少应该满足下面两个条件: (1).密码长度大于等于8,且不要超过16。 (2).密码中的字符应该来自下面“字符类别”中四组中的至少三组。 这四个字符类别分别为: 1.大写字母...

一定要站在自己热爱的生活里闪闪发光 3万+

HDU 2043 - 密码

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2043 #include #include int main(void) { int n, a[6]; char c; scanf("%d%*c", &n); while (n--) { a[0] = a[1] = a[2] =

棺材深處 1370
上一篇: HDU2042_不容易系列之二
下一篇: HDU2044_一只小蜜蜂...
ZayneHuang
博客等级 码龄10年 5粉丝 116原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址