摘要:
Here is a square matrix of n * nn∗n, each lattice has its value (nn must be odd), and the center value is n * nn∗n. Its spiral decline along the cente 阅读全文
摘要:
Problem Description Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flow 阅读全文
摘要:
Problem Description Yuanfang is puzzled with the question below: There are n integers, a1, a2, …, an. The initial values of them are 0. There are four 阅读全文
摘要:
Problem Description There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the l 阅读全文
摘要:
题目描述 Farmer John has installed a new system of N-1N−1 pipes to transport milk between the NN stalls in his barn (2 \leq N \leq 50,0002≤N≤50,000), conv 阅读全文
摘要:
Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 38494 Accepted: 12654 Description A musical melody is represented as a sequen 阅读全文
摘要:
后缀数组(倍增): struct S_array{ int s[N],sa[N],t[N],t2[N],c[N],n; int f[N][20]; void build_sa(int m){ //字符个数 int i,*x=t,*y=t2; for(i=0;i<m;i++)c[i]=0; for(i 阅读全文
摘要:
Problem Description You are given a string S consisting of only lowercase english letters and some queries.For each query (l,r,k), please output the s 阅读全文
摘要:
Problem Description You are given an array a1,a2,...,an(∀i∈[1,n],1≤ai≤n). Initially, each element of the array is **unique**.Moreover, there are m ins 阅读全文