3.12
bzoj1051 受欢迎的牛
1. Tarjan缩点
2. 对于唯一一个出度为0的分量,答案为分量的权值(原图中点数);若有多个出度为0的分量,答案为零(不互指)。
假装自己没有把时间戳写成dfs树深度(
墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
200+累计阅读
224平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄10年
bzoj1051 受欢迎的牛
1. Tarjan缩点
2. 对于唯一一个出度为0的分量,答案为分量的权值(原图中点数);若有多个出度为0的分量,答案为零(不互指)。
假装自己没有把时间戳写成dfs树深度(
Zynq工程IP核封装:XCI引用与约束继承实战指南
IP核封装是FPGA系统设计中实现模块复用、团队协作与技术资产沉淀的关键环节。其本质是将功能逻辑、时序约束、接口协议和硬件配置统一抽象为可配置、可验证、可演进的标准化组件。核心原理在于通过XCI文件保留IP核的参数化定义能力,依托Vivado IP Packager实现约束继承、端口自动映射与时钟域解耦,从而保障跨项目集成的时序可信性与约束完备性。该技术广泛应用于Zynq SoC视频处理、高速接口(如HDMI/TMDS)、多时钟域控制系统等场景,尤其在需要长期维护与版本迭代的工业级嵌入式开发中具有不可替代的
bzoj题目总结
仓库
ROS牛耕法全覆盖规划:从算法原理到清洁机器人实战解析
本文深入解析ROS牛耕法全覆盖规划算法在清洁机器人中的应用,从算法原理到实战优化技巧全面覆盖。详细介绍了地图预处理、区域分解和路径优化等关键步骤,并分享实际案例中的解决方案,帮助开发者提升机器人清扫效率和覆盖率。
bzoj 4952: [Wf2017]Need for Speed(二分)
4952: [Wf2017]Need for Speed Time Limit: 1 Sec Memory Limit: 1024 MBSec Special Judge Submit: 231 Solved: 101 [Submit][Status][Discuss] Description Sheila 是一名学生,她开着一辆经典的学生车:一辆又老,又慢,又锈,还老是崩坏的
揭秘大型语言模型:从神经元到思维透明的奇妙旅程
这篇博客带你走进大型语言模型的内部世界,从神经元的小任务,到功能向量的团队合作,再到层间的协作和思维的透明化。掌握这些知识,能让你在开发中更高效地优化AI,在研究中更深入地探索模型的奥秘。建议多动手实践,把这些理论变成自己的能力!
告别手绘!用Aseprite+Unity Tilemap,从AI生成到2D游戏地图的保姆级搭建流程
本文详细介绍了如何利用Aseprite和Unity Tilemap从AI生成素材到搭建2D游戏地图的完整流程。涵盖AI生成素材的预处理、图层管理、动画制作,以及Unity中的Tilemap系统配置和性能优化技巧,帮助开发者高效创建像素风游戏地图。
cf 1A Theatre Square
在刷完十多道CF A,B题水题后 ,便迫不及待的开始写下我的第一篇博客,以此来纪念我ACM的开始 。纯小白,代码有很多不足之处,希望大家指教。也希望我的解题报告可以对大家有那么一点点的帮助。1,CodeForces 1ATheatre Square 点击此处打开链接题意:有一块n*m的面积需要你用a*a的砖将之铺满 砖可以重叠,求最少的砖的数量思路:将n和m分开来看待即可,将面积问题装换为...
Ubuntu环境下rknn-toolkit2的安装与兼容性解析
本文详细解析了在Ubuntu系统上安装瑞芯微rknn-toolkit2工具链的完整流程与关键注意事项。文章重点剖析了rknn-toolkit2与旧版rknn-toolkit的核心兼容性问题,强调两者在API、模型格式及运行时库上互不兼容,并推荐使用Conda虚拟环境进行隔离管理,为RK3566、RK3588等开发板的AI模型部署提供清晰的实践指南。
BZOJ 100题留念
转载于:https://www.cnblogs.com/JSZX11556/p/4561794.html
OrangePi Kunpeng Pro 安装 ROS2 + Gazebo
OrangePi Kunpeng Pro 的优点很明显,内置openEuler,配备PD电源,做到开箱即用;板子设计也不错,风扇噪音不大,散热良好,昇腾芯片又确保小板子的性能,接口丰富是这类板子共同的优点,也很好的继承了下来,甚至还可以外接固态,可靠性大大提升。使用起来,哪怕不用openEuler的话,也可以很方便的刷Ubuntu来实现一些需要依赖的开发工作,这次没有跑AI模型,所以对算力的优势还没有很明显的感受,下次可以试一下yolo跑跑看。
Android 系统低内存lowmemorykiller关于阈值修改 minfreeAbsKbytes优化
在系统rom定制化开发中,在对于运行内存ram 1G和2G的设备中,对于内存使用高峰期时,minfreeAbsKbytes优化很关键 调整合理的minfree,让内存合理的使用很关键,接下来分析相关功能的实现
bzoj 3265
水水模板题 #include <bits/stdc++.h> const int N = 2e5 + 10; struct Node { int x, y, z, ans, id; bool operator == (Node a) { return x == a.x && y == a.y && ...
BVH2SMPL 实战笔记
BVH2SMPL 实战笔记
数论与数学专题练习(一)(201802~201805)
上次打cf的时候一道水水的数论题(强推式子)都没有做出来,于是决定开始数论专题练习。 以后将不断进行update. 刷题记录 UPD1. T1. (20180214) AC codeforces 933B http://codeforces.com/problemset/problem/933/B 题解: 略 UPD2. T2. (20180223) AC bzoj 2956 h...
Statistics and Machine Learning Toolbox
Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具
精雕软件(JDpaint) 5.5 绿色版
精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版
KD-Tree一系列模板题
kd树模板题刷题记录
lwip-2.0.3
lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。
bzoj2150【二分图匹配】
水水水。。裸最小路径覆盖。。我为何这么水。#include <cstdio> #include <cstring> using namespace std; int dx[5],dy[5]; int n,m,r,c,sz; bool a[55][55]; struct edge { int v,next; }e[10010]; int cnt,head[5010];...
深度学习工具包 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');```[](https://bitdeli.com/free "Bitdeli Badge")
BZOJ 3172 [Tjoi2013]单词 AC自动机 模板题
Description 某人读论文,一篇论文是由许多单词组成。但他发现一个单词会在论文中出现很多次,现在想知道每个单词分别在论文中出现多少次。 Input 第一个一个整数N,表示有多少个单词,接下来N行每行一个单词。每个单词由小写字母组成,N Output 输出N个整数,第i行的数字表示第i个单词在文章中出现了多少次。 Sample Input 3 a
【BZOJ2460】【Beijing2011】元素 线性基
思想都在我的这篇博客里面。 呃,那道题懂差不多之后随便水水这道题就过了。 #include #include #include #include #define N 1010 using namespace std; struct KSD { long long a; int b; bool operator d.a:b>d.b;} }x[N]; long long ins[70
bzoj3343 分块
水水分块,参考:hzwer 的#include<bits/stdc++.h>using namespace std; #define MP make_pair #define N 105 #define LL long long #define pb push_back #define fi first #define se second #define pii pair<int, int> #de
BZOJ3930 【CQOI2015】选数
感觉水水的一道题。 网上说什么mobius反演,但是感觉很麻烦,然后就感觉可以容斥乱搞,后来发现不用容斥。 如果我们用f[i]表示gcd刚好为k*i的选数方案,那么f[1]就是答案,然后我们就for i = 100000 to 1,从大往小算。 对于每一个i,先算在这个区间里面有多少个k*i的倍数,然后N次方之。 这就是gcd至少为k*i的方案数 然后减去f[i*j] j = 1,2,3…
BZOJ 3504 CQOI 危桥
3504: [Cqoi2014]危桥 Time Limit:10 SecMemory Limit:128 MBSubmit:1882Solved:951[Submit][Status][Discuss] Description Alice和Bob居住在一个由N座岛屿组成的国家,岛屿被编号为0到N-1。某些岛屿之间有桥相连,桥上的道路是双向的,但一次只能供一人...
BZOJ2809(Apio2012)[dispatching]--左偏树
bzoj2809
【BZOJ3627】【JLOI2014】路径规划 分层图
你说你会分层图了?那好吧,二维的呢?
【BZOJ】【4034】【HAOI2015】T2
树链剖分/dfs序 树上单点修改+子树修改+链查询 其实用dfs序做也可以…… 其实树链剖分就是一个特殊的dfs序嘛= =所以树链剖分也可以搞子树~(Orz ZYF) 至于为什么……你看在做剖分的时候不也是dfs下去的?然后只不过是先走重儿子,但本质上也是一个dfs序,所以dfs序能搞的子树操作,链剖也是兹瓷的~ 然后随便水水就过了…… WA了一发:查询从x...
BZOJ1003_物流运输_KEY
题目传送门 这是一道DP+最短路径的好题。 首先预处理每天每个点的最短路径。 用SPFA进行处理。即cost[i][j]为第i天到底j天的1到M点的最小花费。 就可以水水的DP。 设f[i]为第i天的最优方案,f[i]=min(f[i],f[j]+cost[j+1][i]*(i-j)+K); 即从第j天之后开始改变航线。 code: /****************...
123
598
843
1283

被折叠的 条评论
为什么被折叠?



