北航第十二届程序设计竞赛现场决赛题解

【动态规划】北航程序设计竞赛决赛B题  决赛那天感觉确实没发挥好。本来有机会逃离三题大队的。结果中途很多人搞了几何构造题,忍不住跟风。事实证明以我的想象力果然搞不出来。还不如专心搞搞B这题。  B的题意很简单,给一个长度不超过5000的字符串,字符集大小不超过5000,求字典序第k小的子串(子串可以不连续),k规模不超过子串总数以及1E18。  先考虑每个字符都不同的情况,很容易想到一个一个把答案的字符定下来。我们每一次求出下一步接字... 阅读详情
第十二届北航程序设计竞赛初赛——勾肥大战题解 本题中假定了屠夫不会影响友方单位的肉钩,所以我们可以对每个己方屠夫单独考虑。对己方屠夫aa,敌方屠夫bb,如果aa能钩到bb,那么被钩的地方CC与a、ba、b初始位置A、BA、B会形成一个三角形ABC三角形ABC。 易得,AB=dis(A,B)AB = dis(A,B)。设出钩到被钩到的时间为tt、∠BAC=α\angle BAC = \alpha、dis(A,B)=ldis(A,B)=l,则AC 阅读详情

相关推荐

第七届北航程序设计大赛现场决赛解题报告

第七届北航程序设计大赛现场决赛解题报告,刷题加总结是最好的学习方法了

The 17-th Beihang University Collegiate Programming Contest (BCPC 2022) - Preliminary L.逃跑路线(思维/二分图)

The 17-th Beihang University Collegiate Programming Contest (BCPC 2022) - Preliminary L.逃跑路线(思维/二分图)

小衣同学的博客 775

H3C模拟器HCL防火墙路由模式主备配置实验

摘要:本文详细介绍了网络拓扑规划与设备配置方案。运营商仅提供一个接口地址,通过虚IP技术实现双防火墙高可用部署:主备防火墙分别配置10.20.10.1/29和10.20.10.2/29作为实际上联地址,共享10.10.10.2/24虚IP;下联配置172.168.10.0/24网段,核心交换机配置VLAN接口及192.168.10.1、192.168.20.1两个下联接口。文章包含运营商路由器、防火墙(HA配置、VVRP设置)和核心交换机的具体命令行配置步骤,并强调需进行主备切换验证。整个方案实现了单运营商

LQ的博客 1131

BCPC预赛2020

来随便做做,当作康复训练了 因为都是胡乱扫一眼题面就去做别的事情了 然后用一些零碎的时间想,因此数据范围常常看错 目前做了F,K,M F 一开始看上去非常不可做… 大力猜结论:一定先推完一个再推另外一个 然后被样例打没了 仔细看数据范围都是15 发现可以大力压箱子和人的位置,然后就没了O((nm)3)O((nm)^3)O((nm)3) K 一开始看上去非常不可做 想着枚举r,然后线段树维护每一个l的答案 然后发现并没有任何很好的性质 仔细看数据范围,a,b都小于20 开始大力考虑维护一个hih_ihi​,g

OZY的博客 770

基于docker进行安装部署seata,解决Seata的版本与Nacos的版本不匹配

本文分享了在Docker环境下部署Seata时遇到Nacos 3.x API不兼容问题的解决方案。由于Seata 2.0.0内置的nacos-client 1.4.2无法调用Nacos 3.x重构后的接口,导致注册失败。通过下载Seata 2.6.0源码自行构建Docker镜像,并调整启动方式(直接执行Java命令绕过Shell脚本),最终成功实现与Nacos 3.x的集成。关键步骤包括:创建自定义Dockerfile、配置application.yml、处理启动脚本兼容性问题,最终采用java直接运行方案

Dd52698的博客 422

5G核心技术:N3与N4接口深度解析

5G网络中,N3和N4接口是实现用户数据传输的核心。N3接口是gNB与UPF之间的用户面通道,采用GTP-U协议封装数据,通过UDP/IP传输,确保低时延和业务隔离。N4接口是SMF与UPF之间的控制面链路,基于PFCP协议下发转发规则(FAR/TDR/QER/URR),实现精细化流量控制。二者协同工作:N4下发策略(如QoS、计费规则),N3执行数据转发,共同支持5G三大场景(eMBB/uRLLC/mMTC),体现控制与转发分离(CUPS)架构优势。

Qinti_mm的博客 1643

第十三届北航程序设计竞赛预赛题解

以下题解由北航 2017-2018 赛季 ACM-ICPC 集训队金牌、银牌成员共同编写而成,比赛链接为 https://buaacoding.cn/contest-ng/index.html#/188。 A. 五角星 B. P5 题目大意 题目解法 线性复杂度 logloglog⁡log\log\log 复杂度 loglog\log 复杂度 数据构造 C. cgxj 的设计师 D....

skywalkert's space 5008

告别‘火龙’:实测BES2800/RK2108等主流芯片,聊聊AI眼镜的功耗与散热‘内卷’实战

本文深入探讨了AI智能眼镜在功耗与散热方面的挑战,重点分析了恒玄BES2800和瑞芯微RK2108等主控芯片的能效表现。通过实测数据和优化策略,揭示了在6nm工艺、异构计算和系统级散热方案下的实战经验,为AI眼镜的功耗管理提供了实用解决方案。

weixin_30839881的博客 968

第十二届北航程序设计竞赛决赛网络同步赛: 浪哥的烦恼

题目链接:https://biancheng.love/problem/587/index 题目描述 最近学校大检查,要求上课认真听讲,这让浪哥很是烦恼,因为这样他就不能上课刷题了。但经过不懈的观察,他发现领导检查是有一定的规律的。不妨把每层楼的教室看成一排,从 1 到 n 标号,领导每检查完一个教室,就会从相邻的一个或两个教室中选择一个继续检查,一个教室可能被检查不止一次。

sinat_35121480的博客 861

静态分析工具COBOT与Testbed对比

Testbed为规则检查工具的代表,市场占有量非常大,但随着时间的推移,大家从规则匹配转向了用静态分析工具检查Bug,所以规则检查型工具占有量比开始时候已经减少,但仍有一些比较落后的单位还在继续采购此类工具。3、通过对开源工程的测试,进行误漏报率的对比,发现COBOT(库博)的误漏报率相比Testbed较低,因COBOT主打国内市场,在众多军工单位进行大量试用及使用,吸取了众多单位的意见和建议,更加符合国内军工单位的使用习惯及测试要求。4、此外库博在功能上还可以进行计划任务,检测队列,检测并发的功能支持。

chengoodflower的博客 2072

动态博弈、威胁与承诺(博弈论入门学习笔记四)

0 动态博弈 动态博弈:行动有先后顺序,不同的参与人在不同时点行动,先行动者的选择影响后行动者的选择空间,后行动者可以观察到先行动者做了什么选择。例如下棋、消费者和商家讨价还价、谈婚论嫁、企业之间的价格战等等。 因此,为了做出最优的行动选择,每个参与人都应该思考:如果我如此选择,对方将如何应对?如果我是他,我将会如何行动?给定他的应对,什么是我的最优选择? 动态博弈中的战略:在博弈开始之前就...

stepho的博客 1万+

北航第十二届程序设计竞赛网络预赛题解

本次比赛共有 401 个用户通过至少一道题目,平均通过 3 题,第一位做出全部题目的同学用时 45:26:37 。如果有对题目的疑问或是见解,欢迎寄刀片给出题人。预祝大家在决赛中取得好成绩!

skywalkert's space 2638

缠中说禅交易指南

战胜市场,其实就是战胜自己的贪婪、恐惧、愚蠢,缠中说禅技术分析理论只是把市场拔光给各位看,而拔光一个人并不意味着就等于征服一个人,对于市场,其道理是一样的。不干,不可能征服市场。对于市场来说,干就是一切。技术分析的最终意义不是去预测市场要干什么,而是分析市场正在干什么,是一种当下的直观。在市场上所有的错误都是离开了这当下的直观,用想象、用情绪来代替。 市场是有规律的,但市场的规律并不是显而易见的,是需要严格的分析才能得到。更重要的是,市场的规律是一种动态的,在不同级别合力作用下显示出来的规律,企图用些单纯的

baidu_25764509的博客 2万+

第十二届北航程序设计竞赛预赛

https://biancheng.love/contest-ng/index.html#/123/problems 题目链接 A、C看懂题意就好了。 G题,贪心,最大的数肯定要越高位越好,所以尽量放1,剩3就放7,次大就调过来。特判下4没了。 D题,求出每个点需要推到的概率然后加起来。 M题,贪心可得,大乘小对应起来,然后求次数,就用类似求一个个环,假如不对应的环就需要环内点个数-1次...

weixin_30319097的博客 89

[nlp] 自然语言理解基准 ATIS Snips

ATIS 4k 21 Intents(not include UNK) 120 SlotsSNIPS 13k 7 Intents(not include UNK) 72 SlotsATIS Benchmark (Intent Detection) | Papers With CodeSNIPS Benchmark (Intent Detection) | Papers With Code

心宝的博客 753

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

第十二届北航程序设计竞赛决赛网络同步赛 J题 两点之间

题目链接 Problem J 这道题思路还是很直观的,但是有两个难点: 1、题目中说$1<=NM<=10^{6}$,但没具体说明$N$和$M$的值,也就是可能出现: $N = 1, M = 1000000$ 这样的数据。 2、对每个查询的分类讨论。 #include <bits/stdc++.h> using name...

weixin_30487201的博客 131

IMSL CNL 7.0.0 (x86-64)Crack

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

第十二届北航程序设计竞赛决赛网络同步赛 B题 前前前世(数论推导 + DP)

题目链接 2016 BUAA-Final Problem B 考虑一对可行的点$(x, y)$ 根据题意,设$x = ak + 1,y = bk + 1$ 又因为$x$是$y$的祖先的祖先的祖先,所以$y = 8x + d, 0 <= d <= 7$; 那么代入到之前的那个式子    $y = 8x + d$    $= 8(ak + 1) + d = 8a...

weixin_30817749的博客 151

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

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

第十四届北航程序设计竞赛预赛题解(非官方)

 最近沙河好多人生病了,我也不能幸免,今天终于舒服了。补一补上周的老坑吧。  接下来尽量每天刷题。另外要加油学习汇编语言,优化我们的密码学竞赛程序。 官方题解参见:http://clatisus.com/BCPC2018_qualification_round A 两等分的Alice https://buaacoding.cn/problem/1914/index  非常容易设计出粗暴的dp。考虑...

BUAA_Alchemist的博客 1007

第十四届“商汤杯”北航程序设计竞赛

layout: post title: 第十四届“商汤杯”北航程序设计竞赛 author: "luowentaoaa" catalog: true mathjax: true tags: 数学 矩阵快速幂 权值线段树 B 升级超梦 (dfs) 思路 题目比较简单,每一回合只有两个情况 要么用经验 要么用糖果 所以我们直接搜索一下n个糖果和m个exp的情况 即\(dp[n][exp]=max...

weixin_30617695的博客 301

H. (网预)The land of LandLord 第十一届北京邮电大学程序设计竞赛 - 热身赛 (1)

时间限制 1000 ms 内存限制 65536 KB 题目描述 Currently the world knows a great number of sensational archaeological discoveries. Data storage devices relating to the period of programming of the XX century

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

L2-1 榜单 (25 分)

Bear_2 在青青草原创办了第一届 BCPC 包含 k 道题,共有 n 支队伍参加比赛,共提交了 m 次。他想根据以下规则对队伍进行排名。 1.过题数多的队伍优先 2.在过题数相同的情况下,罚时越少的优先 3.在过题数和罚时都相同的情况下,队伍编号小的优先。 注:一道题目正确通过时,总罚时要加上正确通过的时候,再加上之前对这道题错误提交(没有通过所有测试数据的提交)的次数∗20min 。总罚时即为正确通过每道题目的时间和加上正确通过题目的错误提交罚时。 举例:假设 X 队通过 K 题,每道题第一次正确提交

CoderJiang 438

2021年北航九月推免机考+面试经验分享

2021年北航九月推免机考+面试经验分享 我参加了2020.10.11-10.12的北航推免 面试和机考都高分通过 准备 机考 北航机考要求c/c++编程,采用标准库,今年也破天荒的可以使用STL(但事实证明出的题目好像没什么需要STL的emmmm) 编译环境要求: C语言程序使用 ISO C11 标准来编译程序,gcc版本为gcc(GCC)4.8.5 20150623(Red Hat4.8.5-36); **C++**语言使用 2011 ISO C++ 作为标准来编译程序,g++版本为g++(GCC)4.

qq_21515253的博客 8649

PC--VS--AC/SDK--版本--BC

PC--VS--AC/SDK--版本--BC PC           VS            AC/SDK                        版本                                        BC ---------------------------------------------------------------------

csdn_wuwt的博客 314

已逝的北航OnlineJudge

转载于:https://my.oschina.net/tsingxu/blog/80491

348

北航OJ刷题

文章目录题目1:D&amp;amp;amp;amp;C--玲珑数题面输入输出输入样例输出样例解题思路代码结语 题目1:D&amp;amp;amp;amp;C–玲珑数题面 Bamboo听说知道了正确的玲珑数,就能开启玲珑阵,穿越时空,然后解锁一个满分玛丽苏cp…… 于是决定停止幻想,现在就去算玲珑数。 玲珑数是什么呢? 在数列中任意两个数a[i],a[j],如果i&amp;amp;amp;lt;j且a[i]&amp;amp;amp;gt;2*a[j],那么a[i]和a[j]就构

weixin_39382874的博客 2920

Regional 2015 - Asia EC Final - C Suffixes and Palindromes

题目:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=719&page=show_problem&problem=5524 题意:你需要根据后缀数组和manacher的信息来重建一个长度为N的字符串s,字符串只能包含小写字母,输出字典序最小的解

skywalkert's space 3368
上一篇: 北航第十二届程序设计竞赛网络预赛题解
下一篇: 51nod 1575 Gcd and Lcm
skywalkert
博客等级 码龄12年 766粉丝 77原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值