There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs...
分类:
其他好文 时间:
2014-07-19 20:35:13
阅读次数:
202
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs...
分类:
其他好文 时间:
2014-07-18 20:39:06
阅读次数:
556
#encoding=utf-8from xml.etree import ElementTree as ET#要找出所有人的年龄per=ET.parse('d:\\1.xml')p=per.findall('./STATION')for x in p: print x.attribprintf...
分类:
其他好文 时间:
2014-07-18 15:05:41
阅读次数:
187
Description
There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It wa...
分类:
其他好文 时间:
2014-07-17 10:41:03
阅读次数:
220
/*
C - 堆栈A
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u
Submit
Status
Practice
POJ 1363
Description
There is a famous railway station in PopPush City. Country there ...
分类:
其他好文 时间:
2014-07-12 23:56:36
阅读次数:
530
题意就先不用讲了吧,感觉自己还没有掌握核心的东西。//心得
//怎样保持路径,递归的实现
#include
#include
#include
#include
#include
using namespace std;
int a[100][100];//time for station
int t[100][100];//time for from Li to Lj
int f[100]...
分类:
其他好文 时间:
2014-07-12 23:54:43
阅读次数:
356
#include#include#include#include#includeusing namespace std;const int maxn = 105;const int INF = (1t){ slack[y]=t; } } ...
分类:
其他好文 时间:
2014-07-12 14:37:16
阅读次数:
243
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].
You have a car with an unlimited gas tank and it costs cost[i] of gas
to travel from station i to ...
分类:
其他好文 时间:
2014-07-10 20:59:16
阅读次数:
239
Base Station
Time Limit: 20000/10000MS (Java/Others)Memory Limit: 512000/256000KB (Java/Others)
SubmitStatisticNext
Problem
Problem Description
移动通信系统中,通信网的建立主要通过基站来完成。
基站可以分为主基站和子...
分类:
其他好文 时间:
2014-07-08 21:23:16
阅读次数:
297
http://poj.org/problem?id=4045
大致题意:有n个村庄,求将发电站建在哪一个村庄使得花费最少。这是一个无向无环图。简化一下就是求一个节点使它到其他所有节点的距离和最小。
起初一直在向最短路上靠,但因为节点和边数太大,必定TLE。然后无比强大的啸神随便写了两个dfs就过掉了,简直膜拜。赛后搜了搜题解,发现这是道树形dp。sad,真的要好好刷dp了。
...
分类:
其他好文 时间:
2014-07-08 10:42:39
阅读次数:
261