http://acm.hdu.edu.cn/showproblem.php?pid=4418
读了一遍题后大体明白意思,但有些细节不太确定。就是当它处在i点处,它有1~m步可以走,但他走的方向不确定呢。后来想想这个方向是确定的,就是他走到i点的方向,它会继续朝着这个方向走,直到转向回头。
首先要解决的一个问题是处在i点处,它下一步该到哪个点。为了解决方向不确定的问题,将n个点转化为2*...
分类:
其他好文 时间:
2014-09-13 01:56:44
阅读次数:
244
把N个点先转化为2*N-2个点。比方说把012345转化成0123454321。这样,就能够找出随意两两个点之间的关系。然后依据关系能够得出来一个一元多项式的矩阵。然后就用高斯消元求出矩阵就可以。#include#include#include#include#include#includeusin...
分类:
其他好文 时间:
2014-09-10 15:36:30
阅读次数:
178
【题目】
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 sta...
分类:
其他好文 时间:
2014-09-10 10:58:30
阅读次数:
216
Robert KiralySoftware DeveloperCell Phone: 650-600-2520 Freenode: ##venturesSupports text messages Part-time or travel O.K.Website: GitHub: Email: Lin...
分类:
其他好文 时间:
2014-09-09 18:02:49
阅读次数:
226
he Himalayas
Time Limit: 2 Seconds Memory Limit: 65536 KB
As an artist, Bob usually need to travel around the world. He made a lot of sketch of scenery on his journey. A famous spot he ha...
分类:
其他好文 时间:
2014-09-09 12:48:18
阅读次数:
214