
6.快速幂
文章平均质量分 71
DTL66
细节决定成败
展开
-
B - B
B - BTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu SubmitStatus Description Fermat’s theorem states that for any prime number p and for any integer a > 1, ap = a (mod p)原创 2016-07-23 13:29:26 · 321 阅读 · 0 评论 -
C - C
C - CTime Limit:1000MS Memory Limit:30000KB 64bit IO Format:%lld & %llu SubmitStatus Description People are different. Some secretly read magazines full of interesting girls’ pictures, other原创 2016-07-23 14:19:48 · 1460 阅读 · 2 评论 -
E - E
E - ETime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Given a positive integer N, you should output the most right digit of N^N. Input The input原创 2016-07-23 13:58:25 · 404 阅读 · 0 评论 -
D - D
D - DTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatus Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000)原创 2016-07-23 13:49:02 · 107725 阅读 · 0 评论 -
HDU-5363 Key Set 【快速幂取模+递推】
A - ATime Limit:1000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64u SubmitStatus Description soda has a set S with n integers {1, 2, \dots, n}. A set is called key set if the sum of i原创 2016-07-23 14:49:20 · 535 阅读 · 1 评论 -
ZZULI OJ-1894 985的方格难题 【DP or 组合数取余】
985的方格难题Time Limit: 1 Sec Memory Limit: 128 MB Submit: 395 Solved: 87SubmitStatusWeb Board Description985走入了一个n * n的方格地图,他已经知道其中有一个格子是坏的。现在他要从(1, 1)走到(n, n),每次只可以向下或者向右走一步,问他能否到达(n,n)。若不能到达输出-1,反之输原创 2016-08-09 19:49:47 · 452 阅读 · 0 评论 -
HDU 1215 七夕节 【约数和定理&&唯一分解定理(模板)】
七夕节Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 42511 Accepted Submission(s): 13503Problem Description七夕节那天,月老来到数字王国原创 2016-11-08 14:56:59 · 529 阅读 · 0 评论 -
HDU 1575 Tr A【矩阵快速幂取模】
Tr ATime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4510 Accepted Submission(s): 3394Problem DescriptionA为一个方阵,则Tr A表示A的迹原创 2016-11-09 17:49:15 · 354 阅读 · 0 评论 -
LIGHToj 1282 - Leading and Trailing 【对数+快速幂取模】
1282 - Leading and Trailing PDF (English)StatisticsForumTime Limit: 2 second(s)Memory Limit: 32 MBYou are given two integers: n and k, your task is to原创 2016-08-24 00:19:51 · 429 阅读 · 0 评论