自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

MissZhou要努力

路漫漫其修远兮,吾将上下而求索

  • 博客(22)
  • 收藏
  • 关注

原创 POJ 3084 - Panic Room【网络流 最小割】

DescriptionYou are the lead programmer for the Securitron 9042, the latest and greatest in home security software from Jellern Inc. (Motto: We secure your stuff so YOU can't even get to it). The sof

2016-07-29 16:33:13 487

原创 python——初级定时器

import time as tclass MyTimer(): def __init__(self): self.unit=['year','month','day','hour','minute','sec'] self.prompt='未开始'; self.lasted=[] self.begin=0

2016-07-29 11:45:42 486

原创 poj1966Cable TV Network【顶点连通度=>最小割】

Cable TV NetworkTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 4588 Accepted: 2131DescriptionThe interconnection of the relays in a cable TV network is

2016-07-29 10:50:05 487

原创 python——列表与元组

列表创建普通列表,见上一个for循环的例子。创建混合类型的列表,就是每个元素可以不是相同类型的数据,也可以列表套列表创建空列表>>> li=[]>>> li[]想列表添加元素append()>>> li.append('misszhou')>>> li['misszhou']>>> li.append('zyj','2013')Traceba

2016-07-28 09:58:00 336

原创 poj1815Friendship【最小割】

DescriptionIn modern society, each person has his own friends. Since all the people are very busy, they communicate with each other only by phone. You can assume that people A can keep in touch with

2016-07-27 19:50:58 440

原创 poj3648Wedding【2-SAT】输出任意解

题意:一堆夫妇去参加一对新人的婚礼。人们坐在一个很长很长的桌子的两侧(面对面)。新郎新娘在桌子头面对面座。新娘不希望看见她对面的一排有一对夫妇坐着(夫妇需要分开两排座)。同时,一些人之间有通奸关系(通奸不分性别,而且新郎新娘也可能通奸!!!!),新娘也不希望有通奸关系的人同时坐在她对面的一排。问你可否满足新娘的要求,可以的话,输出一种方案做法:和hdu1814Peaceful

2016-07-27 11:24:52 521 1

原创 hdu5521Meeting【最短路】2015沈阳现场赛

Problem DescriptionBessie and her friend Elsie decide to have a meeting. However, after Farmer John decorated hisfences they were separated into different blocks. John's farm are divided into n

2016-07-26 11:01:25 644

原创 笔试总结——编程基础篇【持续更新】

1.34^17%6 = ((34%6)^17)%6 = 4^17%6 = 4 可以先对34%6求余,得到4  然后是4^17%6 求余, 得到42.哪些特性导致代码膨胀:宏定义模板内联函数这种导致代码膨胀的特性一般是出现在编译阶段,而非运行阶段。而宏定义,模板和内联函数都是出现在程序的编译阶段,都会实现代码替换(宏定义,内联函数)或者生成特定的代

2016-07-25 22:01:21 720

原创 python——基本数据类型+常用操作符+循环

python数据类型数值型:整型(python2中有整型和长整型的区别,长整型后面+L  python3不做区分  可以做大数运算)浮点 布尔(可认为是整数0,1) T F大写!!!非0的整数值也认为是True科学记数法>>> a=0.0000000000000000025>>> print(a)2.5e-18>>> a=12332454313423>>>

2016-07-25 21:41:36 945

原创 UVALive 7264 Kejin Game 2015北京现场赛【最小割】

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5276遇到这个题才发现自己的图论是有多么次……题意:有一个技能树,每个技能有一些“先修技能”,先修技能都得到后才可以得到当前技能。三种方法:1.逐个修技能,花费是技能的点值(数据中

2016-07-25 10:13:28 1101

原创 2015北京现场赛UVALive 7263 Today Is a Rainy Day 【bfs】

题意:给定两个字符串(只含有123456)问最少用几步可以从后者变换到前者。两种操作:1.每次变一个2.每次把所有某种变成另一种很明显应该多做后一种的操作才会使得整体最优,每个数字都可以有5种变换,一共6种原始字符,想到用bfs预处理123456变成任何情况的步数,定义dx[情况序号]=变换后的结果 stp[情况序号]=步数 step[变换后的结果]=步数然后将给定的字符串带入这些情况中,剩下的用操作1,找最小的步数

2016-07-25 09:25:04 1414

原创 poj3683Priest John's Busiest Day【2-sat二选一输出】

DescriptionJohn is the only priest in his town. September 1st is the John's busiest day in a year because there is an old legend in the town that the couple who get married on that day will be f

2016-07-22 16:01:15 475

原创 uva11183Teen Girl Squad【最小树形图定根模板题】

Problem ITeen Girl Squad Input: Standard InputOutput: Standard OutputTime limit: 3.000 seconds -- 3 spring rolls please.-- MSG'D!!-- Oh! My stomach lining!Str

2016-07-18 19:53:15 1046

原创 hdu4009Transfer water【最小树形图】

题意:居民点取水,可以自己挖井,可以从别的地方引用,但是有些边不能引用,如果引用的地点海拔高只需要买水管子的钱,引用点海拔低不仅要买泵也要买水管子的钱!!!(这里读错题了)很明显的不定根最小树形图,既然不定根是虚拟出来一个根把它和所有点连起来,最终的结果减去这个边长就可以了,那么不定多根也是一样啊,这题加的虚边权正好是挖井的钱啊。最后就不减去那些边权了啊。所以说,图论的核心还是建边啊

2016-07-18 17:43:16 377

原创 python入门——猜数字游戏

学习资料:www.fishc.com我的第一个程序:print('-------MissZhou的第一个游戏-------------')temp=input('猜猜她心里想的是那个数字')guess=int(temp)if guess==8: print("你怎么猜到了") print("猜到了也没用")else: print("猜错啦 想的是8")pr

2016-07-18 17:31:24 5441

原创 bestcoder两周年前三题hdu5718,5719,5720

一周多上山实习只学了一些python,做题的手感差了好多QAQ,昨天晚上最开始电脑还更新重启折腾了好久,换成台式机做的,只做了一个题居然rating还涨了168,始料未及前三个都是乱搞(第三个有一点贪心的意思hdu5718OracleAccepts: 599Submissions: 2576Time Limit: 8000/4000 MS (Java/Oth

2016-07-18 17:25:14 1320

原创 poj1776Task Sequences【竞赛图的哈密顿路径】

DescriptionTom has received a lot of tasks from his boss, which are boring to deal with by hand. Fortunately,Tom got a special machine - Advanced Computing Machine (ACM) to help him.ACM works in a

2016-07-05 21:13:20 955

原创 hduTour Route【竞赛图的哈密顿回路】

Problem DescriptionThe city is so crowded that the mayor can't bear any longer. He issued an order to change all the roads into one-way street. The news is terrible for Jack, who is the director of

2016-07-05 21:05:10 719

原创 hdu4889Scary Path Finding Algorithm【构造】搞坏spfa-slf 2014多校联合

题意:给出spfa_slf优化的代码,要你写示例使得代码坏掉==做法:首先应该分析这堆代码,每次拿出队首元素并弹出,查找队首元素相连的点,与现在的队首元素比较,距离比队首元素大的放到队尾,小的放到队首。每个元素跳出的次数大于给定值的时候输出”doge“。这个SLF其实对于有些数据来说是可以做到优化的,因为可以认为距离较小的点可能更新的点比较多。造一组数据模拟一下这个过程(其实这个就

2016-07-05 11:23:32 1107

原创 dhu4864tasks【贪心】201多校联合

题意:有n个任务,每个任务有花费时间xi,等级yi;m个机器,每个机器有花费时间xi,等级yi。必须机器的时间和等级都不可以超过任务才可以完成这个任务。(这个地方读错题了QAQ,我以为时间是累加的,其实任务和机器都只能用一次)做法:将任务和机器的结构体数组都按着先时间从大到小,再等级从大到小排序。(这个排序是根据等级最大到100,时间最大到1440来的,反过来的讲道理其实可以,但是貌似得TLE吧)然后用任务去匹配机器(就是最外层循环是任务)由于两个都是时间优先级最高,那么我们可以这么想,任务与机器的时间

2016-07-04 17:22:41 397

原创 FZU 2141 Sub-Bipartite Graph【贪心】

DescriptionGiven a simple undirected graph G with n vertices and m edges, your task is to select a sub-bipartite graph of G with at least m/2 edges.In the mathematical field of graph theory, a b

2016-07-03 15:18:40 487

原创 hdu4966GGS-DDU【最小树形图】 2014多校联合

Problem DescriptionDo you think this is a strange problem name? That is because you don't know its full name---'Good Good Study and Day Day Up!". Very famous sentence! Isn't it?Now "GGS-DDU" is

2016-07-01 14:23:07 407

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除