11 2017 档案
poj1002 大数的 n的m次
摘要:import java.math.BigDecimal; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while (cin.hasNext()) { ...
阅读全文
java 大数处理
摘要:头文件:import java.util.*; import java.math.*; Scanner cin = Scanner (System.in);//读入 while(cin.hasNext())//等价于!=EOF n=cin.nextInt();//读入一个int型的数 n=cin.nextBigInteger();//读入一个大整数 输出: Sy...
阅读全文
1010. Radix (25)
摘要:1010. Radix (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度限制 16000
阅读全文
归并排序求逆序対
摘要:hdu 4491#include <iostream> #include<stdio.h> #include<algorithm> #include<cmath> using namespace std; int a[100005]; int b[100005]; long long int ans
阅读全文
后缀数组的应用
摘要:2.1 最长公共前缀 height 数组:定义height【i】=suffix(sa【i-1】)和suffix(sa【i】)的最长公共前缀;也就是排名相邻的两个后缀的最长公共前缀。 那么对于j和k,不妨设rank【j】<rank【k】;不妨设rank【j】<rank【k】,则有以下性质: suffi
阅读全文
suffix array后缀数组
摘要:倍增算法 基本定义子串:字符串 S 的子串 r[i..j],i≤j,表示 r 串中从 i 到 j 这一段也就是顺次排列 r[i],r[i+1],...,r[j]形成的字符串。 后缀:后缀是指从某个位置 i 开始到整个串末尾结束的一个特殊子串。 字串 r 的 从 第 i 个 字 符 开 始 的 后 缀
阅读全文
F - Proud Merchants
摘要:Recently, iSea went to an ancient country. For such a long time, it was the most wealthy and powerful kingdom in the world. As a result, the people in
阅读全文
pat1009
摘要:1009. Product of Polynomials (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536
阅读全文
pat1008
摘要:The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elev
阅读全文
pat1007
摘要:1007. Maximum Subsequence Sum (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 6553
阅读全文
pat1006
摘要:1006. Sign In and Sign Out (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 k
阅读全文
pat1005
摘要:1005. Spell It Right (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度
阅读全文
pat1004
摘要:1004. Counting Leaves (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB 代码长
阅读全文
pat1003
摘要:1003. Emergency (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度限制 16
阅读全文
pat1002
摘要:1002. A+B for Polynomials (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 400 ms 时间限制 400 ms 内存限制 65536 kB 内存限制 65536 kB
阅读全文
浙公网安备 33010602011771号