随笔分类 - 思维题
摘要:#include #define LL long long using namespace std; const LL mod=1e9+7; const int maxn=5e5+10; int n;LL t; inline int read() { int x=0,f=1;char ch=getchar(); while(ch'9'){if(ch=='-')f=-1;ch=g...
阅读全文
摘要:http://www.cnblogs.com/DevilInChina/p/9691126.html 这个dalao 的思路 设平移球心到原点后 当前飞船坐标为 p(y_1,y_2,..,y_k) 球面上该点坐标q(a_1,a_2,...,a_k) 设 F(p) = sigma(yi-ai)^2 +
阅读全文
摘要:#include //题目要求01矩阵的//第一行除了A11只能有1个1//最后一列除了Ann只能有1个1//除了矩阵的四条边,里面的点要求该点所在行列1的个数各自相等//最后可以发现 如果说题目给了一个完全图的边权矩阵,那么01矩阵就显示了在这个图上的的一条路径//巧妙的修改spfa求最小环就oK using namespace std; #define LL long long const ...
阅读全文
摘要:#include #define LL long long using namespace std; const int maxn=1e5+10; struct nod { int x,k;int i; bool operator mp; LL f(LL y) { LL r=0; while(y) { r+=a[y%10][k]; ...
阅读全文

浙公网安备 33010602011771号