22/7/2012 ICPC培训 第七天

YOLOv11改进 | 注意力篇 | YOLOv11引入24年ECCV的自调制特征聚合注意力模块(SMFA),并构建C2PSA_SMFA 1.SMFA介绍1.1 摘要:基于Transformer的图像复原方法由于Transformer的自注意(self-attention,SA)特性能够更好地挖掘非局部信息,从而获得更好的高分辨率图像重建效果,因此具有重要的应用价值。然而,关键点积SA需要大量的计算资源,这限制了其在低功耗器件中的应用。此外,模拟退火机制的低通特性限制了其捕获局部细节的能力,从而导致平滑的重建结果。 阅读详情

又来吐糟了啦。。。

今天照样刷出来的题不多大哭。勉强也只能算个三题半吧!

 

上午在做上次比赛的B题。

要用数据结构,vector和deque。也第一次感受到了数据结构的魅力,的确把时间复杂度优化的很好。

按照出题者的思路写出了代码,TLE了。结果你懂得,各种纠结,再也想不到如何优化了。。。

然后,就在刚才,把出题人-—唐爽童鞋的代码拿来,居然也TLE了惊恐。神马情况。

 

快到中午,眼看没A题。唉,退而求其次,A一水题吧。

HDU2289,求圆台的高。

主要就是根据性质求出高和半径的关系。然后根据圆台体积公式得到体积和高的关系。最后就是二分

解方程了。坑爹的是这题要求的精度很高、pi不取好也很难A。。。

代码:

#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;

const double pi=3.1415926535897931;
const double accurate=1e-7;

double r,R,H,V,h;

double calculate(double x)
{
    return pi*x*(r*r+pow(r+(R-r)/H*x,2)+r*(r+(R-r)/H*x))/3.0;
}

void binSearch(double low,double high)
{
    double mid=(low+high)*1.0/2.0;
    
    if(high-low<=accurate)  //这句没加,超时了几次,二分查找对出口一定得判断好 
    {                       //但理论上我认为这是不对的,根本就没有逼近V,只是 
        h=mid;              //递归的出口,否则超时 
        return;
    }
    
    if(fabs(calculate(mid)-V)<=accurate)
    {
        h=mid;
        return;
    }
    else if(calculate(mid)>V)
    {
        binSearch(low,mid);
    }
    else
    {
        binSearch(mid,high);
    }
}

int main()
{
    int cas;
    
    cin>>cas;
    
    while(cas--)
    {
        cin>>r>>R>>H>>V;
        
        binSearch(0,H);
        
        cout<<setiosflags(ios::fixed)<<setprecision(6)<<h<<endl;
    }
    
    return 0;
}

 

下午刷了HDU4301。

用DP来做,其实我是看解题报告才懂得!

上次比赛,居然还搞3*n!!!果断做不出来。

我就不啰嗦了,不懂可直接看解题报告:点击打开链接

代码:

//dp[i][0][j]表示前i行分成j部分且第i行的两块属于同一部分
//dp[i][1][j]表示前i行分成j部分且第i行的两块属于不同部分           
#include<iostream>
#include<cstring>
using namespace std;

const int MAX=1010;
const int MOD=100000007;

__int64 dp[MAX][2][MAX*2];
int n,k;

void DP()
{
    memset(dp,0,sizeof(dp));
    
    dp[1][0][1]=dp[1][1][2]=1;  //初值 
    
    for(int i=1;i<=999;i++)
    {
        for(int j=1;j<=2000;j++)
        {
            //状态转移方程 
            dp[i+1][0][j]=(dp[i+1][0][j]+dp[i][0][j]+dp[i][1][j]*2)%MOD;
            dp[i+1][1][j]=(dp[i+1][1][j]+dp[i][1][j])%MOD;
            dp[i+1][0][j+1]=(dp[i+1][0][j+1]+dp[i][0][j]+dp[i][1][j])%MOD; 
            dp[i+1][1][j+1]=(dp[i+1][1][j+1]+dp[i][0][j]*2+dp[i][1][j]*2)%MOD;
            dp[i+1][1][j+2]=(dp[i+1][1][j+2]+dp[i][0][j]+dp[i][1][j])%MOD;
        }
    }
} 
            
int main()
{
    DP();
     
    int cas;
    
    cin>>cas;
    while(cas--)
    {
        cin>>n>>k;
        
        cout<<(dp[n][0][k]+dp[n][1][k])%MOD<<endl;
    }
    
    return 0;
} 

 

最后一题(HDU1969)

这还是一道二分题。

还是被卡了一会的。主要因为对递归还是不太明白。

这样的题比较好。它不像在一维数组内查找一个数是否存在,它要求不仅要求出结果,还要是最大或最小的。

当然,是在一定精度范围内。

另外就是,这两类二分题其实在代码上都是有规律可循的。刷两道题,总结下即可。

代码:

#include<iostream>
#include<algorithm> 
using namespace std;

const double pi=3.1415926535897931;
const double accurate=1e-5;
const int MAX=10000;
 
double volume[MAX],maxPiece; 
int numPie,numFriend; 

inline double calculate(double r)
{
    return pi*r*r;
}
 
void input()
{
    int radii;
     
    for(int i=0;i<numPie;i++)
    {
        scanf("%d",&radii);
        volume[i]=calculate(radii);
    }

    sort(volume,volume+numPie); 
}
 
int calculateNum(double v)
{
    int num=0;
    
    for(int i=0;i<numPie;i++)
    {
        num+=int(volume[i]/v);
        
        if(num>numFriend+1) break;
    }
    
    if(num>=numFriend+1)
    {
        maxPiece=maxPiece>v?maxPiece:v;
    }
     
    return num;
}
 
void binSearch(double low,double high)
{
    double mid=(low+high)/2;  
     
    if(high-low<=accurate)
    {
         //maxPiece=maxPiece>mid?maxPiece:mid;
         return;
    }
    
    if(calculateNum(mid)>=numFriend+1)
    {
        binSearch(mid,high);
    }
    else
    {
        binSearch(low,mid);
    } 
}
         
int main()
{
    int cas;
    
    scanf("%d",&cas);
    while(cas--)
    {
        scanf("%d%d",&numPie,&numFriend);
        
        input();
        
        maxPiece=-1;
         
        binSearch(0,volume[numPie-1]);
        
        printf("%.4lf\n",maxPiece); 
     }
     
     return 0;
} 


 

最后,晚上张浩然同学给我们讲了下图论。最小生成树、最短路径、并查集、强连通分量。。。

各种算法,又有事干咯。

 

 

 

 

 


 

 

 

国科大学习资料--自然语言处理(宗成庆)-2019期末考试题 国科大学习资料–自然语言处理(宗成庆)-2019期末考试题 国科大学习资料–自然语言处理(宗成庆)-2019期末考试题 国科大学习资料–自然语言处理(宗成庆)-2019期末考试题 阅读详情

相关推荐

从零开始:IBM V3700控制器更换与机器代码升级全流程指南

本文详细介绍了IBM V3700存储系统控制器更换与机器代码升级的全流程指南。从前期准备、硬件更换到版本同步,逐步解析如何应对503错误等常见问题,确保系统稳定运行。通过实战案例和优化建议,帮助工程师高效完成维护任务,提升存储系统可用性。

weixin_28365523的博客 312

HDU 2289 Cup

<br /> <br />http://acm.hdu.edu.cn/showproblem.php?pid=2289<br /> <br />题目大意:这道题就是给你一个圆台,里面装了一些水,现在告诉你圆台上下底半径,高度,水的体积,问你水的高度是多少。<br /> <br />解题思路:数学题,用到圆台求体积公式,照套就是,二分法逼近求值。<br /> <br />#include <stdio.h> #include <math.h> const double PI = acos(-1.0);

话别深秋 2124

AJ-Report开源数据大屏存在远程命令执行漏洞

该平台可以通过post方式在validationRules参数对应值中进行命令执行,可以获得服务器权限,登陆管理后台接管大屏。如果被攻击者利用,危害后果十分严重。

swordheart的博客 388

HDU 2289(浮点二分+数学)

问题描述 WHU ACM团队有一个大杯子,每个成员都可以喝水。现在,我们知道杯子中的水量,您能告诉我们它的高度吗? 杯子的上下圆的半径是已知的,杯子的高度也是已知的。 输入项 输入包含几个测试用例。输入的第一行包含一个整数T,表示测试用例的数量。 每个测试用例都在一行上,由四个浮点数组成:r,R,H,V,分别表示热水的底部半径,顶部半径,高度和体积。 T ≤ 20. 1 ≤ r, R, H ≤ 100; 0 ≤ V ≤ 1000,000,000. r ≤ R. r,R,H,V由一个空格分隔。 相邻两个案例

ACM-ICPC 现役(铜牌) Codeforces Rating: 2172 417

高功率半导体叠阵激光快慢轴准直优化技术解析

本文深入解析了高功率半导体叠阵激光快慢轴准直优化技术。针对其光束发散特性,文章系统阐述了从光源建模、光学仿真到透镜选型与参数匹配的完整工程流程,并强调了光束整形对于提升加工精度与效率的核心作用。通过优化快慢轴准直,可将原始散光转变为能量集中、均匀性好的高质量光束,为后续工业应用奠定基础。

php55的博客 713

Molflow新手必看:Facet基础操作全解析(从2D建模到3D拉伸)

本文为Molflow新手提供了Facet基础操作的全面解析,涵盖从2D图形创建到3D模型拉伸的完整流程。详细介绍了Facet作为几何建模基石的核心概念、顶点编辑、布尔运算以及拉伸、放样等关键操作,并深入讲解了如何为其配置物理参数以实现真空系统的蒙特卡洛模拟。

prometheus9mon的博客 419

hdu 2289 Cup 【二分】

题目 The WHU ACM Team has a big cup, with which every member drinks water. Now, we know the volume of the water in the cup, can you tell us it height? The radius of the cup’s top and bottom circle is known, the cup’s height is also known. 输入 The input con

QYQHxyh的博客 339

华为海思IC前端中后端(COT&XPU)岗位笔试机考题

华为海思COT和XPU部门IC前端,IC中端,IC后端岗位笔试真题分享

weixin_37584728的博客 3362

hdu 2289 CUP

Cup Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1089    Accepted Submission(s

codeStone 1400

SAP UI5 本地开发工具 fiori-tools-proxy 中间件详解及使用场景

该中间件基于 http-proxy-middleware 库实现,分为 ui5 资源代理和 backend 代理两大模式,并可与 fiori run 或 ui5 serve 命令无缝集成,通过配置 ui5.path、ui5.url 以及 backend.path、backend.url 等参数,实现与目标系统的灵活对接和安全配置 (就后端系统代理而言,fiori-tools-proxy 内置 @sap-ux/backend-proxy-middleware,可将以指定前缀(如。

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

Android SurfaceFlinger——概述(一)

对于系统渲染流程的理解是指导 SurfaceFlinger 设计的核心思想,从 Android 4.1 一直到 Android 9.0 都没有太大的变化。只要抓住这五个核心思想,我们阅读 SurfaceFlinger 的难度就会下降不少。下面看一下 SurfaceFlinger 的体系和 Skia 以及 View的绘制流程的关系。framework 面向开发者所有的 View 是便于开发的控件,里面仅仅只是提供了当前 View 各种属性以及功能。

小旭的专栏 2584

hdu 2289 基础二分

本以为二分的题嘛,有了模板一切都好说,这道题发出来其实有抄袭的嫌疑,算是给自己写的纠正性文章了,原来的想法每次二分的条件是相似边比的立方大于体积比,后来发现计算多误差大,然后就变成了所求水的体积大于实际水的体积,结果因为强行套模板,还是错55555.。。所以模板不是看懂会用就行了,还是要懂其中的思想啊。。。 WA: #include #include #include #include usi

王甲评的博客 455

DeepQA: A Unified Transcriptome-Based Aging Clock Using Deep Neural Networks

摘要: 本研究针对转录组衰老时钟存在的关键局限——仅在健康样本训练导致对患病个体预测偏差的问题,提出DeepQA,一种基于专家混合架构与新型Hinge-MAE损失函数的深度学习模型。通过同时利用健康与患病个体的异质数据训练,DeepQA显著提升预测精度:在健康个体上MAE比现有方法低1.5年,且是首个能正确处理五类疾病条件的模型。其创新性体现在: 方法学突破:Hinge-MAE损失函数消除健康/患病样本的训练偏差,专家混合架构高效整合多队列数据; 流程革新:摒弃传统基因预筛选步骤,通过显著图分析直接识别衰老

qq_44050612的博客 125

HDU2289

题意:那么好理解的题就不用写了吧 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<cmath> #define eps 1e-7 using namespace std; int n; double c; doub...

Yuzzzzzz的博客 386

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

[HDU2289]Cup_每日一题5_28

Problem - 2289 (hdu.edu.cn)

yanhanshui的博客 213

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

HDU-2289 Cup

#include #include #include using namespace std; const double eps = 1e-9; const double pi = acos(-1.0); double r1, r2, H, V; int t; inline double volume(double h) { double R = h / H * (r2 - r1

Kiyonami Yu 905

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

算法岗面试题目整理

鄙人才疏学浅。有整理不到位的,勿喷。整理的题目为大类型,面试中可能极可能会出现类似的变形,大同小异,认真思考就会出结果(勿慌)。 1、链表操作 最基本 C++ 指针与引用 类继承,多态(不懂的百度吧) 正则表达式 (矩阵)快速幂 筛素数(了解) 二叉树前、中、后序遍历(递归、非递归形式(较难)) 第一节 链表操作相关 注: 该节需要写代码实现 1. 反转链表(前插) 2. 遍...

一花一世界 一叶一菩提 4559

hdu 2289(数学+几何+二分)

Cup Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4857    Accepted Submission(s): 1547 Problem Description The WHU ACM Team has a big

llin-黎辰 620

hdu2289 Cup

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2289 #include #include #define EPS 1e-8 const double PI=3.14159265; double r,R,H,V; double Cal(double x) { double r0=(R-r)*x/H+r; return PI*x*

不可不戒 756

hdu2289(简单二分)

虽说是简单二分,但是我还是wa死了  题意:

u013509299的专栏 642

【hdu2289】Cup——二分

题目: Cup Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6303    Accepted Submission(s): 1994 Problem Description The WHU ACM Tea

CFhM_R's Blog 485

HDU 2289 Cup【高精度,二分】

Cup Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8942Accepted Submission(s): 2744 Problem Description The WHU ACM ...

weixin_34004576的博客 132

hdu 2289

简单二分 主要是圆台体积公式 水平面的半径u可以根据直角梯形的面积求出: (r+u)*h + (u+R)*(H-h) = (r+R)*H 得出(R-r)*h = (u-r)*H 得 u = r + (R-r)*h/H 圆台体积计算公式:V= π*h*( R^2 + R*u + u^2 ) / 3 #include #include #include #include #in

bayaksha 610

19/7/2012 ICPC培训 第四天

今天只刷出来三题。 明天下午组内又有测试了,肿么办呀,搜索和DP。 说说今天吧。 这三题都是以前看过但没做出来的题,也根本就没尝试去做,就觉得做不出来! 第一题(HDU4039)。 这题花了6个小时左右。其实,前两个小时代码就搞定了,可是有一处小错,一直TLE呀。 在Floyd()中把两个if判断条件没写好呀。明明算法是对的,可是代码逻辑就是没能那样写出来! 这种错误还很难找!!!

ON THE WAY TO GEEK 4078

25/7/2012 ICPC培训 第十天

啦啦啦 又来喽 今天一直在做小生成树问题。总共刷了7题,用来两种算法,prime和kurskal。 而且还都是HDU畅通工程系列的。   上午把prime算法的模板谢了出来,然后用模板刷了三题。 HDU1863、HDU1233、HDU1879 由于代码神似呀,这里只贴1863的代码了。 代码: #include #include #include using namespace

ON THE WAY TO GEEK 3880

23/7/2012 ICPC培训 第八天

今天真的都有点不想写了!!! 上午做一题(HDU1829),没刷出来。下午在做一题(HDU3635),还是没刷出来。。。 这两题都是关于并查集的。题目可以理解,大部分要求都能实现,可是就一直卡在一些细节上! 或者WA,或者狠下心来暴力一把TLE。。。 纠结呀!!!   不过今天还是有收获滴。 今天把上次比赛的题目都搞定啦。感谢唐爽童鞋、张浩然童鞋的指导。 我还发现B题的一个错,标程

ON THE WAY TO GEEK 3484
上一篇: 21/7/2012 ICPC培训 第六天
下一篇: 23/7/2012 ICPC培训 第八天
lulipeng_cpp
博客等级 码龄15年 169粉丝 130原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值