摘要:
题目描述说一大堆要求,看着吓人,但是好像都和最小生成树的性质直接就套上了,也就是说,一个模板加个变量统计下就没了。 1 #include<algorithm> 2 #include<iostream> 3 #include<vector> 4 #include<cstdio> 5 using nam 阅读全文
posted @ 2017-09-10 21:40
Darkins
阅读(142)
评论(0)
推荐(0)
摘要:
之前看到的是基数仅为三的版本,只有一个输入的。我看数据范围就知道暴力出屎已成必然,而且难敲。然后我拿笔稍微划几笔,突然想到这他妈的每一个幂前边的系数都是一,不就可以把二进制一转完事吗——如下。 1 #include<iostream> 2 #include<cstdio> 3 using names 阅读全文
posted @ 2017-09-10 21:36
Darkins
阅读(132)
评论(0)
推荐(0)
摘要:
奇奇怪怪,本来用的搜索,然后发现先决条件判断错了,然后就有了这东西。 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdio> 4 using namespace std; 5 const int N=16384; 6 int n,r 阅读全文
posted @ 2017-09-10 21:29
Darkins
阅读(154)
评论(0)
推荐(0)
摘要:
无甚可说。 1 #include<algorithm> 2 #include<iostream> 3 #include<cstdio> 4 #include<queue> 5 using namespace std; 6 const int N=65536,INF=0x7fffffff; 7 str 阅读全文
posted @ 2017-09-10 21:27
Darkins
阅读(150)
评论(0)
推荐(0)

浙公网安备 33010602011771号