自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

原创 矩阵快速幂总结

基础知识:(会基础的直接看应用部分)(1)矩阵乘法简单的说矩阵就是二维数组,数存在里面,矩阵乘法的规则:A*B=C其中c[i][j]为A的第i行与B的第j列对应乘积的和,即:代码:const int N=100;int c[N][N];void multi(int a[][N],int b[][N],int n)//n是矩阵大小,n<N{ memset(c,0,sizeof c...

2016-11-25 15:40:18 40525 21

原创 数位dp总结 之 从入门到模板

for(int i=le;i<=ri;i++) if(right(i)) ans++;基础篇数位dp是一种计数用的dp,一般就是要统计一个区间[le,ri]内满足一些条件数的个数。所谓数位dp,字面意思就是在数位上进行dp咯。数位还算是比较好听的名字,数位的含义:一个数有个位、十位、百位、千位......数的每一位就是数位啦!之所以要引入数位的概念完全就是为了dp。

2016-08-03 14:37:59 71173 69

原创 国际化代码对日期对象操作的新理解

java代码里对于日期、时间的使用与操作已经司空见惯,也有大量的工具包提供了对日期对象的各种操作的封装,但是一旦与国际接轨,需要处理的时区不再是单一的GMT+8,原本简单的日期对象就变得复杂起来了。如上图:我们的java服务都是有一个默认时区的,以往在国内,都是GMT+8。

2024-04-12 14:58:42 484

原创 python接入apollo 读取txt文件

pyapollo模块提供了api接口github地址pip安装命令:pip installpyapollospycharm安装使用代码:from pyapollos import ApolloClientapollo_client = ApolloClient(app_id="appID",cluster='TEST',config_server_url="http:...

2020-02-04 19:07:00 2243

原创 superset启动报No such command "runserver"

superset搭建最后一步报这个错误,执行superset --help,没有看到runserver,但是有一个run ,猜一下就是run了superset run -p 8088 搞定

2019-10-23 20:07:56 3559

原创 UVALive - 7271 A Math Problem (hihocoder 1259)

Stan is crazy about math. One day, he was confronted with an interesting integer function definedon positive integers, which satisfies f(1) = 1 and for every positive integer n, 3 × f(n) × f(2n + 1) =f(2n) × (1 + 3f(n)), f(2n) < 6 × f(n).He wanted to kn

2016-10-28 23:06:52 1428

原创 codeforces 710D Two Arithmetic Progressions (扩展中国剩余定理)

You are given two arithmetic progressions: a1k + b1 and a2l + b2. Find the number of integers x such that L ≤ x ≤ R andx = a1k' + b1 = a2l' + b2, for some integers k', l' ≥ 0.InputThe

2016-08-23 09:13:14 1185

原创 莫比乌斯究竟爱谁!

莫比乌斯反演答:欧几里得+......+int gcd(int a,int b){ return b==0?a:gcd(b,a%b);}这段gcd代码大家一定很熟悉^_^。gcd嘛!又叫欧几里得算法,这和我们今天要说的莫比乌斯有(非常^n)密切关系!这两天做了李总挂的一套莫比乌斯的题目深有感触。那我们赶紧看看这两个人是如何快乐的玩耍的!1.莫比乌斯函数定义

2016-08-13 14:33:25 2962

原创 莫比乌斯的前夜

要写莫比乌斯总结了,先打个基础呗。写莫比乌斯题目时常用的一些数学技巧:

2016-08-12 22:30:14 908

转载 BZOJ 3994 [SDOI2015]约数个数和 (莫比乌斯反演)

3994: [SDOI2015]约数个数和Time Limit: 20 Sec  Memory Limit:128 MBSubmit: 239  Solved: 176[Submit][Status][Discuss]Description 设d(x)为x的约数个数,给定N、M,求  Input输入文件包含多组测试数据。第一行,一个整数T,表示测试数

2016-08-09 20:47:12 686

原创 2016多校训练一 PowMod,hdu5728(欧拉函数+指数循环节)

Declare:k=∑mi=1φ(i∗n) mod 1000000007n is a square-free number.φ is the Euler's totient function.find:ans=kkkk...k mod pThere are infinite number of k InputMultipl

2016-07-20 13:22:02 3406 4

原创 Codeforces Round #362 (Div. 1) C PLEASE(组合数学,指数循环节)

As we all know Barney's job is "PLEASE" and he has not much to do at work. That's why he started playing "cups and key". In this game there are three identical cups arranged in a line from left to rig

2016-07-20 10:03:33 932

转载 组合数学 转动群

组合数学中比较困难的波利亚定理应用最大的障碍是不理解所要解决的立体形状的具体信息。下文详细列举了所有常见的形状和其详尽的信息。  正四面体:阶12,顶点4个,面4个,棱6条,均为等边三角形转动群顶点面棱个数不动(1)4(1)4(1)61顶点-面心 ±120度(1)(3)(1)(3)(3)28

2016-07-06 16:29:35 878

原创 POJ 2154 Color (Polya定理&欧拉函数)

Beads of N colors are connected together into a circular necklace of N beads (N<=1000000000). Your job is to calculate how many different kinds of the necklace can be produced. You should know that th

2016-07-06 13:37:40 363

原创 HDU 3658 How many words (矩阵快速幂&递推)

In order to make a new word, we will pick out m letters from all the upper case letters and lower case letters(from `a' to `Z'). Therefore, that means you can pick some same letters. But here are two

2016-07-05 20:52:24 520

原创 HDU 4779 Tower Defense(组合数学)

Description  DRD loves playing computer games, especially Tower Defense games. Tower Defense is a famous computer game with a number of variations. In general, you are to build some defense towers

2016-06-29 22:28:17 479

原创 算法马拉松11 D题 计算

题目描述:有一个1*n的矩阵 固定第一个数为1 其他填正整数  且相邻数的差不能超过1 求方案数%1e9+7的结果Input一个数n 表示1*n的矩阵(nOutput一个数 表示方案数%1e9+7的结果Input示例3Output示例5题目链接:http://www.51nod.com/contest/pr

2016-05-21 11:37:31 868

原创 HDU 5119 Happy Matt Friends 2014ACM/ICPC亚洲区北京站

Problem DescriptionMatt has N friends. They are playing a game together.Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of his friends. If the xor (ex

2015-09-02 22:52:38 743

原创 POJ 1850 Code

CodeTime Limit: 1000MS Memory Limit: 30000KB 64bit IO Format: %I64d & %I64uSubmit StatusDescriptionTransmitting and memorizing information is a task that re

2015-08-15 10:35:44 417

转载 java大数用法

Java只能说很重要,还有什么好说的呢!转一遍大牛的博客 在用C或者C++处理大数时感觉非常麻烦,但是在JAVA中有两个类BigInteger和BigDecimal分别表示大整数类和大浮点数类,至于两个类的对象能表示最大范围不清楚,理论上能够表示无线大的数,只要计算机内存足够大。这两个类都在java.math.*包中,因此每次必须在开头处引用该包。Ⅰ基本函数:

2015-08-04 20:50:34 780

原创 HDU 5318 (dp+矩阵快速幂优化)

The Goddess Of The MoonTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 605    Accepted Submission(s): 259Problem DescriptionChan

2015-07-29 16:20:02 2191

原创 light oj 1220

题目连接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26932                                                                                                                             M

2015-07-27 20:08:54 527

转载 【AekdyCoin】求小于等于N的与N互质的数的和

又向大牛学到了一点。以下内容转大牛文章:if gcd(n,i)=1 then gcd(n,n-i)=1 (1反证法:如果存在K!=1使gcd(n,n-i)=k,那么(n-i)%k==0而n%k=0那么必须保证i%k=0k是n的因子,如果i%k=0那么gcd(n,i)=k,矛盾出现;于是问题变的非常简单ANS=N*phi(N)/2i,n-i总是成对

2015-07-24 23:39:19 698 1

原创 hdu 5288 OO’s Sequence

OO has got a array A of size n ,defined a function f(l,r) represent the number of i (li) satisfy ai mod aj=0,now OO want to know∑(i=1->n)∑(j=i->n)f(i,j) mod (109+7).InputThere are multiple

2015-07-24 23:30:33 392

原创 light oj 1067 组合数取模

Given n different objects, you want to take k of them. How many ways to can do it?For example, say there are 4 items; you want to take 2 of them. So, you can do it 6 ways.Take 1, 2Take 1,

2015-07-24 23:21:44 571

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除