上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 26 下一页
摘要: #include "iostream" #include "cstdio" #include "cstring" #include "algorithm" #include "map" using namespace std; char a[11]; vector ans; bool visit[11]; int n; map,bool> m; void dfs(int k) { ... 阅读全文
posted @ 2017-07-20 00:00 kimsimple 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 给出圆的圆心和半径,以及三角形的三个顶点,问圆同三角形是否相交。相交输出"Yes",否则输出"No"。(三角形的面积大于0)。 Input Output Input示例 Output示例 阅读全文
posted @ 2017-07-19 00:11 kimsimple 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 给出三维空间上的四个点(点与点的位置均不相同),判断这4个点是否在同一个平面内(4点 阅读全文
posted @ 2017-07-18 23:58 kimsimple 阅读(329) 评论(0) 推荐(0) 编辑
摘要: /* (a-c)×(d-c)*(d-c)×(b-c)>=0&&(c-a)×(b-a)*(b-a)×(d-a)>= 0就可以判断ab,cd相交*/ /* p1×p2 = x1y2 - x2y1 = - p2×p1-----(叉乘公式)叉积*/ #include struct point { double x,y; }; //struct point a,b,c,d; in... 阅读全文
posted @ 2017-07-18 00:32 kimsimple 阅读(315) 评论(0) 推荐(0) 编辑
摘要: #include int exgcd(int a,int b,int &x,int &y) { if(b==0) { x=1; y=0; return a; } int r=exgcd(b,a%b,x,y); int t=x;x=y;y=t-(a/b)*y; return r; } int... 阅读全文
posted @ 2017-07-18 00:00 kimsimple 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 乘法逆元 定义: 满足a*k≡1 (mod p)的k值就是a关于p的乘法逆元。 为什么要有乘法逆元呢?当我们要求(a/b) mod p的值,且a很大,无法直接求得a/b的值时,我们就要用到乘法逆元。 我们可以通过求b关于p的乘法逆元k,将a乘上k再模p,即(a*k) mod p。其结果与(a/b) 阅读全文
posted @ 2017-07-17 23:54 kimsimple 阅读(328) 评论(0) 推荐(0) 编辑
摘要: POJ 3070 51Nod 1242 大斐波那契数取余 阅读全文
posted @ 2017-07-17 23:51 kimsimple 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 1421 最大MOD值 1421 最大MOD值 1421 最大MOD值 有一个a数组,里面有n个整数。现在要从中找到两个数字(可以是同一个) ai,aj ,使得 ai mod aj 最大并且 ai ≥ aj。 有一个a数组,里面有n个整数。现在要从中找到两个数字(可以是同一个) ai,aj ,使得  阅读全文
posted @ 2017-07-15 23:55 kimsimple 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Redfield-Polya (Pólya enumeration theorem,简称PET)定理是组合数学理论中最重要的定理之一.自从 1927 年 Redfield 首次运用 group reduction function 概念,现在称之为群的循环指标(circle index of a g 阅读全文
posted @ 2017-07-15 23:37 kimsimple 阅读(1134) 评论(0) 推荐(0) 编辑
摘要: CodeForces - 682B Input The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of elements in the Alyona's array. The 阅读全文
posted @ 2017-07-15 23:36 kimsimple 阅读(337) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 26 下一页