bzoj 3630 [JLOI2014]镜面通道 计算几何 网络流

YOLOv5与DeepSeek在智能果园监测中的应用实践 计算机视觉技术在农业领域的应用正逐步改变传统生产模式,其中目标检测算法作为核心基础技术,通过特征提取与模式识别实现自动化监测。YOLOv5作为轻量高效的检测框架,结合注意力机制与特征融合优化,能有效解决果园环境中的小目标检测难题。DeepSeek数据分析模块则利用时序建模技术,将离散检测结果转化为可操作的农事建议。这种AI+农业的解决方案在实际部署中展现出显著价值,陕西某苹果种植基地的应用案例表明,系统可实现91.3%的病虫害识别准确率,同时降低23%的农药使用量。关键技术组合特别适用于经济作物的精准管理场 阅读详情

只要上下边界不连通就可以。
然后两个图形相交就连边,拆点跑网络流就行了。
判相交比较麻烦(抑或是我写得麻烦)

#include <bits/stdc++.h>
using namespace std;
#define N 310
#define inf 1e9
#define eps 1e-8
#define M 1100000
int n,X,Y,c1,c2,cnt,S,T,tot,ans;
int pos[N][2],head[N<<1],nex[M],to[M],val[M],deep[N<<1];
queue<int>q;
void add(int x,int y,int v)
{
    tot++;
    nex[tot]=head[x];head[x]=tot;
    to[tot]=y;val[tot]=v;
}
void ade(int x,int y,int v)
{add(x,y,v);add(y,x,0);}
void ad(int x,int y)
{
    ade(pos[x][1],pos[y][0],inf);
    ade(pos[y][1],pos[x][0],inf);
}
struct poi
{
    double x,y;
    poi(){}
    poi(double x,double y):x(x),y(y){}
    friend poi operator - (const poi &r1,const poi &r2)
    {return poi(r1.x-r2.x,r1.y-r2.y);}
    friend poi operator + (const poi &r1,const poi &r2)
    {return poi(r1.x+r2.x,r1.y+r2.y);}
    friend bool operator == (const poi &r1,const poi &r2)
    {return fabs(r1.x-r2.x)<eps&&fabs(r1.y-r2.y)<eps;}
    friend poi operator * (double x,const poi &r1)
    {return poi(x*r1.x,x*r1.y);}
    friend double operator * (const poi &r1,const poi &r2)
    {return r1.x*r2.x+r1.y*r2.y;}
    friend double operator ^ (const poi &r1,const poi &r2)
    {return r1.x*r2.y-r2.x*r1.y;}
};
struct line
{
    poi p,v;
    line(){}
    line(poi p,poi v):p(p),v(v){}
};
struct circle
{
    poi p;double r;int num;
    void read()
    {
        scanf("%lf%lf%lf",&p.x,&p.y,&r);
        if(p.y<=r+eps)ade(S,pos[num][0],inf);
        if(p.y+r+eps>=Y)ade(pos[num][1],T,inf);
    }
}a[N];
struct polygon
{
    poi p[6];int num;
    void read()
    {
        scanf("%lf%lf%lf%lf",&p[2].x,&p[2].y,&p[4].x,&p[4].y);
        p[1]=poi(p[2].x,p[4].y);
        p[3]=poi(p[4].x,p[2].y);
        if(p[2].y<=eps)ade(S,pos[num][0],inf);
        if(p[1].y+eps>=Y)ade(pos[num][1],T,inf);
        p[5]=p[1];
    }
    int ins(poi p1)
    {return p1.x>p[1].x&&p1.x<p[4].x&&p1.y>p[2].y&&p1.y<p[1].y;}
}b[N];
poi intersect(line l1,line l2)
{
    poi u=l1.p-l2.p;
    double tmp=(u^l2.v)/(l2.v^l1.v);
    return l1.p+tmp*l1.v;
}
double dis(poi p1,poi p2)
{return sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));}
int check(circle c1,poi p1,poi p2)
{
    line l1=line(p1,p1-p2);
    poi p=intersect(l1,line(c1.p,poi(-l1.v.y,l1.v.x)));
    if(dis(c1.p,p)>c1.r+eps)return 0;
    if(p==c1.p&&(p-p1)*(p-p2)>eps)return 0;
    if((((c1.p-p1)^(c1.p-p))<0)^(((c1.p-p)^(c1.p-p2))<0))
        return 0;
    return 1;
}
int intersect(circle c1,circle c2)
{return dis(c1.p,c2.p)<c1.r+c2.r+eps;}
int intersect(polygon p1,polygon p2)
{
    if(p1.p[1].x>p2.p[4].x||p2.p[1].x>p1.p[4].x)return 0;
    if(p1.p[1].y<p2.p[2].y||p2.p[1].y<p1.p[2].y)return 0;
    return 1;
}
int intersect(circle c1,polygon p1)
{
    if(p1.ins(c1.p))return 1;
    for(int i=1;i<=4;i++)
        if(dis(c1.p,p1.p[i])<c1.r+eps)return 1;
    for(int i=1;i<=4;i++)
        if(check(c1,p1.p[i],p1.p[i+1]))
            return 1;
    return 0;
}
int dfs(int x,int mv)
{
    if(x==T)return mv;
    int tmp=0;
    for(int i=head[x];i;i=nex[i])
        if(val[i]&&deep[to[i]]==deep[x]+1)
        {
            int t=dfs(to[i],min(mv-tmp,val[i]));
            if(!t)deep[to[i]]=-1;
            tmp+=t;
            val[i]-=t;val[i^1]+=t;
            if(tmp==mv)break;
        }
    return tmp;
}
int bfs()
{
    while(!q.empty())q.pop();
    memset(deep,-1,sizeof(deep));
    q.push(S);deep[S]=0;
    while(!q.empty())
    {
        int t=q.front();q.pop();
        for(int i=head[t];i;i=nex[i])
            if(val[i]&&deep[to[i]]==-1)
            {
                deep[to[i]]=deep[t]+1;
                q.push(to[i]);
                if(to[i]==T)return 1;
            }
    }
    return 0;
}
int main()
{
    tot=1;
    scanf("%d%d%d",&X,&Y,&n);
    for(int i=1;i<=n;i++)
    {
        pos[i][0]=++cnt,pos[i][1]=++cnt;
        ade(pos[i][0],pos[i][1],1);
    }
    S=++cnt;T=++cnt;
    for(int i=1,tp;i<=n;i++)
    {
        scanf("%d",&tp);
        if(tp==1)
            {a[++c1].num=i;a[c1].read();}
        else{b[++c2].num=i;b[c2].read();}
    }
    for(int i=1;i<=c1;i++)
        for(int j=i+1;j<=c1;j++)
            if(intersect(a[i],a[j]))
                ad(a[i].num,a[j].num);

    for(int i=1;i<=c2;i++)
        for(int j=i+1;j<=c2;j++)
            if(intersect(b[i],b[j]))
                ad(b[i].num,b[j].num);

    for(int i=1;i<=c1;i++)
        for(int j=1;j<=c2;j++)
            if(intersect(a[i],b[j]))
                ad(a[i].num,b[j].num);

    while(bfs())
        ans+=dfs(S,inf);
    printf("%d\n",ans);
    return 0;
}
RTX 4060笔记本也能跑!保姆级教程:用Ollama在Windows上部署DeepSeek-R1-8B模型 本文详细介绍了如何在RTX 4060笔记本上通过Ollama本地部署DeepSeek-R1-8B模型,提供从环境配置到性能调优的全流程优化指南。针对笔记本用户的显存、散热等问题,给出了量化模型选择、启动参数优化及散热解决方案,帮助用户在消费级硬件上高效运行大语言模型。 阅读详情

相关推荐

CentOS 环境 sngrep 安装及使用

在呼叫中心类应用开发过程中,经常需要对 SIP 信令抓包,分析排查问题。通常抓包的工具非常多样,如 Wireshark、tcpdump、ngrep 等都是可选项,但是针对 SIP 信令的抓包,sngrep 则更为好用。因为 sngrep 不仅提供了图形界面,还会将一通会话的 SIP 信令关联汇总,非常直观执行以下命令下载 的相关依赖库 1.2 添加 sngrep 的源并导入 执行下面的命令新增一个源仓库配置文件 然后在该文件中写入以下配置内容 执行命令导入源仓库的公钥 1.3 安装 sngrep

谈谈1974 8149

BZOJ3630: [JLOI2014]镜面通道 最小割

3630: [JLOI2014]镜面通道 Time Limit: 10 Sec  Memory Limit: 128 MB Submit: 467  Solved: 162 [Submit][Status][Discuss] Description 在一个二维平面上,有一个镜面通道,由镜面AC,BD组成,AC,BD长度相等,且都平行于x轴,B位于(0,0)。通道中有n个外表面为镜

Oakley 828

K8S证书过期解决办法之替换证书

k8s证书过期解决方案之替换证书

q_hsolucky的博客 1万+

bzoj3630: [JLOI2014]镜面通道

bzoj3630: [JLOI2014]镜面通道 题意: n(<=300)个圆形或矩形光学元件组成一个镜面通道,求使光能够从一端射到另一端所需要去除的光学元件最小数目。 题解 这题好妙啊……。听讲的时候一脸懵,原来还能这样的嘛…… 说是有一个类似【水能流过的地方,光也能经过】的定理。好感性啊( 再感性一点地说,光学元件中间要有空隙。 再再感性一点地说,上下两个镜面不能由光学元件连通。

蒟蒻名曰Starria 855

YOLOv8实战教程:从模型训练到改进的全流程指南

回顾这段YOLOv8的实战历程,从最初的模型训练到后来的各种改进尝试,我深刻体会到目标检测技术的魅力与挑战。YOLOv8作为一款优秀的框架,不仅易用性强,而且具备很强的可扩展性,让我能在其基础上不断创新。未来,我计划在以下几个方向继续探索:一是将YOLOv8与多模态技术结合,尝试实现图像与文本的联合目标检测;二是深入研究自监督学习在YOLOv8中的应用,减少对标注数据的依赖;三是探索YOLOv8在更广泛场景的部署,如机器人、自动驾驶等。

LXY_LOVE36的博客 281

史上最全工商银行核心系统建设历程:从“数据集中”到“ECOS”2.0,见证银行业信息科技跨时代发展征程

ECOS工程的直接成果是建成了工商银行第五代信息系统,即从单一核心银行系统到去核心化开放生态系统,率先开启了以智能化、开放化为特征,数据驱动引领经营模式变革,创新提出了一整套国际领先的分布式开放生态银行系统建设方案,在大型银行全分布式系统架构、主机下移、银行系统生态化转型、大规模交易型分布式数据库等多个领域再次实现“0到1”的突破,建成了具备国际领先水平的全分布式开放生态银行系统,继续勇立数字化转型潮头,推动高质量发展再上新台阶。工商银行的业务连续性管理水平实现了跨越式发展,有力地保障了业务发展。

银行信息系统应用架构详解 827

BZOJ 3630 JLOI2014 镜面通道 计算几何+最小点割集

题目大意:给定一个二维的通道,通道内有一些正方形和圆形的零件(允许重叠),求最少删掉多少零件可以使光线通过反射通过这个通道 看到这题当时我们都吓得说日语了有木有啊!これはいったい何ですか?!計算幾何ですか?圖論ですか?やれますか?全然知らないあああああ! 我在第一第二题上耽误了太长的时间 导致第三题没时间了(第二题还没看到多组数据爆零了 令人感动不已) 最后读入全体数据后加和再加上我的生日然后

世界 2587

SIMULINK开发项目实例 1000 例专栏之第912例--AC-DC整流器场景:基于PWM整流器拓扑结构的建模:三相电压型PWM整流器(SR)单位功率因数控制仿真

本文详细介绍了使用Simulink和Simscape Electrical搭建三相电压型PWM整流器(VSR)模型的方法。主要内容包括:系统结构设计、主电路拓扑搭建、单位功率因数控制算法实现(含PLL锁相环、dq变换、PI控制器等模块)、参数配置和仿真设置。通过仿真分析验证了该系统能实现输入电流与电压同相位、输出直流电压稳定等特性,体现了PWM整流器的高效性和低谐波优势。文章还提出了增强鲁棒性、多工况测试等优化建议,为电力电子系统设计提供了实用指导。该建模方法对新能源发电、电动汽车充电等领域具有重要意义。

xiaoheshang_123的博客 7798

HDU 4380 Farmer Greedy 计算几何+bitset

枚举直线,对于直线的某个点在直线的左端还是右端,可以状压出一个数,用bitset记录。 然后三角形就是3个bitset&一下 #include #include #include #include using namespace std; typedef long long ll; const int N = 101; const int M = 1005; bitset b1

九野的博客 1408

013 PID参数整定:Ziegler-Nichols法

几年前在调试一台伺服压机,客户要求位置精度±0.01mm,响应时间小于50ms。我按照教科书上的经验值设了P=1.5,I=0.02,D=0.01,结果电机一启动就开始尖叫,位置超调直接干到0.3mm,然后开始震荡,像极了喝醉的舞者。现场工程师看我的眼神,就像在看一个刚毕业的实习生。那次之后我明白了一个道理:PID参数不是靠猜的,也不是靠经验公式硬套的。你需要一个系统的方法,而Ziegler-Nichols法就是那个让你从“瞎调”走向“有章可循”的起点。

m0_50546716的博客 101

实测可复现|2026 Cloudflare盾v4.0反反爬全实战:从JS/WASM逆向到JA3指纹伪装,手把手突破拦截(附完整逆向代码+避坑手册)

本文以2026年Cloudflare盾v4.0(集成Shield Synapse v2.0)为核心,全程以实战复盘为视角,拆解了从JS/WASM混合逆向、全维度指纹伪装(JA3+浏览器指纹)、人类行为模拟,到代理池搭建的全流程,整合了完整可复现的代码,所有步骤和踩坑点均为实测所得,无任何AI套话,新手也能跟着复现,最终实现爬取成功率从12%提升至95%+。

专注于Python爬虫开发,分享爬虫技巧、项目实战与反爬经验,使用Scrapy、BeautifulSoup等工具,解决数据抓取难题。 1690

bzoj3630 [JLOI2014]镜面通道

3630: [JLOI2014]镜面通道 Time Limit: 10 Sec Memory Limit: 128 MB Submit: 574 Solved: 214 [Submit][Status][Discuss] Description 在一个二维平面上,有一个镜面通道,由镜面AC,BD组成,AC,BD长度相等,且都平行于x轴,B位于(0,0)。通道中有n个外表面为镜面的光学

thewalker88的博客 537

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

[bzoj3630][JLOI2014]镜面通道_计算几何_网络流_最小割

镜面通道 bzoj-3630 JLOI-2014 题目大意:题目链接。 注释:略。 想法: 我们发现,只要上下界没有被完全封死,我们就一定有一条合法的光路。 所以只需要将上界和下界拆开即可。 拆点,把每个点分为入点和出点,入点向出点连1的边。 元件之间如果连通就连$inf$。 和上界连通就对源点连$inf$,和下界连通就和汇点连$inf$。 最后求最小割即为答案。 Code...

weixin_30883271的博客 75

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

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

BZOJ 3630: [JLOI2014]镜面通道 (网络流 +计算几何)

水能流过的地方光都能达到 呵呵.jpg 那就是裸的最小割(割开上边界和下边界)了… 判矩形和圆相交的时候就用圆心对矩形求一次点到矩形的最近距离(类似KD树的预估函数). CODE #include <vector> #include <cstdio> #include <cstring> #include <algorithm> using na...

Ark 243

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...

【bzoj3630】[JLOI2014]镜面通道 对偶图+计算几何+网络流最小割

题目描述 在一个二维平面上,有一个镜面通道,由镜面AC,BD组成,AC,BD长度相等,且都平行于x轴,B位于(0,0)。通道中有n个外表面为镜面的光学元件,光学元件α为圆形,光学元件β为矩形(这些元件可以与其他元件和通道有交集,具体看下图)。光线可以在AB上任一点以任意角度射入通道,光线不会发生削弱。当出现元件与元件,元件和通道刚好接触的情况视为光线无法透过(比如两圆相切)。现在给出通...

weixin_30414305的博客 118

BZOJ3630: [JLOI2014]镜面通道

BZOJ3630: [JLOI2014]镜面通道 https://lydsy.com/JudgeOnline/problem.php?id=3630 分析: 拆点,相交则连边\(inf\),求最小割既是答案。 圆圆交 : 求圆点距离即可 矩矩交 : 考虑补集,就是不相交的情况,一定有四种大小关系发生(如代码) 圆矩交 : 很坑,先判直接相交,即圆心到边的距离小于等于半径。 再判矩形包含...

147

BZOJ3630

3630: [JLOI2014]镜面通道 Time Limit: 10 Sec  Memory Limit: 128 MB Submit: 478  Solved: 166 [Submit][Status][Discuss] Description 在一个二维平面上,有一个镜面通道,由镜面AC,BD组成,AC,BD长度相等,且都平行于x轴,B位于(0,0)。通道中有n个外表面为镜面的

CDQZOIERS的博客 593

【BZOJ3630】镜面通道(JLOI2014)-最小割+计算几何

测试地址:镜面通道 做法:本题需要用到最小割+计算几何。 首先根据一个神奇的物理学定理:水能通过的地方,光就能通过,所以我们要求的就是AB和CD所属的平面区域连通,继而就是求上边界和下边界不能通过元件连通。因此我们在连通的两个元件之间连边,要求至少要去掉多少个点使得两个点不连通,我们发现这就是一个最小割,然而是对于点的最小割。对此我们把一个点拆成两个点,分为入点和出点,并将所有涉及该点的入边连...

Maxwei_wzj的OI世界 294

总结[1.4~1.18]

水题啊~~

_Horizon 607

BZOJ2640 可见区域 [计算几何+平衡树]

题目链接 题意:给定nnn条互不相交的线段,从原点向四周看,视线遇到线段会被挡住。求此时能看到的视野范围,以及分别删除一条和两条线段后能看到最大的视野范围。 n≤50,000n\le 50,000n≤50,000 题解 CY拉我做题啦啦啦…… 考虑用循环扫描线(就是从原点开始绕360度的扫描线)。维护每个时刻所有线段对应的位置关系,也就是说所有时刻所有线段按在扫描线上到原点距离从小到大排序。由于线...

WAautomaton的博客 357

【bzoj 3630】: [JLOI2014]镜面通道

http://www.lydsy.com/JudgeOnline/problem.php?id=3630 打死我也没想到一直wa的原因是S和T的编号设错了。。。。。!!!!! //#define _TEST _TEST #include #include #include #include #include #include using namespace st

willinglive 1116

BZOJ3630 : [JLOI2014]镜面通道

从左边不能到达右边当且仅当存在一条与上下底边相连的分割线将它们分开 设下底边为S,上底边为T,每个元件作为点,有公共部分的两个点互相连边 最后拆点求最小割   #include&lt;cstdio&gt; #include&lt;cmath&gt; #include&lt;algorithm&gt; using namespace std; const int N=620,in...

weixin_34365635的博客 129
上一篇: 3551 [ONTAK2010]Peaks加强版 kruskal重构树 可持久化线段树
下一篇: bzoj 4562 [NOI2016]循环之美 莫比乌斯反演
make_it_for_good
博客等级 码龄11年 13粉丝 183原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值