Live2d Test Env

随笔分类 -  数学

上一页 1 ··· 4 5 6 7 8 9 下一页
摘要:Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. There are many p 阅读全文
posted @ 2017-10-28 22:20 nimphy 阅读(209) 评论(0) 推荐(0)
摘要:A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。 Input数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 <= n <= 10)和k(2 <= k < 10^9)两个数据。接下来有n行,每行有n个数据,每个数据的范围是[0,9],表示 阅读全文
posted @ 2017-10-28 13:10 nimphy 阅读(277) 评论(0) 推荐(0)
摘要:暴力出奇迹,我就知道没取余那么正当,肯定有什么奇淫怪巧,果然5分钟A掉。 阅读全文
posted @ 2017-10-17 19:54 nimphy 阅读(293) 评论(0) 推荐(0)
摘要:开始以为是容斥原理,想着做一下,应该是可以用容斥解决的,有空再过来写一下。题解是进制转换,开始没想到,不过很好理解。 如在10进制里: 1254= (1*10^3 + 2*10^2 + 5* 10^1+ 4*10^0) 而faulty的大小:1254= (1* 8^3 + 2* 8^2 + 4* 8 阅读全文
posted @ 2017-10-11 08:08 nimphy 阅读(182) 评论(0) 推荐(0)
摘要:用向量解决: 三角形面积:S=1/2*|x1*y2-x2*y1|; (粗体表示向量) 三棱锥体积:V=1/6*(OA*OB)*OC 不知道哪里去找的代码,毕竟很线性代数矩阵什么的很头疼,晚上再手动比划下。 阅读全文
posted @ 2017-10-09 14:08 nimphy 阅读(164) 评论(0) 推荐(0)
摘要:Order Count Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 954 Accepted Submission(s): 371 Probl 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(1184) 评论(2) 推荐(0)
摘要:大数MOD 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(127) 评论(0) 推荐(0)
摘要:1207汉诺塔IIGardonGardon-DYGG Contest 2(4374/8844)49.46% 1995汉诺塔VZhousc@ECJTUECJTU 2008 Spring Contest(3281/5316)61.72% 1996汉诺塔VIZhousc@ECJTUECJTU 2008 ... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(252) 评论(0) 推荐(0)
摘要:吃糖果 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 41705 Accepted Submission(s): 12022 Problem 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(161) 评论(0) 推荐(0)
摘要:第一次看到这题果断放弃,毕竟几何白痴,第二次刷没做的题的时候突然想到这个三角形面积的向量法:S=|x1*y2-x2*y1| 但是此题可能是凹多边形,所以不能加绝对值,可以画个凹四边形看看。 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(147) 评论(0) 推荐(0)
摘要:做多了年月日,现在基本就能水过了 18岁生日 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 33799 Accepted Submission 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(296) 评论(0) 推荐(0)
摘要:HDU1465HDU2048HDU2049#include #include #include #include #include using namespace std; long long s[21],c[21]; void _gets() { s[0]=0;s[1]=0;s[2]=1; for(i=3;i>n; while(n--){ cin>>m; pr... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(115) 评论(0) 推荐(0)
摘要:Kinds of FuwasTime Limit: 2 Seconds Memory Limit:65536 KBIn the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the ... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(118) 评论(0) 推荐(0)
摘要:宣之于口 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(114) 评论(0) 推荐(0)
摘要:昨天做过一样的题: 平方和公式:n*(n+1)*(2n+1)/6 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(219) 评论(0) 推荐(0)
摘要:ZOJ2150 快速幂,但是用递归式的好像会栈溢出。 #include<cstdio> #include<cstdlib> #include<iostream> #include<cmath> using namespace std; long long M,i; #define LL long l 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(95) 评论(0) 推荐(0)
摘要:初步找大概位置,然后找精确位置,算是简单化的分块吧! #include<cstdio> #include<cstdlib> #include<iostream> using namespace std; int c[5000]; int num=0; void _get() { int k=1,m; 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(122) 评论(0) 推荐(0)
摘要:分析: 组合数学类型的题目。 正常的话可能会去分解1~N数里面有几个5和2,但是这样的复杂度为O(nlogn)。 其实有更巧妙的办法,可以把问题分解成子问题。 可以发现N!末尾的0与1~N中有几个5的因子相同(因为2总是比5多)。 1~N中只有5的倍数包含5因子,比如[5, 10, 15, 20..... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(146) 评论(0) 推荐(0)
摘要:zoj3778题目大意:有n个数,每一次操作你可以最多选择m个数自减一,求直到所有数都为零,的最小操作次数。第一想法肯定是贪心排序:用一个大根堆,每次选前面的min(m,n)个自减一,这... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(122) 评论(0) 推荐(0)
摘要:Circle 断一个图是否是一个环。 ... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(92) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 下一页