摘要: E. Fire time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp is in really serious tr 阅读全文
posted @ 2017-09-26 15:57 JSC! 阅读(484) 评论(0) 推荐(0) 编辑
摘要: [AHOI2001]质数和分解 题目描述 任何大于 1 的自然数 n 都可以写成若干个大于等于 2 且小于等于 n 的质数之和表达式(包括只有一个数构成的和表达式的情况),并且可能有不止一种质数和的形式。例如,9 的质数和表达式就有四种本质不同的形式: 9 = 2 + 5 + 2 = 2 + 3 + 阅读全文
posted @ 2017-09-26 15:50 JSC! 阅读(279) 评论(0) 推荐(0) 编辑
摘要: A. Quasi-palindrome time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Quasi-palindrome t 阅读全文
posted @ 2017-09-25 20:42 JSC! 阅读(179) 评论(0) 推荐(0) 编辑
摘要: D. Make a Permutation! time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ivan has an array 阅读全文
posted @ 2017-09-25 20:36 JSC! 阅读(253) 评论(0) 推荐(0) 编辑
摘要: C. Bus time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output C. Bus time limit per test 2 seco 阅读全文
posted @ 2017-09-25 20:34 JSC! 阅读(340) 评论(0) 推荐(0) 编辑
摘要: B. Polycarp and Letters time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp loves l 阅读全文
posted @ 2017-09-25 20:31 JSC! 阅读(315) 评论(0) 推荐(0) 编辑
摘要: A. Fraction time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output A. Fraction time limit per te 阅读全文
posted @ 2017-09-25 18:17 JSC! 阅读(358) 评论(0) 推荐(0) 编辑
摘要: BSGS(Baby Steps,Giant Steps)算法详解 简介: 此算法用于求解 Ax≡B(mod C); 由费马小定理可知; x可以在O(C)的时间内求解; 在x=c之后又会循环; 而BSGS(拔山盖世)算法可以在O(C0.5)的时间内求解出; 内容: 主要运用分块的思想; 将 x=i*m 阅读全文
posted @ 2017-09-25 16:26 JSC! 阅读(357) 评论(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-09-25 16:10 JSC! 阅读(200) 评论(0) 推荐(0) 编辑
摘要: [AHOI2004]奇怪的字符串 题目描述 输入输出格式 输入格式: 输入文件中包含两个字符串X和Y。当中两字符串非0即1。序列长度均小于9999。 输出格式: X和Y的最长公共子序列长度。 输入输出样例 输入样例#1: 01010101010 00000011111 输出样例#1: 6 输入样例# 阅读全文
posted @ 2017-09-24 20:05 JSC! 阅读(277) 评论(0) 推荐(0) 编辑