HDU 6008 - Worried School

第43届ACM亚洲区域总决赛赛(EC-Final)总结 现在才来填坑,感觉有点太晚了。 正文 青岛铁了后就知道自己菜,本来也没对EC-Final报太大的希望,但由于今年的去年的瞎jb规则,导致很多学校的一队二队没办法来打。 知道了这个消息心里还是抱有一定的希望的,对自己而言确实是个很好拿牌的机会(但最后还是没拿到) 热身赛 我校本就在西安,所以先考了四级然后去打的热身赛; 由于这是我第一次打EC-Final,自己是弱校,做坐到自己的位置,各种慌。(如... 阅读详情

Worried School

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 112    Accepted Submission(s): 34


Problem Description
You may already know that how the World Finals slots are distributed in EC sub-region. But you still need to keep reading the problem in case some rules are different.
There are totally G slots for EC sub-region. X slots will be distributed among five China regional sites and Y slots will be distributed to the EC-Final. Of course X and Y are non-negative integers and X + Y = G.
Here is how the X slots be distributed:
      1. Slots are assigned to the Asia Regional sites from the first place, the second place, · · · , last place.
      2. For schools having the same place across the sites, the slots will be given in the order of the number of “effective 
         teams” in the sites.
      3. No school could be assigned a slot 2 times, which means the schools will be skipped if they already got a slot.

After X slots are distributed, the EC-Final ranklist from highest rank will be assigned Y slots for those schools that haven’t got a slot yet.
Now here comes a sad story, as X and Y are not announced until the end of the last regional contest of that year, even later!!!
Teachers from a school are worried about the whether they can advance to WF whatever the X and Y is. Let’s help them find out the results before the announcement of X and Y .
 

Input
The first line of the input gives the number of test cases, T. T test cases follow.
Each test case starts with a line consisting of 1 integer and 1 string, G representing the sum of X and Y and S representing the name of the worried school.
Next 5 lines each consists of 20 string representing the names of top 20 schools in each site. The sites are given in the order of the number of “effective teams” which means the first site has the largest number of “effective teams” and the last site has the smallest numebr of “effective teams”.
The last line consists of 20 strings representing the names of top 20 schools in EC-Final site. No school can appear more than once in each ranklist
 

Output
For each test case, output one line containing “Case #x: y”, where x is the test case number (starting from 1) and y is “ADVANCED!” if every non-negative value X, Y will advance the school. Otherwise, output the smallest value of Y that makes the school sad.
∙ 1 ≤ T ≤ 200.
∙ School names only consist of upper case characters ‘A’ - ‘Z’ and the length is at most 5.
∙ 1 ≤ G ≤ 20.
 

Sample Input
1 10 IJU UIV GEV LJTV UKV QLV TZTV AKOV TKUV GAV DVIL TDBV ILVTU AKV VTUD IJU IEV HVDBT YKUV ATUV TDOV TKUV UIV GEV AKV AKOV GAV DOV TZTV AVDD IEV LJTV CVQU HVDBT AKVU XIV TDVU OVEU OVBB KMV OFV QLV OCV TDVU COV EMVU TEV XIV VFTUD OVBB OFV DVHC ISCTU VTUD OVEU DTV HEVU TEOV TDV TDBV CKVU CVBB IJU QLV LDDLQ TZTV GEV GAV KMV OFV AVGF TXVTU VFTUD IEV OVEU OKV DVIL TEV XIV TDVU TKUV UIV DVIL VFTUD GEV ATUV AKV TZTV QLV TIV OVEU TKUV UKV IEV OKV CVQU COV OFOV CVBB TDVU IOV UIV TKUV CVBB AKV TZTV VFTUD UKV GEV QLV OVEU OVQU AKOV TDBV ATUV LDDLQ AKVU GAV SVD TDVU UPOHK
 

Sample Output
Case #1: 4
Hint
For the first test case, the optimal solution is X = 6 and Y = 4, at this time the advanced schools were [UIV, TKUV, QLV, CVBB, GEV, OCV, AKV, TZTV, VFTUD, UKV].
 

题目是难读懂了点,但是本身并不是很难做,可以说直接进行模拟就行了。


说一下题目大意吧:

现在WF分配总共g个名额分为两块(x+y=g):
首先,分配x个名额给五个中国区域站。
这五个中国区域站每个站都有20个学校,输入时这20个学校已经按照分数从大到小排好序。
分配这x个名额的顺序:
一号区域站第一名 -> 二号区域站第一名 -> 三号区域站第一名 -> 四号区域站第一名 -> 五号区域站第一名 -> 一号区域站第二名 -> 二号区域站第二名 -> …………
但是如果有重复就跳过这个学校,因为一个学校最多只能占一个名额。
然后,分配完x个名额后,剩下的y个名额分配给EC-Final中的20个学校,这20个学校输入时也按排名从高到低的顺序,这20个学校去除已经获得名额的学校后的第一名到第y名获得这y个名额。


输入:
每个test的第一行是总名额数g和要查询是否能进WF的那个学校——worried school;
接下来的1到5行分别是一到五号区域站的20个学校。
在接下来的一行是EC-Final的20个学校。


现在,我们要帮worried school看看它能不能进WF,如果对于任意的(x,y)都能使得worried school进WF,就输出“ADVANCED!”。
而如果对于一些(x,y)能使得worried school进WF,另一些(x,y)不能,就输出最小的y,这个时候(x,y)恰好使得worried school不能进WF。



#include<cstdio>
#include<cmath>
#include<set>
#include<iostream>
using namespace std;
int g;
string site[6][21],EC_site[21],worried_school;
int main()
{
	int t;
	scanf("%d",&t);
	for(int kase=1;kase<=t;kase++)
	{
		cin>>g>>worried_school; 
		for(int i=1;i<=5;i++)
		{
			for(int j=1;j<=20;j++) cin>>site[i][j];
		}
		for(int j=1;j<=20;j++) cin>>EC_site[j];
		
		int i,j,x,y=-1;
		set<string> adv_school;
		for(int x=0;x<=g;x++)
		{
			adv_school.clear();
			bool can_adv_in_x=0,can_adv_in_y=0;
			if(x>0)//给5个site分配名额 
			{
				for(int r=1;r<=100;r++)
				{
					i=r%5; if(i==0) i+=5;
					j=(int)ceil(r/5.0);
					if(site[i][j]==worried_school) can_adv_in_x=1;//目标学校可以进WF
					adv_school.insert(site[i][j]);
					if(adv_school.size()>=x) break;
				}
			}
			if(g-x>0)//给EC-Final分配名额 
			{
				for(int j=1;j<=20;j++)
				{
					if(EC_site[j]==worried_school) can_adv_in_y=1;
					adv_school.insert(EC_site[j]);
					if(adv_school.size()>=g) break;
				}
			}
			if(!can_adv_in_x && !can_adv_in_y) y=g-x;
		}
		printf("Case #%d: ",kase);
		if(y==-1) printf("ADVANCED!\n");
		else printf("%d\n",y);
	} 
}



ACM/ICPC World Final 手续办理 world final 有关的一些事务的办理 阅读详情

相关推荐

保姆级教程:用Python+NumPy手把手模拟光学散射与记忆效应(附代码)

本文提供了一份详细的Python+NumPy教程,手把手教你模拟光学散射与记忆效应。从基础光波建模到散射介质实现,再到菲涅尔衍射和光学记忆效应验证,逐步构建完整的仿真系统。通过附带的代码示例,读者可以快速掌握计算光学仿真的核心技术,为医学成像、物理仿真等领域的研究提供实用工具。

weixin_30172941的博客 324

2016CCPC网络选拔赛C-换根dp好题

题目大意: 给一颗树,带点权和边权.问你每个点,得到的最大价值.(点权代表价值边权代表花费).每个点只能拿一次,边反复计算花费. 题目思路: 容易想出一种树形dp后换根的思路: dp(i,0/1)dp(i,0/1)dp(i,0/1)代表以iii为根的子树,最后回到/不回到i点的最大价值. dp(i,1)=∑j∈Sonimax(dp(j,1)−2∗wi,0)dp(i,1)=\sum_{j\in Son_i}max(dp(j,1)-2*w_i,0)dp(i,1)=∑j∈Soni​​max(dp(j,1)−2∗w

qq_35577488的博客 340

移植 lwip,在 windows 内核构建一个 TCPIP 协议栈

移植 lwip,在 windows 内核构建一个 TCPIP 协议栈 亲,当你点开看这篇文章,就说明你知道我想要干什么事情,或者说,你知道在 Windows 的内核种绕开它的网络协议,再独立构建一个网络协议栈的意义。如果你要问我有 windows 系统的网络协议栈不用,移植 lwip 有什么意义,那么你可以关闭链接走人了,因为这篇文章不适合你,它不是讲 lwip 移植原理的。 经常关注我的博客的朋...

oRbIt 的专栏 3576

Worried School HDU-6008 模拟

原题链接: HDU-6008 大意: 题目比较长,看的比较麻烦。理解后就是一个简单地模拟。world final 名额有 g 个,g 分为 x + y  ,x 的名额从五个站点里依次抽,y 由另一个站 ec-final 里抽。 但是现在不知道 x 和 y ,求某个学校能否进 wf 。能输出 ADVANCED!,否则输出他不能去 wf 的最小 y 值。 思路: 简单模

Joovo的博客 716

CVAT本地部署保姆级教程:用Docker Compose在Ubuntu上5分钟搞定你的私有数据标注平台

本文提供CVAT本地部署的保姆级教程,详细讲解如何在Ubuntu系统上使用Docker Compose快速搭建私有数据标注平台。从环境准备、Docker配置到CVAT部署全流程,涵盖硬件要求、性能优化及安全加固等关键步骤,帮助开发团队5分钟内完成高效、安全的标注环境搭建。

weixin_42619742的博客 383

基于LORA的双机通信的智能农业系统

通过LoRa模块与主机进行通信,监测环境中的温度、湿度、土壤湿度和光照强度等参数,并根据预设的自动控制逻辑或者手动指令控制继电器开关,从而调节风扇、加热器、水泵、喷雾器和灯光等设备,为植物提供适宜的生长环境。使用的Lora是大夏龙雀的感觉这个是我使用过的Lora里面最好用的,因为不用设置频道就可以直接透明传输,使用起来得心应手。就像两个单片机直接串口通信一样,缺点是异步串行,不能同时进行接收和发送。继电器灯亮模拟打开对应的风扇、水泵、灯、喷雾、加热。1.使用温度传感器测当前环境的温湿度。

ssjsjss的博客 1739

【2016 CCPC-Final】B - Wash

https://vjudge.net/problem/Gym-101206BL件衣服, n 个洗衣机, m 个烘干机, 给定每台洗衣机洗衣服的时间和每台烘干机烘干的时间, 每台机器一个时间段只能处理一件衣服。 求洗完L件衣服的最短时间?使用priority_queue 先使用优先队列算出第i件衣服洗完的最短时间, 若要使洗+烘干的总时间最短,则最晚洗完的衣服应放到最快的烘干机中, 按照该原则

西瓜不甜的博客 1183

获取车辆VIN等OBD信息

获取车辆如下OBD信息: VIN:Vehicle Identification Number CALID:Calibration Identifications CVN:Calibration verification number 一、SAE J1939协议 通过请求 CALIBRATION INFORMATION (DM19),获取CVN和CALID。 发送请求:18EA00F9 00 D3 00 应答:18EC0000 10 14 00 03 FF 00 D3 00 数据,BYTE1=0x10,表明

jianxuezixuan的博客 1万+

2016中国大学生程序设计竞赛(ccpc 长春)题解报告

2016中国大学生程序设计竞赛(ccpc 长春)题解报告

queuelovestack的专栏 8668

YOLOv8剪枝实战:基于torch_pruning的模型优化与性能提升指南

本文详细介绍了如何使用torch_pruning工具对YOLOv8模型进行结构化剪枝,以实现模型轻量化与性能提升。通过实战步骤解析,包括环境搭建、依赖图分析、迭代剪枝与微调策略,帮助开发者有效减少模型参数量和计算量,提升在边缘设备上的推理速度,同时保持检测(detect)与分割(segment)任务的精度。

water的专栏 1122

EAAI title-page-template 怎么填写: 期刊投稿作者信息填写指南

本文详细介绍了期刊投稿时作者信息填写的规范要求。主要内容包括:1)核心填写原则(信息一致性、标注清晰性、通讯作者唯一性);2)具体填写方法演示(作者姓名、单位/机构、通讯作者);3)常见错误规避指南(如单位上标错误、邮箱无效等);4)提供可直接套用的规范模板。特别强调作者姓名拼写、单位标注、通讯作者指定等关键细节,并以深圳大学和同济大学研究团队为例进行说明,帮助投稿者避免因格式问题被退回修改。

ZhangJiqun&191cm&85kg 1086

HDU - 5999 The Third Cup is Free

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define PI acos(-1.0) #define in freopen("in.txt", "r", stdi

床前明月光 469

2026从0到1!C#工控机开发实战指南:新手一周就能跑通的完整项目

这篇文章摘要如下: 工业自动化领域工控机开发入门指南,针对零基础开发者提供从环境搭建到项目实战的全流程指导。文章首先解答工控机开发的3个核心问题,比较工控机与普通PC的区别,推荐使用C#作为开发语言。随后详细讲解开发环境配置、四大核心技术栈(通信协议、数据库、UI框架、多线程),并重点演示Modbus TCP通信的实现。最后通过一个完整的温度监控系统项目实战,展示如何用WPF构建实时数据采集界面,包括Modbus通信类编写、数据采集服务实现等关键代码片段。全文采用图解+代码的方式,帮助开发者快速掌握工控系统

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 702

HDU - 6008 Worried School

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define PI acos(-1.0) #define in freopen("in.txt", "r", stdi

床前明月光 559

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

IMSL CNL 7.0.0 (x86-64)Crack

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

Worried School HDU - 6008

这个题就是前五个是中国赛区,最后一个是外国赛区,这里给你一个担心的的国家,中国赛区的取数是按照先取前五个赛区的第一再去第二第三这样,不能有重复的,我们要帮worried school看看它能不能进WF,如果对于任意的(x,y)都能使得worried school进WF,就输出“ADVANCED!”。而如果对于一些(x,y)能使得worried school进WF,另一些(x,y)不能,就输出最小的

ming_514 334

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

HDU6008-Worried School

Worried School                                                                         Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)                          

wang_128的博客 695

WINCC7.3破解文件

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

【HDU 6008】Worried School(模拟)

Problem Description You may already know that how the World Finals slots are distributed in EC sub-region. But you still need to keep reading the problem in case some rules are different. There are t...

weixin_34112900的博客 180

HDU-6008-Worried School

ACM模版描述题解简单的模拟题,题意不是特别容易翻译,但是模拟的规则十分简单,和 WFWF 晋级资格相似,大致是一共 X+Y=GX + Y = G 个名额,其中 XX 分给中国五个区域赛,YY 个分给 ECFinalECFinal,先考虑五个区域赛的每个赛区的五个第一名、五个第二名、五个第三名……其中重复的只算一次,凑够 XX 个,然后在 ECFinalECFinal 中选前若干名去除和前边五个赛区

逐梦者 537

HDU - 6008 - Worried School (模拟)

题意: 模拟final的选队规则。 思路: y从小到大枚举,因为最大才20,判断该大学如果没被选上,输出对应y,如果都满足。输出advanced! #include &lt;bits/stdc++.h&gt; using namespace std; const int maxn = 1e5+10; typedef long long ll; set&lt;string&gt; ss; ...

刘二狗的博客 369

Problem J. Worried School(日期模拟 STL)

这题有个知识点上的 疏漏 当进行过if(q[sx]==2)//当进行过这步操作后 就不能用!q.count(sx) 因为此时map中已经能发现sx了 只不过他的值还是0 所以使用map时尽量用数字代替 #include #include #include #include #include #include #include #include #include #includ

MR CODER 284

HDU 6005 Pandaland(dijkstra + 剪枝)

题意: 给你一个m 个边的无向图,要求在图上找一个最小的环(边权)。 思路: 好暴力的一道题目。 一个环的话 肯定要经过一个边,我们直接暴力枚举哪一个边。 把这个边的权值设成inf。 然后跑这两个点的最短路即可。 加上这个边原权值 即是这个最小环。 注意加个剪枝: 当优先队列中的最小值大于等于ans 时 直接不跑了 #include #include #include #

aozil_yang的博客 1818

『总结』2016 CCPC 中国大学生程序设计竞赛 合肥赛区

今天是2016年10月19日… 比赛完了已经过了3天. 今天想起我的总结还没写..这次真的很有幸来到合肥赛区比赛 也感谢教练还是对我们的相信 我对合肥赛区并没有报太大的希望我感觉这次可能有3个幸运的元素. 因为大连icpc和这个比赛冲突了,部分dalao去了icpc,少了点竞争, 和杭州赛区时间太接近,好多dalao去了杭州赛区, 这次的比赛的题目全是中文题(好评!这才是CCPC,给中

Gavinjou大笨象的博客 4481

2016CCPC网络赛个人总结

今天下午是2016年的CCPC中国大学生程序设计竞赛的网络赛。几百个学校共计一千多个队参赛。在HDOJ举行。12点开始以后,我们马上看了第一题,嘻嘻哈哈两个星球有着不同的公转周期。给出一个时间。当过了这么多天以后,两个星球是否同时处在一年的第一天。给出的数据的长度不超过一千万。。。第一眼看成了大小不超过一千万。这是一道卡时间的高精度除法题。求一个高精度的数分别除以两个低精度的数。所得到的余数是否同

ACM_Frank的博客 6979

HDU 6005 Pandaland 最小环(dijkstra+剪枝)

大致题意就是,给你一个图,然后让你在里面找一个最小的环。 说到找最小环,我很惊叹网上居然没有一个很好的算法。见到的算法都是用floyd的O(N^3)或者dijkstra的O(N^2logN)。但是这些显然都不能满足这题的要求。然后其实本题还加了一个条件,就是一定是一个平面图。一开始还拼命地去想平面图的性质,现在发现其实这些都无所谓。 这题,只要你联想到之前多校赛的第k小生成树的和,你就会知道如何下手。那题利用树边和非树边进行修改生成树和成环。这题也可以类似。由于要求是最小

alpc_qleonardo 1555

2018 EC Final(西安)小结

2018最后一场+队伍最后一场现场赛,银 热身赛 3道题,第一题签到,第二题是一道平面几何,不难,但是貌似因为一些玄学问题(精度?),不少人都WA了好几次,但最后还是过了,第三题是输入两个数输出一个数,学长写了个暴力然后三个人开始一起找规律,最终到比赛结束都没有找出来,后来询问别人才知道好像是比较复杂的两维gcd求和的杜教筛 现场赛 一上来我校其他两个队率先找到了签到题,然后所有人一拥而上,之后的...

xiaoyimi的博客 2051

2018年EC Final 校内选拔赛【解题报告】

问题 A: C基础-求同存异 时间限制: 1 Sec  内存限制: 128 MB 提交: 1  解决: 1 [提交][状态][讨论版][命题人:外部导入][Edit] [TestData] 题目描述 输入两个数组(数组元素个数6和8),输出在两个数组中都出现的元素(如a[6]={234567}b[8]={357911131519}则输出3、5、7)。 输入 第一行输入a数组,第二行输入b...

紫芝的博客 3755
上一篇: codeforces 798B - Mike and strings
下一篇: UVA 11768 - Lattice Point or Not
Freenm
博客等级 码龄15年 14粉丝 67原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值