本月博客排行
年度博客排行
-
第1名
青否云后端云 -
第2名
zw7534313 -
第3名
大家都说我很棒 - liyihz2008
- wy_19921005
- gengyun12
- hbxflihua
- e_e
- luxurioust
- dbagirl
- zysnba
- robotmen
- Alsmile
- gaozzsoft
- jywhltj
- cpongo1
- leslie26
- qepwqnp
- 解宜然
- cuityang
- gashero
- sichunli_030
- fantaxy025025
- zhangdaiscott
- vipbooks
- wallimn
- gdpglc
- ssydxa219
- ranbuijj
- javashop
- jickcai
- hanbaohong
- johnsmith9th
- appalese
- gaojingsong
- weiyides
- 淡看人生
- java-007
- zhangyi0618
- AVI
- laiyangdeli
- xpenxpen
- liunancun
- 龙哥IT
- conkeyn
- nychen2000
- ouanui
- silverend
- lemonhandsome
- jveqi
最新文章列表
【扩展欧几里德】SGU 106
KIDx的解题报告
题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=106
题意:求ax + by + c = 0在[x1, x2], [y1, y2]区间内有多少组解?
【快速幂取模】fzu 1752 A^B mod C
KIDx 的解题报告
参考《算法艺术与信息学竞赛》:
题目:http://acm.fzu.edu.cn/problem.php?pid=1752
由于(1<=A,B,C<2^63),所以要用到mul_mod二分求a*a,不然会溢出
原来的快速幂取模简单模板:
//求(a^b)%c
int qmod (int a, int b, int c)
{
int res = 1; ...
【高次幂取模的应用】HDU 3609 Up-up
KIDx 的解题报告
题目很容易看懂:http://acm.hdu.edu.cn/showproblem.php?pid=3609
降幂公式:
这速度可以排到前10了:
#include <iostream>
using namespace std;
#define LL unsigned __int64
#define M 205
int phi[M];
i ...
HDU 1370 Biorhythms
Biorhythms
Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 669Accepted Submission(s): 266
Problem Description
Some people believe that there are t ...