摘要:
康托展开康托展开,用人话说出来..就是把一个数组的多种排序情况对应用数字表示出来公式:X = a[i] * (n-1)! + a[i-1] * (n-2)! + … + a[1] * 0!其中a[i]表示后面比该元素小的元素的个数举个例子,有5个数1 2 3 4 5共... 阅读全文
posted @ 2018-10-19 15:04
Mercury_Lc
阅读(111)
评论(0)
推荐(0)
摘要:
#include using namespace std;typedef long long ll;char s[100];char a[100];int main(){ int i,j,k,f,top,len; while(gets(s) != '\0'... 阅读全文
posted @ 2018-10-19 09:20
Mercury_Lc
阅读(199)
评论(0)
推荐(0)
摘要:
迪杰斯特拉简单版#include using namespace std;int m,n;const int inf = 0x3f3f3f3f;int dis[1005];int gra[405][405];int vis[1005];void dj(int s, i... 阅读全文
posted @ 2018-10-19 08:54
Mercury_Lc
阅读(264)
评论(0)
推荐(0)
摘要:
某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。In... 阅读全文
posted @ 2018-10-19 08:52
Mercury_Lc
阅读(110)
评论(0)
推荐(0)
摘要:
problemBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for ... 阅读全文
posted @ 2018-10-19 08:30
Mercury_Lc
阅读(109)
评论(0)
推荐(0)

浙公网安备 33010602011771号