主题链接: PKU:http://poj.org/problem?id=3652 ZJU:http://acm.zju.edu.cn/onlinejudge/showProblem.do? problemId=1933 HDU:http://acm.hdu.edu.cn/showproblem.php?pid=2721 Description WhatNext Software creates sequence generators that they hope will produce fai…
题面: WhatNext Software creates sequence generators that they hope will produce fairly random sequences of 16-bit unsigned integers in the range 0–65535. In general a sequence is specified by integers A, B, C, and S, where 1 ≤ A < 32768, 0 ≤ B < 65536…
题目有点长,但是题意说的很清楚.位操作. #include <stdio.h> ]; int main() { int a, b, c, s; int i, j, k, n, tmp, mask; while (scanf("%d", &a)!=EOF && a) { scanf("%d%d%d", &b, &c, &s); n = mask = ; nums[n++] = tmp = s; a = a%c…
http://poj.org/problem?id=1743 题意:不可重叠最长重复子串,n<=20000,具体看<后缀数组>-- 罗穗骞 #include <cstdio> #include <algorithm> using namespace std; const int N=20015; void sort(int *x, int *y, int *sa, int n, int m) { static int c[N], i; for(i=0; i<…