读XML文件



<? xml version="1.0" ?> < ArrayOfDataSync xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\testJava.thrift </ FilePath > < CurrentSeek > 1297 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\thrift-0.8.0.exe </ FilePath > < CurrentSeek > 4013056 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\thrift_白皮书.pdf </ FilePath > < CurrentSeek > 441217 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\thrift命令.txt </ FilePath > < CurrentSeek > 131 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > </ ArrayOfDataSync >
<? xml version="1.0" ?> < ArrayOfDataSync xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\testJava.thrift </ FilePath > < CurrentSeek > 1297 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\thrift-0.8.0.exe </ FilePath > < CurrentSeek > 4013056 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\thrift_白皮书.pdf </ FilePath > < CurrentSeek > 441217 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > < DataSync > < __isset > < IsSync > true </ IsSync > < FilePath > true </ FilePath > < CurrentSeek > true </ CurrentSeek > < ClientKey > true </ ClientKey > < OrderNumber > true </ OrderNumber > < OccurTime > true </ OccurTime > < Name > false </ Name > < Size > false </ Size > < LastDate > false </ LastDate > </ __isset > < IsSync > true </ IsSync > < FilePath > d:\path\资料\thrift文件\thrift文件\thrift命令.txt </ FilePath > < CurrentSeek > 131 </ CurrentSeek > < ClientKey > 8C:89:A5:E1:89:3D </ ClientKey > < OrderNumber > 1 </ OrderNumber > < OccurTime > 2014/1/26 15:32:46 </ OccurTime > < Size > 0 </ Size > </ DataSync > </ ArrayOfDataSync >
n个城市里有m条单向路径,每条路径上有一个权值,每个城市都属于且仅属于某一个环,Tom计划环游这n个城市,并且每个城市都只能经过一次。问最后环游了n个城市后最小的权值和是多少。
算法分析:费用流的常见模型,对于初学费用流的我来说,还是挺新鲜的,也参考了其他ACMer的博客。
首先提取出模型:给定一个有向图,要求用若干个环覆盖整个图,并且覆盖的这些环的权值和最小。
建模:源点from和汇点to,拆点 i 为 i 和 i+n。 from->i(w为1,cost为0)(w为1是因为每个城市只能游历一次),i+n->to(w为1,cost为0),对于u->v,连接u->v+n(w为1,cost为路径上的权值)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值