CodeForces Gym 100735C BFS

linux驱动由浅入深系列:块设备驱动之一(高通eMMC分区实例) linux驱动由浅入深系列:块设备驱动之一(高通eMMC分区实例)linux驱动由浅入深系列:块设备驱动之二(块设备驱动结构分析)块设备驱动的模型还是基本基于字符设备驱动的,可以简单理解为块设备仅仅增加了操作缓冲区,对用户请求顺序进行队列重拍等等。字符设备驱动的相关分析可以查看本博客相关的博文。 按照本博客的行文习惯,在具体分析块设备驱动代码之前,我们会从整体上了解一下研究对象的特征,以及用户空间... 阅读详情

就是一个迷宫,然后A可以自己选择去走,但是卫士在A走后会根据A的位置去走,问A能不能拿到那个护身符,假如A拿到后下一步就被卫士干死,也是认为他不能拿到的

就BFS让A走,然后卫士就根据A去模拟就行,状态记录就是walk[ra][ca][rg][cg],表示 A和卫士各自在的位置,然后就BFS跑就行,只是挺烦的,就错了一个地方,&&改成||就能AC,然后以为自己错误很多就没去查,,,,简直智障

#include <cstdio>
#include <cstring>
#include <vector>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
using namespace std;
const int dx[4] = { -1, 1, 0, 0 };//上下左右
const int dy[4] = { 0, 0, -1, 1 };
struct Node
{
	int ra, ca, rg, cg, cnt;
	Node() : ra(0), ca(0), rg(0), cg(0), cnt(0) {}
	Node(int ra, int ca, int rg, int cg, int cnt)
	{
		this->ra = ra; this->ca = ca;
		this->rg = rg; this->cg = cg;
		this->cnt = cnt;
	}
};
int N, M;
char grid[30][30];
bool walk[30][30][30][30];
int main()
{
	//freopen("input.txt", "r", stdin);
	scanf("%d%d", &N, &M);
	for (int i = 0; i < N; ++i)
		scanf("%s", grid[i]);
	Node st;
	for (int i = 0; i < N; ++i)
	{
		for (int j = 0; j < M; ++j)
		{
			if (grid[i][j] == 'A')
			{
				st.ra = i; st.ca = j;
				grid[i][j] = '.';
			}
			else if (grid[i][j] == 'G')
			{
				st.rg = i; st.cg = j;
				grid[i][j] = '.';
			}
		}
	}
	st.cnt = 0;
	/*printf("N %d M %d\n", N, M);
	for (int i = 0; i < N; ++i)
		printf("%s\n", grid[i]);*/
	//printf("ra %d ca %d rg %d cg %d\n", st.ra, st.ca, st.rg, st.cg);
	walk[st.ra][st.ca][st.rg][st.cg] = true;
	queue<Node> Q;
	Q.push(st);
	Node t;
	int r1, c1, r2, c2;
	int ans = -1;
	while (!Q.empty())
	{
		t = Q.front();
		Q.pop();
		if (grid[t.ra][t.ca] == 'P')
		{
			ans = t.cnt;
			break;
		}
		for (int i = 0; i < 4; ++i)
		{
			r1 = t.ra + dx[i];
			c1 = t.ca + dy[i];
			//printf("a %d %d  %c\n", r1, c1, grid[r1][c1]);
			//printf("rg %d cg %d\n", t.rg, t.cg);
			if (r1 >= 0 && r1 < N&&c1 >= 0 && c1 < M&&grid[r1][c1] != 'X' && (r1 != t.rg || c1 != t.cg))
			{
				//printf("a go %d %d\n", r1, c1);
				bool guard = false;
				if (t.cg < c1)
				{
					c2 = t.cg + 1; r2 = t.rg;
					if (c2 == c1&&r2 == r1)
						continue;
					if (grid[r2][c2] != 'X')
					{
						guard = true;
					}
				}
				else if (t.cg > c1)
				{
					c2 = t.cg - 1; r2 = t.rg;
					if (c2 == c1&&r2 == r1)
						continue;
					if (grid[r2][c2] != 'X')
					{
						guard = true;
					}
				}
				if (!guard)
				{
					if (t.rg < r1)
					{
						r2 = t.rg + 1; c2 = t.cg;
						if (c2 == c1&&r2 == r1)
							continue;
						if (grid[r2][c2] != 'X')
						{
							guard = true;
						}
					}
					else if (t.rg>r1)
					{
						r2 = t.rg - 1; c2 = t.cg;
						if (c2 == c1&&r2 == r1)
							continue;
						if (grid[r2][c2] != 'X')
						{
							guard = true;
						}
					}
				}
				if (guard == false)//guard下一步是野兽,所以不能走
				{
					r2 = t.rg; c2 = t.cg;
				}
				if (!walk[r1][c1][r2][c2])
				{
					//printf("%d %d %d %d\n", r1, c1, r2, c2);
					Q.push(Node(r1, c1, r2, c2, t.cnt + 1));
					walk[r1][c1][r2][c2] = true;
				}
			}
		}
		if (ans > -1)
			break;
	}
	printf("%d\n", ans);
	//system("pause");
	//while (1);
	return 0;
}

CorelDraw插件开发-Cdr插件-CPG插件-GMS插件-安装位置 文章目录1.gms格式插件2.cpg格式插件3.作者答疑   CorelDraw软件是一款使用非常广泛的矢量图形软件,系统本身提供了非常便利的二次开发环境,制作插件的格式有两种,一种是gms格式的脚本插件,另外一种是cpg格式dll插件。 1.gms格式插件   gms格式插件是使用微软的 VBA 技术,编写和调试都比较方便,从9的版本开始支持。   安装:把gms文件复制到程序所安装的目录 gms 下,一般在C:\Program Files\Corel\CorelDRAW Graphics Suite 1 阅读详情

相关推荐

机械臂速成小指南(七):从旋转矩阵到齐次变换——机械臂位姿的数学表达

本文详细介绍了机械臂位姿描述的数学基础,包括旋转矩阵、欧拉角和齐次变换等核心概念。通过解析旋转矩阵的几何意义和合成方法,以及欧拉角的直观描述,帮助读者理解机械臂位姿的数学表达。文章还探讨了齐次变换在工程实践中的应用,并提供了数值稳定性、坐标系约定和计算效率等实用建议。

cuda7parallel的博客 839

codeforces 677 D. Vanya and Treasure

做法:每次可以把已经知道ans的点都拿出来,若它的位置是(r,c),则更新所有的dis[r][k]=min(dis[r][k],ans[r][c]+abs(c-k)),1 #include #include #include #include #include #include #include #include #include #include #include #include #

Last Order 1222

红帽RHCE考试下午-RHCE (RH294)任务概览[2021最新版]

RH294任务概览 考试时间4个小时,6台虚拟机,15道题 原来通过脚本或者集群做的题现在都需要使用playbook实现 考试时大概有6台虚拟服务器,都已经做好了互相的免密 做题在ansible控制节点workstation做,但是需要去其他虚拟服务器进行验证 考试时需要将6台虚拟服务器在考试环境全部开启,物理机界面点击左侧按钮启动 考试时Ansible所有playbook都放在普通用户目录中且都以普通用户执行 注意:考试时一定注意要求将playbook放在哪个用户的家目录中,就需要用指定的户登录做题!

SunMy的博客 5625

CodeForces - 1064D Labyrinth(宽搜+优先队列)

D. Labyrinth time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output You are playing some computer game. One of its levels puts you in a ...

LP_Cong 800

【Stata双重差分模型】双重差分DID的具体操作步骤

本案例将详细阐述如何使用双重差分法进行实证分析,并展示具体的STATA操作代码。

a519573917的博客 2万+

TikTok Shop API密钥获取与PHP实战对接指南

本文详细介绍了TikTok Shop API密钥的获取流程与PHP实战对接方法。从开发者后台创建应用、获取核心的API密钥开始,逐步解析OAuth 2.0授权机制,并提供了完整的PHP封装类示例,涵盖签名生成、API调用、令牌刷新及错误处理,帮助开发者快速实现与TikTok Shop的数据对接与自动化操作。

weixin_29300241的博客 406

Codeforces 601A:The Two Routes 宽搜最短路径

A. The Two Routes time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In Absurdistan, there arentowns (...

weixin_34249367的博客 230

第8.1节 满足构网要求的功率器件与散热设计

摘要: 构网型变流器的功率器件选型与散热设计面临严苛要求,需综合考虑过载能力、暂态应力与可靠性。IGBT模块选型需重点评估电压/电流等级、损耗特性及结温波动,而SiC MOSFET虽具有高频低损耗优势,但面临栅极可靠性等挑战。散热设计需采用液冷等先进技术控制结温波动,并通过电热应力仿真和寿命预测实现可靠性优化。系统化选型流程需结合规范要求、工况谱分析和实测验证,为构网型变流器提供坚实的物理基础。

技术工作者 917

CodeForces - 1070A Find a Number(记忆化宽搜)

  A. Find a Number time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given two positive integers dd and ss. Find minimal p...

LP_Cong 1238

2、通过mos管构成的逻辑门电路

一、总结 mos管 是构成 逻辑门电路 的最基本单元。 各个逻辑门电路的真值表如下: 二、各种门 1、非门 NOT 2、与门 AND 3、与非门 把上面与门电路 右边的 非门电路 去掉 NAND 4、或门 OR 5、或非门 NOR 把或门右边的非门电路去掉 6、异或门 XOR 两个输入相异为1,相同为0。 7、同或门 XNOR 两个输入相同为1,相异为0。 ...

engineer0的博客 4万+

FPGA上的时间数字转换器(TDC):详细概述及FPGA开发

本文对基于FPGA的时间数字转换器(TDC)进行了详细的概述,并提供了一个简单的示例代码,展示了如何在FPGA上实现TDC功能。在本文中,我们将详细概述基于FPGA的TDC,并提供相应的源代码示例,以帮助读者理解和实现这一功能。需要注意的是,这只是一个简单的示例,实际的TDC设计可能需要更多的功能和优化,以满足特定的需求。读取和重置:最后,测量结果可以通过读取计数器的值来获取,并且在每次读取后需要将计数器重置为零,以便进行下一次测量。TDC的基本原理是测量信号的到达时间与参考时钟之间的时间差。

EsqpWeller的博客 6886

Codeforces Gym 100345A BibTeX 模拟

题目大意:给一个BibTex的代码,要求你将引用格式化Sample:Input@book { author = “Donald Ervin Knuth”, title = “The Art of Computer Programming”, volume = “1”, publisher = “Addison-Wesley Professional”, year = “1997” }

None 847

Qt垂直滚动条QVerticalScrollBar详解:从基础到实战的控件开发指南

本文系统解析Qt中QVerticalScrollBar的用法,从基础概念到进阶技巧。主要内容包括:1)基础认知:介绍其继承关系、作用及典型应用场景;2)核心用法:创建方法、关键属性配置和信号槽连接;3)进阶技巧:自定义样式表美化外观,以及与自定义内容区域的联动实现;4)实战注意事项,如避免循环触发和高DPI适配等。文章强调掌握QVerticalScrollBar对提升Qt滚动类功能开发效率的重要性,并建议通过自定义文本编辑器实践巩固知识点。

专注现代C++实战,从核心语法到高性能编程,助力开发者深入掌握系统级编程精髓。 762

Codeforces 602A Two Bases

A. Two Bases time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output After seeing the "ALL YOUR BASE ARE BELONG TO US" meme fo

一蓑烟雨任平生 872

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

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

CF 335 div.2-B/606B Testing Robots(读不懂题系列)

题目链接:http://codeforces.com/problemset/problem/606/B 题意:花了好久才读懂,感觉好反人类。。。大概意思是:给定一个x*y的矩形,和一个机器人的初始位置(x0,y0)。以向下为x轴正方向,向右为y轴正方向。现在要对这个机器人进行多次测试。每次测试,会在矩形的某个位置有一个矿井。所以一共要进行x*y次测试,每次测试,矿井会出现在一个之前的测试没有出现

一蓑烟雨任平生 830

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

CF 558B Amr and The Large Array(暴力法)

B. Amr and The Large Array time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr has got a large array of size

一蓑烟雨任平生 827

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

CodeForces Gym 100735I 模拟题(可套大数版)

给你三个数A,B,C,问你这三个数是否可以组成X+Y=Z的形式,每个数都能重复使用 但是A B C都是小于等于1e100的 本来是个模拟题,模拟加法运算和判相等的运算,套了一个超级屌的高精度版就过了 版的出处:http://www.cnblogs.com/HarryGuo2012/p/4524041.html #include #include #include #include #inc

一蓑烟雨任平生 816

CF 335 div.2-C/div.1-A/605A Sorting Railway Cars

题目链接:http://codeforces.com/problemset/problem/605/A 题目大意:在一条路上有序号为1-n的n辆车以任意顺序放着,现在要对这些车以升序进行排序,每次移动可以将一辆车取出来放到最前面或者最后面,现在问想要完成排序的最少移动次数。 解:一辆一辆地取出来相当于把所有要取的取出来,然后按一定顺序往序列里放,所以,我们先把所有要取的取出来,

一蓑烟雨任平生 805

CodeForces Gym 100646E Su-Su-Sudoku

有一个未完成的数独游戏,问你能否完成,能就输出一种方案 因为未填的只有5个格子,每个格子都从1-9枚举,然后判就行 我开始时是通过9个数相加为45判的,结果WA,看来是给的可能本身就已经不合法,所以要判断这9个数是否都有,开个bool数组就行 #include #include #include #include #include #include #include #incl

一蓑烟雨任平生 775

CodeForces Gym 100971J 感觉题意有问题 BFS

为了纪念这道题,我决定贴一个特别迷的AC代码上来,纪念我那估计二十来发WA和TLE。如果有人发现我的问题了,欢迎回复或者私信,感激不尽 首先这道题的意思就是, 给一个地图,#表示障碍,.表示可以走,1表示1号机器人的位置,2表示2号机器人的位置,现在想交换两个人的位置,问能否做到, 两个限制条件就是,1:在同一时刻,他们不能在同一位置,2:如果他们相邻,那他们不能直接交换位置。 然后

一蓑烟雨任平生 760

CodeForces Gym 100735G 二分图匹配

就是给你一个字符串,和一些正方体,每个正方体的六个面上都标有字母或者数字,然后问你能否选一些正方体,通过某种摆放,使得他们摆成一排后组成的那个字符串 据说是裸的二分图匹配,但是我这种智障就是没看出裸来啊,果然图论题做的太少太少,然后看别人代码又短又快,总以为是暴力,然后题意也没说这些正方体可以怎么操作,迷的一笔 还是说下方法吧,字符串的每个字符为左边的点,每个 正方体为右边的 点,然后对于坐标

一蓑烟雨任平生 742

CodeForces Gym 100803A 模拟,贪心

模拟,贪心的搞,从第一位开始,如果需要交换就从后面找个最近的交换就行 #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define maxn 100005 int N, M; int s1[20];

一蓑烟雨任平生 736

CodeForces 589A Email Aliases STL水题

string+map+vector 乱搞就可以,反正n是10^4,理论复杂度是nlogn,所以肯定不会T的(好flag 大概就是先忽视大小写,然后根据域名是不是bmail.com,用户名有两种识别方法,然后统计每个用户名有多少个,分别是哪些就行 #include #include #include #include #include #include #include #incl

一蓑烟雨任平生 689

CodeForces Gym 100735E

给你一个矩阵,他们本来是,每行,每列,两条对角线,的和都是一样的,现在把主对角线的元素都挖去,让你求主对角线上各是什么 以5*5举例吧,假设为a,b,c,d,e,每行的和是sum,然后将所有行加起来就有,a+b+c+d+e+4sum=5sum,然后sum就能求出来,然后根据 每行和为sum,所以每行的那个未知数就能求出来,然后就可以了 #include #include #include

一蓑烟雨任平生 682

CodeForces Gym 100989B LCS (B)

给一个算LCS时得到的DP矩阵,然后根据这个矩阵让你算出两个符合条件的字符串 因为字符串长度 或者不用并查集,每次遇到这 个问题时,就把AB字符串都扫一遍,遇到要改的改掉就行,反正长度 25,随便搞 #include #include #include #include #include #include #include using namespace std; #d

一蓑烟雨任平生 678

CodeForces Gym 100989F Mission in Amman (A)

水题,按要求玩就行 #include #include #include #include #include #include #include using namespace std; #define maxn 100005 int N, M, Q; int student[maxn], place[maxn]; int main() { //freopen("input.tx

一蓑烟雨任平生 668
上一篇: CodeForces Gym 100735B 矩阵快速幂
下一篇: CodeForces Gym 100735D
sky-edge
博客等级 码龄12年 20粉丝 191原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址