hdu 4772 Zhuge Liang's Password

保姆级教程:用U盘给浪潮服务器装系统(含RAID驱动加载技巧) 本文提供了一份详细的浪潮服务器U盘安装系统指南,重点介绍了RAID驱动加载技巧与实战步骤。从准备工作到系统安装全流程,涵盖RAID配置、驱动加载方法及常见问题排查,帮助用户高效完成服务器系统部署。特别强调RAID驱动与服务器型号的匹配性,确保安装过程顺利。 阅读详情

        题意:给两个n*n矩阵,可以旋转,判断最多有多少组对应元素相等。

        思路:对每个方向统计一次,得到最大值。


#include <iostream>         
#include <stdio.h>         
#include <cmath>         
#include <algorithm>         
#include <iomanip>         
#include <cstdlib>         
#include <string>         
#include <string.h>         
#include <vector>         
#include <queue>         
#include <stack>         
#include <map>       
#include <set>       
#include <ctype.h>         
#include <sstream>     
#define INF 1000000000     
#define ll long long     
#define min3(a,b,c) min(a,min(b,c))  
#define max3(a,b,c) max(a,max(b,c)) 

using namespace std;

int mp[33][33];
int mp2[33][33];

int main(){
	int n;
	while(cin>>n){
		if(!n)break;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				scanf("%d",&mp[i][j]);
			}
		}
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				scanf("%d",&mp2[i][j]);
			}
		}
		int ans=0;
		int tmp=0;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				if(mp[i][j]==mp2[i][j])tmp++;
			}
		}
		ans=max(ans,tmp);
		//
		tmp=0;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				if(mp[i][j]==mp2[j][n-i+1])tmp++;
			}
		}
		ans=max(ans,tmp);
		//
		tmp=0;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				if(mp[i][j]==mp2[n-i+1][n-j+1])tmp++;
			}
		}
		ans=max(ans,tmp);
		//
		tmp=0;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				if(mp[i][j]==mp2[n-j+1][i])tmp++;
			}
		}
		ans=max(ans,tmp);
		cout<<ans<<endl;
	}
	return 0;
}


【数据分析】基于多组学数据整合的微生物与宿主互作网络构建及可视化分析 综上所述,本教程通过详细的步骤和方法,展示了如何整合微生物群落数据、宿主基因表达数据和代谢组数据,构建微生物与宿主互作网络,并进行可视化分析。这种方法为研究微生物与宿主之间的复杂关系提供了一种有力的工具,有助于推动相关疾病的研究和治疗。然而,在实际应用中,需要注意数据处理和分析过程中的各种问题,并结合实验验证来提高研究结果的可靠性和科学性。未来,随着多组学技术的不断发展和完善,以及数据分析方法的创新,相信我们能够更深入地理解微生物与宿主之间的互作机制,为疾病的预防、诊断和治疗提供更有力的支持。 阅读详情

相关推荐

解决:Solving environment: failed CondaValueError: Malformed version string ‘~‘: invalid character(s).

解决:Solving environment: failed CondaValueError: Malformed version string '~': invalid character(s).

晚风微凉的博客 1万+

Zhuge Liang's Password--选拔赛

选拔赛的一道题,时隔。。20

Orz~~Orz 844

【UVM实战】第七章:UVM中的寄存器模型(1)寄存器模型简介

寄存器模型简介~

悟已往之不谏 知来者之可追 2071

HDU 4772 Zhuge Liang's Password 水

枚举一下四种不同的情况,然后比较一下那个duiyi

559

RAG 提示词工程最佳实践

虽然目前网络上关于提示工程的相关资料已经多如牛毛,然而 RAG (检索增强生成) 任务中提示工程如何进行的资料相对而言却较少。不少朋友之前也热烈的讨论过 RAG 场景下提示词的运用,因此 Zen 禅与计算机程序设计艺术 特别推出 RAG 任务下的提示词实践经验系列分享。RAG 是检索增强生成(Retrieval Augmented Generation)的简称,是当前最火热的企业级LLM应用方案。

AI天才研究院 2012

YOLOv11改进策略【小目标改进】| 添加专用于小目标的检测层 附YOLOv1~YOLOv11的检测头变化详解

在目标检测领域,小目标检测一直是一个具有挑战性的问题。算法以其高效快速的特点受到广泛关注,然而在面对小目标时,仍存在一些局限性。本文将介绍如何在中添加小目标检测层,以提高对小目标的检测能力。原始模型结构如下:详细内容参考:YOLOv11原始模型结构介绍 二、有效特征层对应的检测头类别 2.1 P3/8 - small检测头 原始模型中的对应的检测头主要用于检测相对较小的目标。其特征图大小相对较大,空间分辨率较高。 适合检测尺寸大概在到像素左右的目标。 2.2 P4/16 - medium检测头 这个检

Limiiiing的博客 8801

2013杭州站C - Zhuge Liang's Password(模拟)

题目地址 题目大意:给出n及2个n*n的数组,求对其中一个数组进行旋转0度,90度,180度,或者270度,2个数组同位置的相同元素最多有多少个 解题思路:纯模拟,比较求最大 #include using namespace std; const int N = 35; int a[N][N],b[N][N]; int main() { int n,m; while(

booyoungxu的专栏 380

【汽车 OTA 】差分升级

汽车 OTA 差分升级,本质是在整包 OTA 的基础上,通过“只传变化”的方式,大幅减少下载数据量、时间和成本,是当前车端软件升级的主流方向之一。

天赐好车的博客 485

HDU 4772 Zhuge Liang's Password

Problem Description   In the ancient three kingdom period, Zhuge Liang was the most famous and smart military leader. His enemy was Sima Yi, the military leader of Kingdom Wei. Sima Yi always looked ...

Fighting-Dawn丶的专栏 1129

手把手教你学simulink(16.10)-- 基于Simulink的IIR滤波器(Infinite Impulse Response Filter)项目

基于Simulink的IIR滤波器(Infinite Impulse Response Filter)项目的详细实例介绍。这个项目将重点放在IIR滤波器的设计、实现和仿真上,帮助你理解和应用IIR滤波器在信号处理中的作用。

MHD0815的博客 706

AI + 药物临床试验研发赛道

研究日期:2026-07-09 | 研究主题:AI + 药物临床试验研发赛道 | 聚焦岗位:Agent 平台架构师 / AI 工程架构师。

AI天才研究院 146

HDU - 4772 - Zhuge Liang's Password(模拟)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4772 题意:给你两个n*n的矩阵,任意翻转一个矩阵0,90,180,270度,与另一个矩阵重叠,求重叠的最大数字的个数是多少 思路:求出坐标变换公式就行c[i][j] = a[j][n-i+1],相当于每次将矩阵逆置一次。 #include <iostream> #include ...

sugarbliss 372

135、高通 ChromaTix 调优工具入门:参数含义、调优流程与效果对比

本文介绍了高通ChromaTix色彩调优工具的核心使用要点:1. ChromaTix是位于ISP管线中的色彩处理系统,核心任务是将原始色彩映射为符合人眼感知的"舒适"效果;2. 重点解析了饱和度、色调、亮度相关饱和度等关键参数的实际含义和调试陷阱;3. 分享了四步调优流程,强调需要基于多场景数据验证;4. 通过案例展示了参数调整带来的色彩改善效果;5. 总结了实用建议,包括保持单一变量调试、量化评估色差、关注极端场景表现等。文章指出ChromaTix调优是平衡不同场景需求的"妥协艺术",需要结合客观数据和主

sundong_81的博客 109

HDU 4772 Zhuge Liang's Password

#include #include #include #include #include using namespace std; int a[305][305],b[305][305]; int N; void solve(){ memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); for(int i=1;i for(int

BacktoWin 672

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

HDU-4772-Zhuge Liang's Password

Zhuge Liang's Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 927    Accepted Submission(s): 637 Problem Description   In

Never say never 779

深度学习工具包 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")

hdu 4772Zhuge Liang's Password(水题)

Zhuge Liang's Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2552    Accepted Submission(s): 1636 Problem Description   I

The_star_is_at的博客 500

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

hdu4772 Zhuge Liang's Password

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4772 题意:给你一个n,再给你两个nxn的矩阵a,b,问你a,b最多有几个元素相同,b可以旋转角度 解析:水题,直接做#include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <iostre

22h's Blog 518

hdu:4772 Zhuge Liang's Password

题目:Zhuge Liang's Password 题目大意:给出两个N * N 的数组,问后一个数组(可以旋转)与前一个数组比较,相同位置上的相同数字的最大个数。 解题思路:把3个旋转后的数组的坐标理起清楚就可以了。 代码: #include #include const int N = 35; int p1[N][N], p2[N][N]; int

830

HDU 4772 Zhuge Liang's Password (简单模拟题)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4772 题面: Zhuge Liang's Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1404  

David_Jett 1060

Hdu 4772 Zhuge Liang's Password

矩阵行列变换  水~~  将第二矩阵的转90度、180度、270度之后的结果保存进其他矩阵中,将四个矩阵和第一矩阵比较,如果相同位置上的数字相同,则记录,最后输出嘴个矩阵中相同数字的个数的最大值。 矩阵行列变换的核心公式是:map[i][j] = a[j][n-i-1] AC代码: #include #include #include #include

Chuck的博客 1325

HDU4772-Zhuge Liang's Password

Zhuge Liang's Password Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 541    Accepted Submission(s): 370 Problem Description   In the an

程序猿之洞 1291

HDU 4772 Zhuge Liang's Password (矩阵旋转)

Zhuge Liang's Password Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 931Accepted Submission(s): 641 Problem Description   In the a...

229

【ICPC-141】hdu 4772 Zhuge Liang's Password

点击打开链接 题意:给定两个n*n的矩阵,矩阵可以进行90,180,270的旋转,问两个矩阵完全重合的时候最多有几个数是相同的 思路:暴力枚举第一个矩阵的4种情况和第二个矩阵匹配,求出ans 代码: #include<cstdio> #include<cstring> #include<iostream> #include<algorit...

藏经阁 | 玄苦 1404
上一篇: hdu 4778 Gems Fight!
下一篇: hdu 4802 GPA
squee_spoon
博客等级 码龄14年 61粉丝 455原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值