摘要: 被wsh大爷拉入坑,然而我会说他现在在睡觉? 题意:求一个循环同构的字符串的按字典序排序后末尾的字符的序列 飒飒飒 我们把这个字符串粘(nian)两遍,然后飒飒飒就好啦 可以这么轻易是因为对于一个倍长后的字符串,如果我们不能仅按前n位就将这个字符串排序, 当且仅当这个字符串的某些后缀的完全相同,然而 阅读全文
posted @ 2016-05-25 17:52 Ngshily 阅读(308) 评论(1) 推荐(0) 编辑
摘要: 模拟,dp[i][j]表示第i局j获胜的概率 轻易~ 1 #include<cstdio> 2 using namespace std; 3 #define maxn 1000 4 double dp[10][maxn],p[maxn][maxn]; 5 int n; 6 void getdp(in 阅读全文
posted @ 2016-05-25 15:42 Ngshily 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 膜kuangbin大爷 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define eps 1e-10// 4 #define maxn 10005 5 int cnt,v[maxn<<1],Next[maxn<<1],first[maxn] 阅读全文
posted @ 2016-05-25 13:05 Ngshily 阅读(143) 评论(0) 推荐(0) 编辑