码迷,mamicode.com
首页 >  
搜索关键字:zoj 3686 a simple tr    ( 14369个结果
ZOJ 3791 An Easy Game [组合计数]
题目地址: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3791题目描述: 给定两个长度为n的01串s1,s2,要求用k步,每一步反转s1的m个位置的数码(即0变为1,1变为0),问能有多少种做法,在k步之后将s1变成s....
分类:其他好文   时间:2014-07-22 22:53:54    阅读次数:193
POJ 2263 Heavy Cargo(ZOJ 1952)
最短路变形或最大生成树变形。 问 目标两地之间能通过的小重量。 用最短路把初始赋为INF,其他为0.然后找 dis[v]=min(dis[u], d); 生成树就是把最大生成树找出来,直到出发和终点能沟通的时候,最小的边就是。 Kruskal: #include #include #include #include #include #include #include...
分类:其他好文   时间:2014-07-19 23:22:59    阅读次数:236
ZOJ 2027 Travelling Fee
枚举+最短路 题意是说出发地 和 目的地 之间有一条边是免费的。问你最小费用。 误区:求出最短路-路径中的最大边。(有些其他边免费之后,可能最短路就变了) 正确思路:枚举每条边,将其费用设为0.然后求最短路。找费用最小。 这是无向图,至于地名可以用map映射。 #include #include #include #include #include...
分类:其他好文   时间:2014-07-19 23:18:49    阅读次数:268
maven 下载源码eclipse的配置
1、在eclipse使用maven 下载源码包需要更改D:\apache-maven-3.2.1-bin\apache-maven-3.2.1\conf 目录下的settings.xml 文件, 在文件中加入: downloadSources tr...
分类:系统相关   时间:2014-07-19 14:29:53    阅读次数:395
MySQL查询计划学习
以select_type为线索:1) SIMPLE:简单的SELECT,不实用UNION或者子查询mysql> explain select * from t2;+----+-------------+-------+------+---------------+------+---------+-...
分类:数据库   时间:2014-07-19 14:29:10    阅读次数:285
ZOJ 3348 Schedule(map运用+网络流之最大流)(竞赛问题升级版)
题目地址:ZOJ 3348 仍然是一道竞赛问题的网络流问题,但是这道题再用上次的竞赛建图方法就不行了,5000场比赛,明显会超时,于是需要换种建图思路了。上一道经典竞赛问题戳这里 上一道的胜负转换是利用专门给比赛建一个点,通过对比赛双方的流向来控制胜负关系,这里的建图方法更加巧妙(膜拜想出这个方法的大牛。。。),是先假设其中一方获胜,用mp[a][b]来表示a赢b的次数,将a与b连边,权值为m...
分类:其他好文   时间:2014-07-19 13:11:19    阅读次数:289
ZOJ 1005 Jugs
JugsTime Limit: 2 Seconds Memory Limit: 65536 KB Special JudgeIn the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with t...
分类:其他好文   时间:2014-07-19 12:12:58    阅读次数:239
[zoj 3774]Power of Fibonacci 数论(二次剩余 拓展欧几里得 等比数列求和)
Power of Fibonacci Time Limit: 5 Seconds      Memory Limit: 65536 KB In mathematics, Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers of the following integer sequence...
分类:其他好文   时间:2014-07-19 11:48:45    阅读次数:239
ZOJ 1002 Fire Net
columns, each representing a street or a piece of wall.A blockhouse is a small castle that has four openings through which to shoot. The four openings...
分类:Web程序   时间:2014-07-19 11:28:06    阅读次数:281
侦听服务端口
myport(){foridolsof-i:$i|tail-n+2|tr-s‘‘|cut-d‘‘-f1,8|sort|uniq>portif[[-sport]]thenwhilereadserprodoecho$serislistening:$pro$iportdone<portelseecho$iportisnotlisteningfidone}myport$@效果:分析:tail的使用-n+2是从第2行开始显示tr(translate缩写)主要用..
分类:其他好文   时间:2014-07-19 02:17:55    阅读次数:234
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!