随笔分类 - 数学 快速幂
摘要:Clarke and digits Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Clarke is a patient with multip
阅读全文
摘要:E. Okabe and El Psy Kongroo time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output E. Okabe and
阅读全文
摘要:M斐波那契数列 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Problem Description M斐波那契数列F[n]是一种整数数列,它的定义如下:F[0] = aF[1] =
阅读全文
摘要:D. GukiZ and Binary Operations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. GukiZ a
阅读全文
摘要:2242: [SDOI2011]计算器 Description 你被要求设计一个计算器完成以下三项任务: 1、给定y,z,p,计算Y^Z Mod P 的值; 2、给定y,z,p,计算满足xy≡ Z ( mod P )的最小非负整数; 3、给定y,z,p,计算满足Y^x ≡ Z ( mod P)的最小
阅读全文
摘要:Recursive sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Farmer John likes to play math
阅读全文
摘要:Fibonacci Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description 2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100
阅读全文
摘要:E. Sasha and Array time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output Sasha has an array of
阅读全文
摘要:Mathematician QSC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Problem Description QSC dream of becoming a mathe
阅读全文
摘要:1008: [HNOI2008]越狱 Description 监狱有连续编号为1...N的N个房间,每个房间关押一个犯人,有M种宗教,每个犯人可能信仰其中一种。如果相邻房间的犯人的宗教相同,就可能发生越狱,求有多少种状态可能发生越狱 监狱有连续编号为1...N的N个房间,每个房间关押一个犯人,有M种
阅读全文
摘要:Leading and Trailing You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits o
阅读全文
摘要:Partition Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Define f(n) as the number of ways to pe
阅读全文
摘要:A. Johny Likes Numbers time limit per test 0.5 seconds memory limit per test 256 megabytes input standard input output standard output A. Johny Likes
阅读全文
摘要:All X Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) All X Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 6553
阅读全文
摘要:Sequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Holion August will eat every thing he ha
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cmath> #include<string> #include<queue> #include<algorithm> #include<stack> #include<cstring> #include<ve
阅读全文