Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 19206 Accepted: 7934 Case Time Limit: 1000MS Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days:…
Reference:IOI2009论文 http://www.cnblogs.com/ziyi--caolu/p/3192731.html #include "stdio.h" #include "string.h" #define maxn 200010 int wa[maxn],wb[maxn],wv[maxn],ws[maxn]; int rank[maxn],height[maxn]; int r[maxn],sa[maxn]; ],s2[]; int n,…
Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14874 Accepted: 5118 Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the…
Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 23696 Accepted: 9705 Case Time Limit: 1000MS Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days:…
Language: Default Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 21228 Accepted: 8708 Case Time Limit: 1000MS Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes…
Long Long Message Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being worried about spending so much on railway tickets (Byterland is such a bi…