摘要:
作用 用于求一个串的字典序最小的循环串 原理 详见oi-wiki 最小表示法 算法思想是贪心。时间复杂度O(n) int findmin(char s[]) { //n为字符串长度 int k = 0, i = 0, j = 1; while (k < n && i < n && j < n) { 阅读全文
摘要:
Description Given two strings s and t, count the number of tuples (i,j,k) such that 1. 1 ≤ i ≤ j ≤ |s| 2. 1 ≤ k ≤ |t|. 3. j − i + 1 k. 4. The i th cha 阅读全文