训练总结7.31

Tlsr8258开发-程序烧写 开源一小步,进步一大步 阅读详情

许久没有看东西,上午看到的经典的跳马题,有所感触,这些东西真的要经常的看看额,真的生的像没学过一样额,趁着这道题,又去看了一道广搜的题,把这两种方法的大体的框架回顾了一下。跳马       经典广搜(跳马)

对深搜还是要理解回溯的问题。

Description


深搜经典跳马


Background
The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey
around the world. Whenever a knight moves, it is two squares in one direction and one square perpendicular to this. The world of a knight is the chessboard he is living on. Our knight lives on a chessboard that has a smaller area than a regular 8 * 8 board, but it is still rectangular. Can you help this adventurous knight to make travel plans?

Problem
Find a path such that the knight visits every square once. The knight can start and end on any square of the board.

Input

The input begins with a positive integer n in the first line. The following lines contain n test cases. Each test case consists of a single line with two positive integers p and q, such that 1 <= p * q <= 26. This represents a p * q chessboard, where p describes how many different square numbers 1, . . . , p exist, q describes how many different square letters exist. These are the first q letters of the Latin alphabet: A, . . .

Output

The output for every scenario begins with a line containing "Scenario #i:", where i is the number of the scenario starting at 1. Then print a single line containing the lexicographically first path that visits all squares of the chessboard with knight moves followed by an empty line. The path should be given on a single line by concatenating the names of the visited squares. Each square name consists of a capital letter followed by a number.
If no such path exist, you should output impossible on a single line.

Sample Input

3
1 1
2 3
4 3

Sample Output

Scenario #1:A1Scenario #2:impossibleScenario #3:A1B3C1A2B4C2A3B1C3A4B2C4


#if 1
#include<iostream>   
#include<string.h>              
using namespace std;

int dx[8][2]{{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,-1},{2,1}},p,q,ax[650],ay[650];
bool flag,vis[50][50]; 

int OK(int x,int y)
{
	if(x>=0 && x<p && y>=0 && y<q)
		return 1;
	else 
		return 0;
}

void dfs(int x,int y,int t)
{
	ax[t]=x;
	ay[t]=y;
	vis[x][y]=1;
	
	if(t==p*q-1)
	{
		flag=1;
		return;
	}
	
	for(int i=0; i<8; i++)
	{
		int bx=x+dx[i][0];
		int by=y+dx[i][1];
		
		if(OK(bx,by) && !vis[bx][by])
		{
			vis[bx][by]=1;
			dfs(bx,by,t+1);
			
			if(flag)
				return;
			vis[bx][by]=0;	
			
		}
		
	}
	 	
}

int main()
{
	int x,ans=0;
	cin>>x;

	while(x--)
	{
		memset(ax,0,sizeof(ax));
		memset(ay,0,sizeof(ay));
		memset(vis,false,sizeof(vis));
		flag=0;		

		cin>>p>>q;
        
        for(int i=0; i<p; i++)
        {
			for(int j=0; j<q; j++)
        	{
        		dfs(i,j,0);
        		if(flag)
        		{
        			break;
				}
			}
			
			if(flag)
        	{
        		break;
			}
	   }
		
		if(flag)
		{
			cout<<"Scenario #"<<++ans<<endl;
			
			for(int i=0; i<p*q; i++)
				cout<<char(ay[i]+'A')<<ax[i]+1;
			cout<<endl<<endl;	
		}
		else
			cout<<"impossible"<<endl<<endl;	 		    
				
			
	}	
	
	
}
#endif

回顾的广搜跳马问题:

knight moves经典广搜

Problem Description

A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determining the smallest number of knight moves between two given squares and that, once you have accomplished this, finding the tour would be easy.
Of course you know that it is vice versa. So you offer him to write a program that solves the "difficult" part.

Your job is to write a program that takes two squares a and b as input and then determines the number of knight moves on a shortest route from a to b.



Sample Input

      
e2 e4 a1 b2 b2 c3 a1 h8 a1 h7 h8 a1 b1 c3 f6 f6


 

Sample Output
      
To get from e2 to e4 takes 2 knight moves. To get from a1 to b2 takes 4 knight moves. To get from b2 to c3 takes 2 knight moves. To get from a1 to h8 takes 6 knight moves. To get from a1 to h7 takes 5 knight moves. To get from h8 to a1 takes 6 knight moves. To get from b1 to c3 takes 1 knight moves. To get from f6 to f6 takes 0 knight moves.

#if 1 
#include<bits/stdc++.h>
using namespace std;
int step[8][8];
int dir[8][2]={{1,2},{1,-2},{-1,2},{-1,-2},{2,1},{2,-1},{-2,1},{-2,-1}};
bool pd(int x,int y) 
{
 if(x>=0 && x<=7 && y>=0 && y<=7) 
 return 1;
 else return 0;
} 
int starx,stary,endx,endy;
int bfs()
{
  memset(step,0,sizeof(step)); 
  queue <int>q;
  int x,y,x1,y1;
  q.push(starx);
  q.push(stary);
  step[x][y]=0;
  
  while(!q.empty())
  {
  	 x=q.front();
  	 q.pop();
  	 y=q.front();
  	 q.pop();
  	 
  if(x==endx && y==endy)  //看看现在的位置是不是 
  return step[x][y];
  
  else
  {
    for(int i=0; i<=7; i++)
    {
    	x1=x+dir[i][0];
    	y1=y+dir[i][1];
    	if(pd(x1,y1)) 
    	{
    		q.push(x1);
    		q.push(y1);
    		step[x1][y1]=step[x][y]+1;
		}
    	
	}
  }	
}

}

int main()
{
	char a[3],b[3];
	while(cin>>a>>b)
	{
		starx=a[0]-'a';
		stary=a[1]-'1';
		endx=b[0]-'a';
		endy=b[1]-'1';
		int ans=bfs();
		cout<<"To get from "<<a<<" to "<<b<<" takes "<<ans<<" knight moves."<<endl;
	
	}
	
}
#endif 

这俩题让自己回忆一下深搜和广搜的框架。搜索主要的写的主要还是这两个题,最后看了看课本,放假的dp基本没复习,杭电题没开的时候,重点看了看书上的dp题。





【Charge】仿真目录 Author: JiJi\textrm{Author: JiJi}Author: JiJi Created Time: 2026.01.20\textrm{Created Time: 2026.01.20}Created Time: 2026.01.20 Modified Time: 2026.01.20\textrm{Modified Time: 2026.01.20}Modified Time: 2026.01.20工作流程材料模型[Charge] 电荷分布与折射率变化理论 [Charge] FDTD 阅读详情

相关推荐

【学习路线】 游戏客户端开发入门到进阶

游戏开发是一个交叉性极强的技术领域,对开发者提出了高维度的要求。作为初学者,不要急于求成,打牢基础、注重原理、勤于实践,你的成长将会非常快速而稳健。希望这份学习路线与书单能为你指明方向,迈出职业开发者的第一步。

hhw_hhw的博客 2128

ayit第十四周训练a题

Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two squares in one direction and one square perpendicular to this. The worl

m0_46628834的博客 266

笔记汇总 | 斯坦福 CS229 机器学习

本文为斯坦福大学 2014 秋季 CS229 机器学习课程学习笔记本文主体部分转载自黄海广博士,文末已给出,大家有兴趣可以直接访问笔记首页,下载对应课程资料及作业代码。

ReturnTmp的博客 2463

DFS E A Knights Journey

题目 Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two squares in one direction and one square perpendicular to this. The w

qq_45891413的博客 260

避坑指南:STM32F4的ADC采样FSR传感器,如何稳定读数并校准压力值?

本文详细解析了STM32F4的ADC采样FSR薄膜压力传感器时遇到的读数不稳定和非线性校准问题,提供了从硬件配置到软件滤波的完整解决方案。通过优化ADC设置、改进滤波算法和实施分段线性校准,帮助工程师实现高精度压力测量,特别适用于智能手套和医疗监测等应用场景。

weixin_28675839的博客 273

从零搭建医疗化验单识别系统:深度学习+OCR实战教程(附数据集)

本文详细介绍了如何从零开始构建一个医疗化验单智能识别系统。通过融合深度学习和OCR技术,系统能够应对版式多样、内容专业的医疗单据,实现从文本检测、识别到关键信息结构化抽取的全流程。文章提供了数据集处理、模型选型、训练微调及工程化部署的实战指南,并分享了避坑经验与性能优化策略,为开发者解决医疗信息化痛点提供了完整的技术方案。

k9l0m1的博客 492

【ACM】2022.7.31训练赛

A.Arena B.方程的解 C.Cat Cycle I. 掎角之势 K.砝码称重 ---------------------

Hey1_的博客 324

Creo报错代码-9?手把手教你重新生成许可证文件(基于Creo 10.0)

本文详细解析Creo报错代码-9的成因及解决方案,重点介绍如何重新生成许可证文件以应对网络环境变化导致的验证失败。通过分步指南和高级技巧,帮助用户有效管理多网络环境下的Creo许可证问题,提升工作效率。

weixin_30839881的博客 558

训练总结 7.31

1、今天做了几道搜索题。上午主要看了一下课件,回顾了搜索的知识点和几个经典的例题。下午做了几道杭电上的题,样例是通过了,但是因为

jinghui_7的博客 286

使用Simulink进行四足机器人的非线性动力学建模与仿真

四足机器人的运动包含多个自由度(DOF),包括腿部的摆动和支撑阶段的动力学特性。由于存在接触力、摩擦以及不同地形的影响,四足机器人的动力学行为呈现出高度的非线性特征。因此,构建准确的非线性动力学模型对于研究机器人的运动学和动力学特性至关重要。定义代表机器人状态的变量,如位置、速度、角度和角速度。matlab深色版本通过本指南,我们介绍了如何基于Simulink搭建一个四足机器人的非线性动力学模型,并进行了详细分析。

xiaoheshang_123的博客 311

Qt:一个强大而灵活的跨平台应用程序开发框架

代码示例中的源代码是简单的示例,用于演示Qt框架的一些基本特性。实际应用中,开发人员可以根据自己的需求和项目要求,使用Qt框架提供的丰富功能和组件进行开发。在Qt的官方文档和示例代码中,您可以找到更多详细的教程和示例,以帮助您更好地理解和使用Qt框架。它提供了丰富的工具和功能,支持跨多个平台进行开发,并具有高度的可定制性和灵活性。它提供了丰富的工具和功能,使得开发人员能够创建高性能、可扩展和易于维护的应用程序。下面将详细介绍Qt框架的优点,并提供一些相关的源代码示例。

CodeVorter的博客 850

7.31个人训练总结

写这篇文章的时候是在8.3 0:20分。。。别问我为什么拖这么久,开始两天放假在打游戏没心情写这个屑报告,2号白天要补题和罚坐,晚上有事出去吃小龙虾。 Codeforces 1555A 题目链接:点击这里传送 题意: 你要买n个披萨,但是披萨店只能花15分钟烤6个披萨,20分钟烤8个披萨,25分钟烤10个披萨,你只能选择上述的三种形式。 思路: 仔细观察就能发现,无论哪种方式,烤披萨的时间都是2.5分钟1个。就转变成了类似于出租车计费的问题,起步价是15,后面每烤2个披萨(向上取整)再加5。 #inclu

m0_51145827的博客 225

【Microchip】微芯 MPLAB® X IDE开发环境新建项目(点亮1颗LED灯)(常用右键菜单快捷键)

1.新建项目2. 选择芯片型号和调试器3.选择编译器4.项目命名和选择文件路径5.新建成功,给项目添加main.c7.将新建的mainXC16.c文件添加进项目6000000UL这三个就是。

Naiva的博客 451

7/31 训练日志

题意武器开始攻击力为A(初始为0),通过公式10*A+x对n进行取模等于i则杀死第i个人,最少进行几次变换。1.想到了会二进制中“1”两极分化,且不会无故消失。2.采用dp的方式记录第k家公司iq为i,eq为j时,对aq的最低要求是多少。1.n+m为偶数时,经过的格子数为n+m-1,不可能得到累加得到0。2.没想到需要在原数组基础上构建一个新的数组,思维太差了。1.此类题好久没做了,应注意到iq,eq,aq的值在。表示到达i行j列时可得答案最大值,2.设计状态,这个较为简单。1.任何数模1答案都为0。...

weixin_51934288的博客 403

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

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

7.31训练总结

    今天上午主要看了逆元以及中国剩余定理的内容,下午主要做了一下练习赛的5个题目。     先说一下练习赛的情况,大部分题目不是很难,但题目意思真的不好理解,之后搜了一下原题,发现之前有好多理解错的地方,所以简单问题复杂化。     然后对于逆元,主要看了一下快速幂的解法:     首先,逆元的作用:逆元是当我们求 (a/b) mod c时,由于b可能极大,导致最后出现精度问题,所以我们...

又菜又爱玩 205

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

训练总结 18.7.31

   今天看了一下暑假训练四的题目,做了几道简单的题目。     看了一下后缀数组,之前看过的几乎不记得了。忘得倒是挺快,忘得快的很可能就是没有真正掌握过,昨天比赛的单调队列就是很好的例子。很多知识点需要加深理解巩固。...

jinghui_7的博客 120

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

T31训练营 DAY7

Java开发手册(嵩山版) > 二、异常日志 > (二) 异常处理 (第30页) 不足1: 4. 【强制】捕获异常是为了处理它,不要捕获了却什么都不处理而抛弃之,如果不想处理它,请将该异常抛给它的调用者。最外层的业务使用者,必须处理异常,将其转化为用户可以理解的内容。 本条规约表述不够清晰。 什么是处理? 常见的处理方式有哪些? 什么是不想处理? 常见的异常处理方式有: 1.记录日志 2.尝试恢复 3.降级使用默认值 4.转换成上层异常类型 5.不处理、忽略 6.以上几种的组合 有些

shine_wang的专栏 308

T31训练营-DAY7周总结

不知不觉第一周孤尽训练营已结束,今天来总结一下这周的内容。 Day1 讲解了整个项目的架构,从需求分析到设计的原则,学习了画架构图、UML图等内容。 Day2 个人练习部分,产出UML图。 Day3 主要讲解数据库规范,建表规约,索引规约,映射规约。 Day4 个人练习部分,产出项目ER图 Day5 学习了异常处理设计,日志设计规约,错误码设计规范。 Day6 个人练习部分,产出异常与日志学习笔记。 第一周主要是规范的学习与项目的介绍,接下来第二周将开始进行实战编码环节。期待学

qq_32114837的博客 328

7.31 训练周记

我对Tarjan的理解,其核心就是维护一个存储dfs遍历顺序的dfn数组,和一个存储当前节点最早能回溯到的顺序的数组low,通过比较dfn和low可以知道这个节点是否可以有超过父节点的回边,根据这个性质,则可以找出割点和割边,并且可以判断出是否成环,并且对其缩点去环。最后就是感觉本周的学习状态不是很好,应该是作息不规律,晚上很晚睡,到下午才醒,虽然做电脑前也能学到十二点一点,保证学习时间,但是这几天脑子感觉就是一团浆糊,难以聚集注意力和思考,接下来还得调整一下作息,不然感觉浪费了好多时间。......

m0_60777643的博客 138

7/31训练日记

今天补了一下昨天的题然后就继续做邻值查找好歹是用数组把他给做了出来,然后看邻接表和hash,hash表通过一个函数把一组数据的相同特征表示出来(即虽然有可能某些部分数据有差异但是他们通过某种运算得出来的值是相同的)我们就可以用这些值来把所有数据分成一组组的然后通过邻接表的方式把他们和特征值连接起来然后查找判断什么的通过邻接表的方式会很快。很像map(不过hash可能会有多个数据对应一个键值所以ma...

u013345179的博客 101

训练日志9 (7.31)

T1 辣鸡(ljh)   又是一道模拟题,我们所要做的就是用简单的$for$循环把各种情况枚举出来,暴力计算答案,就能A了,复杂度$O(n^2)$(其实也不严格,中间有一些小减枝)。   在这道题中,具体的,我们可以把每个无重叠格子对答案的贡献看成两部分: 方块内部的贡献。 方块间的贡献。   这时候问题就被简化了。   方格内部的贡献,我们可以转化成一个神奇的公式:...

weixin_30337157的博客 136

2019.7.31训练总结

第二周过去了一半的时间,离两周看完三章的任务还差很多。 今天看完了队列和一半哈希表。哈希表还挺好理解的。就是用邻接表实现离散的思想以存储信息。这样用哈希表查询数据的效率也很高。 今天再次看了莫队,大致理解了莫队的思想,但是还没有做过莫队的题,还做不到轻松使用莫队算法。 还要提高数学能力和建模能力,编程离不开数学,今天被一个一元二次方程困住了好久,太不应该了。 ...

weixin_43438700的博客 104

【2020HBU天梯赛训练】7-31 家庭房产

7-31家庭房产 并查集 因为之前没看过书,所以今天卡死了,看了一下知识点才发现原来合并的时候是更改根节点的父亲不是当前节点的父亲。说明不但刷题很重要,看书也很重要,两者缺一不可需要同时进行。 给定每个人的家庭成员和其自己名下的房产,请你统计出每个家庭的人口数、人均房产面积及房产套数。 输入格式: 输入第一行给出一个正整数N(≤1000),随后N行,每行按下列格式给出一个人的房产: ...

韩旭051的博客 861

2019-7-31训练日志

Hash Hash表又称作散列表,一般由Hash函数与链表结构共同实现,主要还是用到链表中的邻接表。Hash的思想与离散化相似,对复杂信息处理时,把这些信息映射到一个容易维护的值域内,有可能会产生冲突,我们需要处理这种情况。 Hash表主要包括两个基本操作: 1,计算原始值经过hash函数映射的值 2,定位到对应链表中依次遍历,比较。 当Hash函数设计较好时,原始信息会被比较均匀地分配...

qq_43642142的博客 108

2018/7/31训练日记

MZL's Border  这个题是高精度+找规律 m跟LBorder(m)的差值是成斐波那契数列的,之后只要进行高精度运算就好。 MZL's simple problem 这个题很容易让人想到平衡树去做,不过有简单的放回 因为删除的数是最小的,查找的数是最大的,所以在操作过程中是不会删除最大的数的 所以只要保存最大数就可以。 MZL's xor 这个题思考下,写一下就出来了,(Ai...

胖亚亚的小酒馆 273

2018/7/31 训练日记

这一次和知识点总结分开写。 今天主要学习了中国剩余定理,和逆元,至于斐波那契数还是有些地方不懂 课本只是理解知识的一种途径,不要局限于课本上的理解方式,将课本+网上讲解+例题综合的看待知识点, 还有就是课本---(有错误,可能参考程序不完整吧) 回顾了昨天学习的,感觉有点不扎实,需要温故而知新。 今天下午的练习赛 嗯,,,, 大一学习的知识点感觉要忘干净了,找时间复习一下 还有就是...

Source_Roc 160
上一篇: knight moves经典广搜(bfs)
下一篇: 训练总结8.1
Joined
博客等级 码龄10年 19粉丝 134原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值