上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 86 下一页
摘要: 1467: Pku3243 clever Y Description 小Y发现,数学中有一个很有趣的式子: X^Y mod Z = K 给出X、Y、Z,我们都知道如何很快的计算K。但是如果给出X、Z、K,你是否知道如何快速的计算Y呢? Input 本题由多组数据(不超过20组),每组测试数据包含一行 阅读全文
posted @ 2017-11-22 17:07 zbtrs 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 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)的最小 阅读全文
posted @ 2017-11-22 16:09 zbtrs 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 卡特兰数又称卡塔兰数,卡特兰数是组合数学中一个常出现在各种计数问题中的数列,关于卡特兰数的题目大多都有一个差不多的套路:对于一个规模为n的问题,先找一个元素固定下来,然后将剩下的n-1个元素拆分成两个子问题,最后通过乘法原理和加法原理结合起来,所以卡特兰数的递推式就是f(n) = f(0)*f(n- 阅读全文
posted @ 2017-11-21 15:31 zbtrs 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 题目描述 欧几里德的两个后代Stan和Ollie正在玩一种数字游戏,这个游戏是他们的祖先欧几里德发明的。给定两个正整数M和N,从Stan开始,从其中较大的一个数,减去较小的数的正整数倍,当然,得到的数不能小于0。然后是Ollie,对刚才得到的数,和M,N中较小的那个数,再进行同样的操作……直到一个人 阅读全文
posted @ 2017-11-20 18:21 zbtrs 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 2277: [Poi2011]Strongbox Description Byteasar is a famous safe-cracker, who renounced his criminal activity and got into testing and certifying anti-b 阅读全文
posted @ 2017-11-20 13:38 zbtrs 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 52620 Accepted: 21917 Description Given two strings a and b we define a*b to 阅读全文
posted @ 2017-11-19 10:45 zbtrs 阅读(249) 评论(0) 推荐(0) 编辑
摘要: D. Gluttony time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an array a wit 阅读全文
posted @ 2017-11-18 23:31 zbtrs 阅读(392) 评论(0) 推荐(0) 编辑
摘要: C. Pride time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Pride time limit per test 2 阅读全文
posted @ 2017-11-18 23:07 zbtrs 阅读(394) 评论(0) 推荐(0) 编辑
摘要: B. Wrath time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Hands that shed innocent blood! 阅读全文
posted @ 2017-11-18 22:56 zbtrs 阅读(313) 评论(0) 推荐(0) 编辑
摘要: A. Greed time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Jafar has n cans of cola. Each 阅读全文
posted @ 2017-11-18 22:51 zbtrs 阅读(306) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 86 下一页