挺裸的点分治 刚开始想用map水过去,然后做p次点分治,然后T到自闭 最后发现可以sort一遍,然后去重,记录每个数出现的次数,这样就可以双指针,不会漏掉了 #include <bits/stdc++.h> using namespace std; #define N 100010 int n, q, Q[N], ans[N]; struct Graph { struct node { int to, nx, w; node() {} node (int to, int nx, int w)…
1.链接地址: http://poj.org/problem?id=1316 http://bailian.openjudge.cn/practice/1316 2.题目: 总时间限制: 1000ms 内存限制: 65536kB 描述 In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define…