CF 946D. Timetable 暴力+DP

介绍一款时间表(TimeTable)的用法 前言 最近在为某培训机构开发教务管理系统,其中遇到的比较多的就是课表的展示,在google中搜索一番之后,找到了一款比较好的timetable,所以和大家一起分享一下。 在线demo: http://timetable.askblog.net/Timetable.htm step0 引入相关... 阅读详情
题意:某星球一周有n天,每天m个小时.每天小A会在该天第一次上课时间p,直到最后一次上课时间q待在学校 共q-p+1小时.
给出课表s,若s[i][j]=='1'代表有上课 否则代表没课.
问溜掉不超过k节课 使得小A这n天在学校的总时间最小. n,m,k<=500


如果每次只考虑删一次最多能减小多少,容易找到反例
1 24 2
110000000000000101010101
跑出的结果为21 答案为9.


设d[i][j] 表示前i天翘j次课的最小在校时间 f[i][j]为第i天翘j节课时 该天在校的最短时间.
转移 d[i][j]=min(d[i-1][p] + f[i][j-p])

预处理f[i][j],暴力枚举第i天最后剩下的在校线段[l,r],前缀和求出删除的个数即可.O(n^3).

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=5e2+5,inf=0x3f3f3f3f;
int f[N][N],d[N][N];
int n,m,k,p[N];
char s[N][N];
int main()
{
//	ios::sync_with_stdio(false);
//	cin.tie(0);
	cin>>n>>m>>k;
	memset(d,inf,sizeof(d));
	memset(f,inf,sizeof(f));
	for(int i=1;i<=n;i++)
	{
		scanf("%s",s[i]+1);
		p[0]=0;
		for(int j=1;j<=m;j++)
			p[j]=p[j-1]+(s[i][j]=='1');
		f[i][p[m]]=0;
		for(int l=1;l<=m;l++)
		{
			for(int r=l;r<=m;r++)
			{
				int tot=p[l-1]+(p[m]-p[r]);
				if(p[r]-p[l-1])
					f[i][tot]=min(f[i][tot],r-l+1);
				else
					f[i][tot]=0;
			}
		}
		
	//	for(int j=0;j<=m;j++)
	//		cout<<i<<' '<<j<<' '<<f[i][j]<<'\n';	
	}
	for(int j=0;j<=k;j++)
		d[0][j]=0;
	for(int i=1;i<=n;i++)
		for(int j=0;j<=k;j++)
			for(int p=0;p<=j;p++)
				d[i][j]=min(d[i][j],d[i-1][p]+f[i][j-p]);
	cout<<d[n][k]<<'\n';
	return 0;
}







小智AI MCP协议实战:从语音指令到设备响应的完整链路拆解 本文深入拆解了小智AI MCP协议在智能语音交互中的完整工作流程。通过一个“调节音量”的真实场景,详细阐述了从语音采集、云端AI意图理解与决策,到MCP协议下的工具调用、设备端执行,最终完成语音反馈的每一个技术环节。文章重点分析了MCP协议如何通过标准化的交互模型,解决AI意图与设备控制间的“最后一公里”通信难题,实现高效可靠的设备响应。 阅读详情

相关推荐

因时机器人-灵巧手配置方案(Ubuntu18.04)

因时机器人-灵巧手配置方案(Ubuntu18.04)

CH_monsy的博客 3865

CF946D Timetable 分组背包 + 预处理

给出 n 行 m 列 01 串,对于每一行所要花费的代价是行中第一个 1 和最后一个 1 之间的距离加1 。现在你可以去掉 k 个 1,问去掉不多于 k 个 1 的情况下,最小代价是多少。

yjr_0000123的博客 247

【Musescore 】开源打谱软件 快速入门笔记

前两天做了个西贝柳斯的打谱软件学习笔记,反正都是初学,今天再来学习一款同类软件,比较之后确定一款深入学习。 西贝柳斯的学习笔记在此:https://blog.csdn.net/yuetaope/article/details/120020342 西贝柳斯是商业收费软件,要么花钱,要么盗版,如果您觉得这两者都不大好,那么推荐您试试Musescore。 Musescore是一款非常优秀的开源的打谱软件,生态繁荣。“开源”和“生态”是码农业的术语,我用正常人类的语言简单解释一下。 开源就是开放程序源代码,对码农

专注于医院数据分析技术与系统开发的创作与分享。 1万+

CF946D Timetable 背包dp + 思维转换

传送门 文章目录题意:思路: 题意: n,m,k≤500n,m,k\le500n,m,k≤500 思路: 将其转换成背包的模型,就可以想出来一个很明显的dpdpdp状态:f[i][j]f[i][j]f[i][j]表示前iii行花费了jjj的最小代价,我们只需要预处理出来g[i][j]g[i][j]g[i][j]表示第iii行花费了jjj之后这一行的最小代价,就可以通过枚举jjj和ttt按照如下转移:f[i][j]=max(f[i][j],f[i−1][t]+g[i][j−t])f[i][j]=max(f[

m0_51068403的博客 219

esp32移植canopen协议栈(二)

本文续接上一篇文章,之前我们已经搭建好了esp32的开发环境,以及初始工程。接下来我们开始实现can驱动相关,以及使用c++封装can接口。本文使用esp32实现c++实现can驱动层的封装。下一步移植canopen!!!嘻嘻。

qq_50267418的博客 1915

足球赛事数据API:开发者生存指南(附真实踩坑记录)

作为一个既爱看球又爱写代码的老宅男,我这些年用过的足球API比看过的比赛还多。从最初被各种API文档折磨到怀疑人生,到现在能闭着眼睛调接口,中间的血泪史够写本书了。今天就把这些经验(和教训)分享给各位同好,特别是那些正在为"老板要做个足球App"而秃头的同行们。文档清晰免费层可用响应格式规范API-Sports免费额度大方支持GraphQL有中文文档(难得!Sportmonks数据全面有Webhook支持按需付费。

Happy0970的博客 2214

CF946D Timetable 题解

这道题很显然是一道DP题

chitsuka的博客 375

Microsoft AI SDK 与 SAP ABAP:让企业级 AI 能力触手可及的深度整合指南

借助 Microsoft AI SDK,ABAP 开发者无需跳出熟悉的事务码与数据字典,就能把 GPT‑4 的强大语言理解与生成能力深度植入采购、销售、财务等核心业务流程。只要掌握“初始化 SDK → 构造 Prompt → 解析输出”这一范式,未来无论 Azure OpenAI、OpenAI 还是本地化 LLM,都能在同一套代码骨架内快速切换,实现真正的“AI 即服务”。现在,就让我们在下一行 ABAP 里拥抱智能未来。参考链接均于 2025‑07‑22 提取,推荐读者结合实际版本进一步验证。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 443

Timetable-DP-CF946D(好题)

题目传送门 思路: DP #include&lt;iostream&gt; #include&lt;cstdio&gt; #include&lt;algorithm&gt; #include&lt;vector&gt; #include&lt;set&gt; #include&lt;stack&gt; #include&lt;queue&gt; #include&lt;map&gt

我们花时间收集,却忘了最重要的其实是花时间去消化 374

PSO-BP和BP多输入多输出回归预测模型 matlab (多输入多输出)

PSO-BP和BP多输入多输出回归预测模型 matlab (多输入多输出)

算法如诗的博客 260

损失函数大汇总(五十九)(TopoInteraction Loss附公式推导与代码)

本文介绍了TopoInteraction Loss,一种用于多类别分割任务的拓扑交互约束损失函数。不同于传统拓扑损失关注单类别的连通性和孔洞数量,该损失重点约束不同类别之间的空间关系,包括互斥(exclusion)和包含(containment)两种典型拓扑关系。通过将全局拓扑约束转化为局部邻接检测,该损失能准确定位破坏预设拓扑关系的像素,并针对性施加惩罚。关键创新点在于:1)将包含关系转化为互斥约束;2)使用卷积运算高效检测非法邻接;3)仅对违规像素施加损失。实验表明,该方法能有效纠正类别间的错误接触,特

悦学共鸣,温柔以待,汇聚光芒,共同成长 354

题解 [CF946D] Timetable

dp

im_zyINF的博客 194

【python三维深度学习】python三维点云从基础到深度学习

从三维点云基础知识到深度学习,将按照以下目录持续进行更新。更新完成的部分可以在三维点云专栏中查看。含数据与python源码。

叶子的博客 2万+

cf946d 怎样逃最多的课dp

来源:codeforces D. Timetable Ivan is a student at Berland State University (BSU). There arendays in Berland week, and each of these days Iv...

diandu7489的博客 194

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

贝叶斯统计 [韦来生编]

贝叶斯(Bayes)统计是近几十年来迅速发展起来的数理统计的一个重要分支。贝叶斯方法与经典统计方法的主要不同之处是进行统计推断时除了利用样本信息外,还要利用参数的先验信息,因此可以提高统计推断或统计决策的效果。它在经济、金融、生物、医学、自然科学和社会科学等许多领域具有广泛的应用。贝叶斯方法的研究已渗透到了统计学的几乎所有领域。作者在给中国科学技术大学概率论与数理统计专业本科生开设的“数理统计”课程中有一章专门讲授“贝叶斯方法和统计决策理论”,近十年来也给中国科学技术大学概率统计专业研究生开设过几次“贝叶斯分析”课。本书是在对过去讲稿的内容作了适当的增减和调整的基础上完成的。  本书共分六章。第1章是绪论,介绍了贝叶斯统计的若干基本概念,同时对必要的数理统计的基础知识有重点地作了回顾。第二章介绍了确定先验分布的若干可供选择的方法。第三章介绍了几类常见统计模型参数的后验分布的主要结果和计算方法。第四章和第五章分别介绍了“贝叶斯统计推断”和“贝叶斯统计决策”的内容。第六章介绍了贝叶斯统计计算的若干方法,包括蒙特卡洛方法和马尔可夫链蒙特卡洛(MCMC)方法以及相关统计软件的简介。本书的每一章附右大量的例题和习题,书末附有常用的几个表格和部分习题解答供读者查用。  大约可在54学时内讲授本书的第1章至第六章的主要内容,教师可根据学时需要选讲本书第1章至第六章的部分内容。书中标“*”号的章节可略去不讲,留给读者作为阅读材料。第六章例题中的R代码和部分例题的数据文件等可从作者个人主页下载。  作者在编写本书的过程中参考了J.O.Berger教授的《统计决策论及贝叶斯分析》和茆诗松教授编写的《贝叶斯统计》等书中的一些内容,以及《贝叶斯分析》一书中由张伟平博士编写的有关贝叶斯统计计算的一些内容。在此表示衷心感谢。  本书编写准备过程中,中国科学技术大学统计与金融系的几个研究生帮助完成了本书部分中文的录入和排版,作者对他们的辛勤工作表示真诚的感谢。高等教育出版社为本书的出版给予了大力支持。在此一并致谢。

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Educational Codeforces Round 39 (Rated for Div. 2) D. Timetable(动态规划)

D. Timetable time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ivan is a student at Berland State University (BSU). There are n day...

城南的花 262

codeforces-946DTimetable

D. Timetabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan is a student at Berland State University (BSU). There are n days in Berland week,...

Pei_1997的博客 806

Codeforces 946D - Timetable

链接:http://codeforces.com/problemset/problem/946/D题意:有n天,每天m节课,总共可以逃k节课,问怎么逃课能使上课时间最短,并输出。思路:按多重背包的思路来考虑,dp[i][j]表示,对于前i天如果第i天逃j节课能少上的时间是多少。vv[i][j]代表对于第i天,如果逃j节课最多能少上的时间。sum[i]代表第i天不逃课要上的时间,z是第i天如果逃z节...

qq_33688997的博客 337

Codeforces946D Timetable

题目链接: http://codeforces.com/contest/946/problem/D题意:给出n个长度为m的01串,可将最多k个01串删除,之后每个串权值为最前和最后的1出现的距离。比如010010为4,010为1,000为0题解:单独预处理每个串用0~k个可以减去距离的最大值,显然删除ki个一定是从左找KiL个,从右找KiR个,相加为ki, 预处理后了。dp[i][j]表示前i个串...

qq_36876305的博客 365

CF 946G - Almost Increasing Array 技巧 LIS DP

题意: 给你一个数组,问最多改变多少个数字,可以使他变成“几乎上升”,“几乎上升”的意思是最多删掉一个数后数组严格上升。 题解: 如果没有删除, 假如不是严格上升,我们可以用n - LIS(LIS的意思是最长不下降子序列)。 是严格上升,我们先把a[i] - i,然后再n - LIS。 现在的问题在于删除一个数后怎么办呢? 本来求LIS是用dp记录长度为i的结尾的最小值, 现在加一...

c6376315qqso的专栏 289

codeforces 946 D Timetable(预处理+分组背包)

题目链接:http://codeforces.com/contest/946/problem/D思路:先预处理出每天去掉x节课能少去学校的时间,然后就变成了n组每组挑一个,容量大小为K的分组背包了。#include &lt;cstdio&gt; #include &lt;cstdlib&gt; #include &lt;cstring&gt; #include &lt;cmath&gt; #inc...

llmxby 995

CF1039E Summer Oenothera Exhibition

原题链接:http://codeforces.com/contest/1039/problem/E Summer Oenothera Exhibition While some people enjoy spending their time solving programming contests, Dina prefers taking beautiful pictures. As soon...

ShadyPi的IT笔记 604

【补题】Codeforces #507(Div1) AB

1039A. Timetable 构造题 正向模拟一遍,得出X数组必须单调不减且值大于等于下标。 当X[i]==X[i+1]时,B[i]可以构造为A[i+1]+t,否则B[i]为A[i+1]+t-1,即恰不能被后一项所使用。 最后需要检验B数组单调增,以及AB可以正向求解出X。 ll A[M],B[M],t; int X[M],n; int solve() { for(int i=...

秋叶红于二月花 581

2018.12.08 codeforces 946D. Timetable(背包)

传送门 题意简述:有一个人上n天课,每天有m个小时的时间安排表(一个01串),为1表示要上课,否则不上课,求出如果可以最多翘kkk节课这nnn天在校待的总时间的最小值(一天必须在所有课上完后才能离开)。 背包sbsbsb题。 注意可以从首尾分别逃课。 对于每天的上课情况我们都预处理出一个数组aia_iai​表示这天逃iii节课在校的最少时间。 然后...

weixin_30868855的博客 181

Transformer架构深度解析:从自注意力到多头机制

在深度学习中,序列建模一直面临并行化与长距离依赖的双重挑战。注意力机制的引入打破了传统循环网络的时序瓶颈,催生了以Transformer为代表的新一代架构。通过自注意力计算,模型能够直接建立任意位置间的联系,实现全局信息交互;多头注意力机制则进一步赋予模型多角度语义特征捕捉能力,配合位置编码、残差连接与层归一化,使深层网络稳定高效地训练。这一设计在机器翻译、文本生成、图像识别等多模态任务中展现出极强的通用性,成为大语言模型与多模态智能系统的核心基石。理解其几何形状变化、掩码细节与训练优化策略,是掌握预训练模

weixin_30861459的博客 411

Leetcode 946:验证栈序列(超详细的解法!!!)

给定 pushed 和 popped 两个序列,只有当它们可能是在最初空栈上进行的推入 push 和弹出 pop 操作序列的结果时,返回 true;否则,返回 false 。 示例 1: 输入:pushed = [1,2,3,4,5], popped = [4,5,3,2,1] 输出:true 解释:我们可以按以下顺序执行: push(1), push(2), push(3), push(4), ...

coordinate的博客 2612

Codeforces 1039A. Timetable

题目地址:http://codeforces.com/problemset/problem/1039/A 题目的关键在于理清楚思路,然后代码就比较容易写了 对于每一个位置的bus,即对于每一个i(i>=1 && i<=n) ,x[i]必然大于等于 i ,假设第 i 个车可以停在 x[i] 处,则对于j(j>i && j<=x[...

weixin_30567471的博客 208
上一篇: CF 887C Solution for Cuble 魔方,暴力
下一篇: CF 869C. The Intriguing Obsession 组合
orz11111111
博客等级 码龄9年 14粉丝 358原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值