摘要: 思路:这题的出题人是不是语文不行啊,题目意思说不清楚。知道是求存在路径的点对数后,用并查集每次记录集合中点的数目,很容易就解决了。#include#include#include#include#include#include#include#include#include#include#define pb push_back#define mp make_pair#define Maxn 200100#define Maxm 800002#define LL __int64#define Abs(x) ((x)>0?(x):(-x))#define lson(x) (x<< 阅读全文
posted @ 2013-09-05 18:04 fangguo 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 思路:直接打表#include#include#include#includeusing namespace std;int num[10010]={0,1356,1967,2577,3188,3799,5156,13154,13762,14374,14985,16341,16953,17563,18174,18785,20142,20753,21364,21975,22587,23942,24554,25165,25775,26387,27744,28355,28966,29576,30187,31544,32155,32767,33375,33987,35344,35954,36566,3 阅读全文
posted @ 2013-09-05 16:14 fangguo 阅读(591) 评论(0) 推荐(0) 编辑