随笔分类 -  图论算法:网络流

摘要:Fox Ciel is playing a card game with her friend Jiro. Jiro has n cards, each one has two attributes: position (Attack or Defense) and strength. Fox Ci 阅读全文
posted @ 2016-10-02 22:20 TenderRun 阅读(440) 评论(0) 推荐(0)
摘要:Fox Ciel is participating in a party in Prime Kingdom. There are n foxes there (include Fox Ciel). The i-th fox is ai years old. They will have dinner 阅读全文
posted @ 2016-10-02 22:16 TenderRun 阅读(301) 评论(0) 推荐(0)
摘要:Emuskald considers himself a master of flow algorithms. Now he has completed his most ingenious program yet — it calculates the maximum flow in an und 阅读全文
posted @ 2016-10-02 22:13 TenderRun 阅读(413) 评论(0) 推荐(0)
摘要:A gourmet came into the banquet hall, where the cooks suggested n dishes for guests. The gourmet knows the schedule: when each of the dishes will be s 阅读全文
posted @ 2016-10-02 22:10 TenderRun 阅读(215) 评论(0) 推荐(0)
摘要:In the country there are n cities and m bidirectional roads between them. Each city has an army. Army of the i-th city consists of ai soldiers. Now so 阅读全文
posted @ 2016-10-02 22:07 TenderRun 阅读(241) 评论(0) 推荐(0)
摘要:You have written on a piece of paper an array of n positive integers a[1], a[2], ..., a[n] and m good pairs of integers (i1, j1), (i2, j2), ..., (im,  阅读全文
posted @ 2016-10-02 22:04 TenderRun 阅读(358) 评论(0) 推荐(0)
摘要:Laura Luo has just invented a game. Given a beautiful pencil sketch with n points, you're to colorize it with water pens by painting circuits. Each ti 阅读全文
posted @ 2016-08-08 20:03 TenderRun 阅读(291) 评论(0) 推荐(0)
摘要:Description 小凸和小方是好朋友,小方给小凸一个N*M(N<=M)的矩阵A,要求小秃从其中选出N个数,其中任意两个数字不能在同一行或同一列,现小凸想知道选出来的N个数中第K大的数字的最小值是多少。 小凸和小方是好朋友,小方给小凸一个N*M(N<=M)的矩阵A,要求小秃从其中选出N个数,其中 阅读全文
posted @ 2016-07-25 11:05 TenderRun 阅读(270) 评论(0) 推荐(0)
摘要:[HNOI 2013]切糕 第三题:切糕(程序文件名:cake.exe)100 分,运行时限:5s 经过千辛万苦小A 得到了一块切糕,切糕的形状是长方体,小A 打算拦腰将切糕切成两半分给小B。出于美观考虑,小A 希望切面能尽量光滑且和谐。于是她找到你,希望你能帮她找出最好的切割方案。 出于简便考虑, 阅读全文
posted @ 2016-07-22 15:50 TenderRun 阅读(211) 评论(0) 推荐(0)
摘要:Description 10 年一度的银河系赛车大赛又要开始了。作为全银河最盛大的活动之一,夺得这个项目的冠军无疑是很多人的梦想,来自杰森座 α星的悠悠也是其中之一。 赛车大赛的赛场由 N 颗行星和M条双向星际航路构成,其中每颗行星都有一个不同的引力值。大赛要求车手们从一颗与这 N 颗行星之间没有任 阅读全文
posted @ 2016-07-22 13:29 TenderRun 阅读(219) 评论(0) 推荐(0)
摘要:[网络流24题] 搭配飞行员 ★★☆ 输入文件:flyer.in 输出文件:flyer.out 简单对比 时间限制:1 s 内存限制:128 MB 【问题描述】 飞行大队有若干个来自各地的驾驶员,专门驾驶一种型号的飞机,这种飞机每架有两个驾驶员,需一个正驾驶员和一个副驾驶员。由于种种原因,例如相互配 阅读全文
posted @ 2016-07-20 16:10 TenderRun 阅读(296) 评论(0) 推荐(0)
摘要:同一时刻有N位车主带着他们的爱车来到了汽车维修中心。维修中心共有M位技术人员,不同的技术人员对不同的车进行维修所用的时间是不同的。现在需要安排这M位技术人员所维修的车及顺序,使得顾客平均等待的时间最小。 说明:顾客的等待时间是指从他把车送至维修中心到维修完毕所用的时间。 输入 第一行有两个数M,N, 阅读全文
posted @ 2016-07-11 20:41 TenderRun 阅读(304) 评论(0) 推荐(0)
摘要:2051. 王者之剑 ★★★☆ 输入文件:Excalibur.in 输出文件:Excalibur.out 简单对比 时间限制:1 s 内存限制:256 MB 【题目描述】 这是在阿尔托利亚·潘德拉贡成为英灵前的事情,她正要去拔出石中剑成为亚瑟王,在这之前她要去收集一些宝石。 宝石排列在一个n*m的网 阅读全文
posted @ 2016-07-07 22:20 TenderRun 阅读(258) 评论(0) 推荐(0)
摘要:Destroying The Graph Description Alice and Bob play the following game. First, Alice draws some directed graph with N vertices and M arcs. After that 阅读全文
posted @ 2016-07-07 21:53 TenderRun 阅读(202) 评论(0) 推荐(0)
摘要:John is a Chief Executive Officer at a privately owned medium size company. The owner of the company has decided to make his son Scott a manager in th 阅读全文
posted @ 2016-07-07 19:38 TenderRun 阅读(377) 评论(0) 推荐(0)
摘要:OPTM - Optimal Marks You are given an undirected graph G(V, E). Each vertex has a mark which is an integer from the range [0..231 – 1]. Different vert 阅读全文
posted @ 2016-07-04 20:52 TenderRun 阅读(244) 评论(0) 推荐(0)
摘要:2047. [ZOJ2676]网络战争 ★★★ 输入文件:networkwar.in 输出文件:networkwar.out 评测插件 时间限制:5 s 内存限制:32 MB 【题目描述】 Byteland的网络是由n个服务器和m条光纤组成的,每条光纤连接了两个服务器并且可以双向输送信息。这个网络中 阅读全文
posted @ 2016-07-03 23:52 TenderRun 阅读(382) 评论(0) 推荐(0)
摘要:[CTSC2001]终极情报网 【题目描述】 在最后的诺曼底登陆战开始之前,盟军与德军的情报部门围绕着最终的登陆地点展开了一场规模空前的情报战。 这场情报战中,盟军的战术是利用那些潜伏在敌军内部的双重间谍,将假的登陆消息发布给敌军的情报机关的负责人。那些已经潜入敌后的间谍们都是盟军情报部的 精英,忠 阅读全文
posted @ 2016-07-03 20:52 TenderRun 阅读(388) 评论(0) 推荐(0)
摘要:[网络流24题] 餐巾 【问题描述】 一个餐厅在相继的N天里,第i天需要Ri块餐巾(i=l,2,…,N)。餐厅可以从三种途径获得餐巾。 (1)购买新的餐巾,每块需p分; (2)把用过的餐巾送到快洗部,洗一块需m天,费用需f分(f<p)。如m=l时,第一天送到快洗部的餐巾第二天就可以使用了,送慢洗的情 阅读全文
posted @ 2016-07-02 18:07 TenderRun 阅读(293) 评论(0) 推荐(0)
摘要:[NOI2008] 志愿者招募 输入文件:employee.in 输出文件:employee.out 简单对比 时间限制:2 s 内存限制:512 MB 【问题描述】 申奥成功后,布布经过不懈努力,终于成为奥组委下属公司人力资源部门的主管。布布刚上任就遇到了一个难题:为即将启动的奥运新项目招募一批短 阅读全文
posted @ 2016-03-25 19:30 TenderRun 阅读(302) 评论(0) 推荐(0)